Author Topic: SWGPTG - 02 - Drawing Basic Shapes  (Read 1799 times)

caballero

  • Member
  • *****
  • Posts: 1149
    • abre ojos ensamblador
SWGPTG - 02 - Drawing Basic Shapes
« on: May 15, 2018, 10:21:14 PM »
Starting making one of the previous lesson quiz for a few compilers 32 and 64 bits
The logic of the error is hidden among the most unexpected lines of the program

caballero

  • Member
  • *****
  • Posts: 1149
    • abre ojos ensamblador
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #1 on: June 03, 2018, 06:40:29 PM »
I have added some basic shapes using the standard GDI functions. Only in TinyC folder, the others is the same.

This is quite powerful in the sense that you can draw bitmaps on the fly than you can use in your own windows objects.

Really anyone interested? If so I don't like to speak to myself. Any feedback and code will be welcome.

PS. When maximize the smile face window it get quite slow. Fortunatelly it can be improved with our drawing routines.
The logic of the error is hidden among the most unexpected lines of the program

Siekmanski

  • Member
  • *****
  • Posts: 1844
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #2 on: June 03, 2018, 06:53:15 PM »
Quote
Really anyone interested?

 :t I am.

Always want to learn and see how routines are done by other people.

I think it is a cool idea to discuss the different methods to create one effect.
Demo effects are a great resource for building games too. ( many of the game techniques stem from Demos )
Creative coders use backward thinking techniques as a strategy.

felipe

  • Member
  • *****
  • Posts: 1240
  • Eagles are just great!
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #3 on: June 04, 2018, 02:35:29 AM »
Hey caballero this is a great contribution, thank you  :icon14:. I can't promise to be a good student, but surely i will have a look to the code when i get the time. You should keep with your courses when there are interest, i agree with that (that's also a good idea to make students better), but please don't delete what you upload, is good for the forum and when some people get the time to learn about this issue they will come here too.  :idea:
Felipe.

caballero

  • Member
  • *****
  • Posts: 1149
    • abre ojos ensamblador
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #4 on: June 05, 2018, 04:05:40 AM »
I almos forgot. Though I don't like much PeekMessage, here is a way to use it and stabilizing the fps, painting the fps on the screen. Ie, a way to write text to the screen using standard GDI functions.

I know that there's a way to optimize it, maybe using the function Sleep, that decreases the resources used. But, no time to chase it. If anyone knows how to do it, would be nice to tell us :t
The logic of the error is hidden among the most unexpected lines of the program

felipe

  • Member
  • *****
  • Posts: 1240
  • Eagles are just great!
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #5 on: June 05, 2018, 04:37:56 AM »
 :icon14: This is great, thank you very much.
Felipe.

caballero

  • Member
  • *****
  • Posts: 1149
    • abre ojos ensamblador
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #6 on: June 24, 2018, 06:18:37 PM »
First shape made by hand. Bresenham lines
The logic of the error is hidden among the most unexpected lines of the program

caballero

  • Member
  • *****
  • Posts: 1149
    • abre ojos ensamblador
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #7 on: June 24, 2018, 07:28:38 PM »
More on basic shapes: circles. Fractal of Apolonio.

And more with Aldus haza. HIEEERBA.
The logic of the error is hidden among the most unexpected lines of the program

Siekmanski

  • Member
  • *****
  • Posts: 1844
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #8 on: June 24, 2018, 08:02:31 PM »
Very interesting routine, thanks.  8)
Creative coders use backward thinking techniques as a strategy.

daydreamer

  • Member
  • ****
  • Posts: 865
  • watch Chebyshev on the backside of the Moon
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #9 on: June 24, 2018, 10:20:07 PM »
cool,thanks 8)
Quote from Flashdance
Nick  :  When you give up your dream, you die
*wears a flameproof asbestos suit*

HSE

  • Member
  • *****
  • Posts: 1059
  • <AMD>< 7-32>
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #10 on: June 25, 2018, 01:21:06 AM »
Very nice  :t

caballero

  • Member
  • *****
  • Posts: 1149
    • abre ojos ensamblador
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #11 on: August 09, 2019, 11:17:33 PM »
Hello, I'm moving my graphic tutos here. A work in progress.
The logic of the error is hidden among the most unexpected lines of the program

caballero

  • Member
  • *****
  • Posts: 1149
    • abre ojos ensamblador
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #12 on: August 15, 2019, 08:18:47 PM »
Plasma made with poasm, 32 and 64 bits
The logic of the error is hidden among the most unexpected lines of the program

caballero

  • Member
  • *****
  • Posts: 1149
    • abre ojos ensamblador
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #13 on: August 17, 2019, 02:26:47 AM »
Hello

I have started the third chapter (palette) with two examples at the moment, if anyone interested. All the compilers have worked well for 32 and 64 bits, except GoAsm for the 64 bits plasma and the palette builder for 32 bits. NasmX also fails for both examples for 64 bits. If anyone find the problem, please, tell me, in other case, I will check it when I have time.

Regards
The logic of the error is hidden among the most unexpected lines of the program

caballero

  • Member
  • *****
  • Posts: 1149
    • abre ojos ensamblador
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #14 on: August 17, 2019, 06:05:42 PM »
Keep working with Palette examples, here a classical bars demo in 32 and 64 bits, made in fasm.
The logic of the error is hidden among the most unexpected lines of the program