• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Boing2

Started by Patrice Terrier, October 09, 2008, 10:52:50 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Patrice Terrier

Do you remember that?

To stop it, catch the ball and press ESCAPE.

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

Petr Schreiber

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

Patrice Terrier

#2
Here is a screen shot on my computer.



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

                  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.

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

Emil Weiss

sorry i hope i can tell here ;)
can you say me what you do with this?

    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

Patrice Terrier

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

Quote from: Patrice Terrier 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 ;)

...



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

greets Emil

Patrice Terrier

Quotei 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

Quote from: Patrice Terrier on October 13, 2008, 09:30:48 AM
Quotei 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

Patrice Terrier

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

Quote from: Patrice Terrier 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).


Show better as Amiga Boing ;)

greets Emil

Emil Weiss

Quote from: Patrice Terrier on October 14, 2008, 05:32:03 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

Patrice Terrier

QuotePlease which grafik Application your use ?

PhotoShop...

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

Patrice Terrier

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

Patrice Terrier

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

Patrice Terrier

#14
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
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com