Thanks Petr what a fantastic learning example.
On my PC it is too fast. I've added a SLEEP 1 just before WEND in main game loop in order to be able to move and fire.
Roberto will like it.
wow
Hi,
although 3D module for thinBASIC could be used for more serious problems, it's useful for games too.
In this thread you will meet some thinBASIC games during some time.
I'll start with very simple example - space shoting game.
In this game you have to control small spaceship captured by wormhole.
Your only job is to shoot the dangerous flying boxes to achieve better score.
This game was tested with thinBASIC 1.0.6.4 and with TBGL module version 0.1.5
Enjoy,
Psch
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Thanks Petr what a fantastic learning example.
On my PC it is too fast. I've added a SLEEP 1 just before WEND in main game loop in order to be able to move and fire.
Roberto will like it.
wow
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Hi,
I'm happy you like it. It's just the beginning
you have computer from NASA ?On my PC it is too fast
... and I thought I had to optimize the code even more
Yes, the not existing "constant speed" setup is my fault.
It's easy to add ( all movements in the scene will be dependent on current framerate ).
I'v updated the sample. If you have time, please let me know if it works.
Thanks,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Yes, it's from NASA .
That's the reason why
FrameRate = (1/(ThisTime-LastTime))*1000
"gives division by zero" error
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Oh, these NASA computers
Silly me
I was afraid of this issue, the only solution which occurs to me now is:
FrameRate = (1/(ThisTime-LastTime+0.001))*1000
I know it's nasty a bit, but it should work even on NASA boxes .
Thanks a lot, I'll update the file again,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Working fine, now.
I'm not in front of my NASA pc now.
In current PC (P4 2.8Gh, 1Gb RAM) frame rate is 65.
I will let you know frame rate on NASA one later.
Ciao
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Thanks for info,
I'm getting the 65 - 100 FPS too on my box ?! ( Duron 850MHz, 320 MB RAM, Radeon 9600 @ WinME ). I'v discovered that XP's "eats" some performance in some cases - but not in case of your NASA one
Thanks,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Well I think the hard work is done by the OpenGl driver and the graphic card.
My NASA box is an AMD Athlon 64Bit 3700+. It very fast. Graphic card is a Radeon x600 pro with 256Mb and here SpaceShooterGame.tBasic runs at a fixed 100Fps .
Good work.
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Well, that's really NASA configuration !
You're right about the OpenGL driver and graphic card. In the early times of XP's the drivers were bit weak, so that was the XP-performance-eater cause.
Now it seems OK, we'll see what kind of surprises the Windows Vista will bring
Thanks,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Hi Psch,
I'm amazed, great!
It's very exciting build it a bit at time isn't it?
Bye,
Roberto
http://www.thinbasic.com
Bookmarks