Author Topic: Boing2  (Read 12949 times)

0 Members and 1 Guest are viewing this topic.

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Boing2
« on: October 09, 2008, 10:52:50 PM »
Do you remember that?

To stop it, catch the ball and press ESCAPE.

...
« Last Edit: August 09, 2011, 10:00:16 AM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Petr Schreiber

  • Sr. Member
  • ****
  • Posts: 411
Re: Do you remember that?
« Reply #1 on: October 10, 2008, 08:17:05 AM »
Amiga? :D

Worked well on WinXP SP2.


Petr
AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3

psch.thinbasic.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Re: Do you remember that?
« Reply #2 on: October 10, 2008, 09:29:13 AM »
Here is a screen shot on my computer.



Your graphic card must be full OpenGL compatible, i am using these settings for ambient light:

Code: [Select]
                  DIM LightAmbient(3) AS SINGLE:  ARRAY ASSIGN LightAmbient()  = 0.05, 0.05, 0.05, 1.0
                  DIM LightDiffuse(3) AS SINGLE:  ARRAY ASSIGN LightDiffuse()  = 1.0, 1.0, 1.0, 1.0
                  DIM LightPosition(3) AS SINGLE: ARRAY ASSIGN LightPosition() = -0.20, 0.20, 0.20, 0.7
                  CALL glLightfv(%GL_LIGHT0, %GL_AMBIENT, LightAmbient(0))      ' Setup The Ambient Light
                  CALL glLightfv(%GL_LIGHT0, %GL_DIFFUSE, LightDiffuse(0))      ' Setup The Diffuse Light
                  CALL glLightfv(%GL_LIGHT0, %GL_POSITION, LightPosition(0))    ' Position The Light
                  CALL glEnable(%GL_LIGHT0)                                     ' Enable Light ZERO
                  CALL glEnable(%GL_LIGHTING)                                   ' Enable Lighting
                  CALL glEnable(%GL_COLOR_MATERIAL)                             ' Enable Coloring Of Material

Also your display must be running in 32-bit mode and the "Boing.png" must also be in 32-bit (alpha channel).

Anyway, i have provided the source code, to let you play with the settings.

Added:
I just checked on my Compaq Presario first Dual Core generation running Windows XP SP2 and ATI Radeon X600 Series, and it works like a charm, with a 24% CPU footprint.

Note: Due to the way i am using the timer, the animation is very cooperative with other application, because it is the OS that shares the time between each process, thus the 24% CPU is just informative and you won't see any impact on your other running applications.

...
« Last Edit: October 10, 2008, 09:56:42 AM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Emil Weiss

  • Guest
Re: Do you remember that?
« Reply #3 on: October 12, 2008, 12:18:36 PM »
sorry i hope i can tell here ;)
can you say me what you do with this?

Code: [Select]
    FOR P = (nWidth * nHeight) TO 1 STEP - 1
           @pBits[3] = A?
           @pBits[2] = R?
           @pBits[1] = G?
           @pBits[0] = B?
           pBits = pBits + 4
    NEXT

i think pBits is a pointer of byte = PByte
no idea can translate it to Delphi
this is a array in Delphi pBits[3]

i hope anybody can help me

greets Emil

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Re: Do you remember that?
« Reply #4 on: October 12, 2008, 09:00:43 PM »
Yes, pBits is a pointer of byte.

See also my zColorARGB API, and PowerBASIC Poke and Poke$.

I thought you were moving from Pascal to PB ;)

...

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Emil Weiss

  • Guest
Re: Do you remember that?
« Reply #5 on: October 13, 2008, 04:15:27 AM »
Yes, pBits is a pointer of byte.

See also my zColorARGB API, and PowerBASIC Poke and Poke$.

I thought you were moving from Pascal to PB ;)

...



Thanks Patrice..
i will show how work the Skin in Delphi :)

greets Emil

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Re: Do you remember that?
« Reply #6 on: October 13, 2008, 09:30:48 AM »
Quote
i will show how work the Skin in Delphi

My code is compatible with any 32-bit compiler and even managed languages, as long as you keep using the low level FLAT API to preserve the portability.

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Emil Weiss

  • Guest
Re: Do you remember that?
« Reply #7 on: October 13, 2008, 12:32:23 PM »
Quote
i will show how work the Skin in Delphi

My code is compatible with any 32-bit compiler and even managed languages, as long as you keep using the low level FLAT API to preserve the portability.



yes ;)
i hard translate to Delphi.
i have tell many ofters you are a good programmer (like Genius)
that comes from hearts

greets Emil

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Re: Do you remember that?
« Reply #8 on: October 13, 2008, 05:13:28 PM »
Here is a new texture to replace the default boing.png.
(Better to save the original in case ou don't like it).
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Emil Weiss

  • Guest
Re: Do you remember that?
« Reply #9 on: October 13, 2008, 05:24:06 PM »
Here is a new texture to replace the default boing.png.
(Better to save the original in case ou don't like it).


Show better as Amiga Boing ;)

greets Emil

Emil Weiss

  • Guest
Re: Do you remember that?
« Reply #10 on: October 14, 2008, 07:36:10 PM »
Here are a few new textures to replace the default boing.png.


Do you make this all self ?
Please which grafik Application your use ?

think adobe Photoshop not to good for PNG

greets Emil

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Re: Do you remember that?
« Reply #11 on: October 14, 2008, 08:11:42 PM »
Quote
Please which grafik Application your use ?

PhotoShop...

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Re: Boing2
« Reply #12 on: August 09, 2011, 10:05:25 AM »
The first post of this thread has been updated, to fix the ZIP file corruption caused by the "Server Collapse".

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Boing2 revival
« Reply #13 on: December 16, 2014, 10:16:18 AM »
This version is a reworked version of the first post of this thread.

It has been updated to work with PB 10, and it is provided as an example of low level SDK programming producing a small resulting EXE of 27648 bytes.

Note: press the escape key to shut it down.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2391
  • Gender: Male
    • www.zapsolution.com
Re: Boing2
« Reply #14 on: April 25, 2017, 07:09:42 PM »
Here is a reworked version of the C++ 64-bit, showing the mixing of a 2D image altogether with a 3D OpenGL.
http://www.objreader.com/index.php?topic=92.0

Note: this a 19 Kb TCLib version

This code has also been posted on codeproject, but from the first rate, it seems that some people do not care anymore about small exe size  ;D
https://www.codeproject.com/Articles/1183876/Boing
« Last Edit: April 25, 2017, 07:15:14 PM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com