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

caballero

  • Member
  • *****
  • Posts: 1084
    • 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
En un lugar de la Mancha de cuyo nombre no quiero acordarme

- There are 10 kind of people: those who know binary numbers and those who don't -

caballero

  • Member
  • *****
  • Posts: 1084
    • 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.
En un lugar de la Mancha de cuyo nombre no quiero acordarme

- There are 10 kind of people: those who know binary numbers and those who don't -

Siekmanski

  • Member
  • *****
  • Posts: 1647
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: 929
  • 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: 1084
    • 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
En un lugar de la Mancha de cuyo nombre no quiero acordarme

- There are 10 kind of people: those who know binary numbers and those who don't -

felipe

  • Member
  • ****
  • Posts: 929
  • 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: 1084
    • 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
En un lugar de la Mancha de cuyo nombre no quiero acordarme

- There are 10 kind of people: those who know binary numbers and those who don't -

caballero

  • Member
  • *****
  • Posts: 1084
    • 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.
En un lugar de la Mancha de cuyo nombre no quiero acordarme

- There are 10 kind of people: those who know binary numbers and those who don't -

Siekmanski

  • Member
  • *****
  • Posts: 1647
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: 533
  • reach for the stars
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: 807
  • <AMD>< 7-32>
Re: SWGPTG - 02 - Drawing Basic Shapes
« Reply #10 on: June 25, 2018, 01:21:06 AM »
Very nice  :t