Perfect! All working fine now. Frame rate is very high.
Mike, this is also a perfect example demonstrating how TBGL can also do 2D games.
Ciao
Eros
Thanks for the explanation. I'll make the modifications soon.
Perfect! All working fine now. Frame rate is very high.
Mike, this is also a perfect example demonstrating how TBGL can also do 2D games.
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
Mike,
for fun I set %MaxShots to 20 and get Runtime error at line 603. Line 603 is
[code=thinbasic]
for j = 1 to %maxShots
[/code]
but should be
[code=thinbasic]
for j = 1 to %MaxSmoke
[/code]
Also, because you are generating random numbers in your script, add a RANDOMIZE command at the beginning, so random generator will generate different sequences.
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
Mike,
I've made a little variation adding specific and different turning angles and speed to every plane. See attached file with full source code.
Mainly, tPlayer UDT is the following:
[code=thinbasic] Type tPlayer
X as double
Y as double
dir as double
damage as double
speed as double
img as long
vic as long
TurnLeft as long
TurnRight as long
SpeedUp as long
SpeedDown as long
end type[/code]
Than tPlayer setup inside SetupPlayers sub is something like:
[code=thinbasic] Player(1).x = 90
Player(1).y = yres/2
Player(1).dir = 0
Player(1).speed = 2
Player(1).img = 1
Player(1).TurnLeft = rnd(60, 200) '---Generate random turning angle
Player(1).TurnRight = Player(1).TurnLeft '---Put the same as left but can be different
Player(1).SpeedUp = rnd(3,7) '---Generate random max speed
Player(1).SpeedDown = 1 '---Min speed is always 1
Player(2).x = xres-90
Player(2).y = yres/2
Player(2).dir = 180
Player(2).speed = 2
Player(2).img = 2
Player(2).TurnLeft = rnd(60, 200) '---Generate random turning angle
Player(2).TurnRight = Player(2).TurnLeft '---Put the same as left but can be different
Player(2).SpeedUp = rnd(3,7) '---Generate random max speed
Player(2).SpeedDown = 1 '---Min speed is always 1[/code]
New parameters are than used inside CheckKeyInput and CheckJoyInput subs.
Consider that a possible evolution is to add some bonus (positive or negative) during game execution that will change turn angle and speed for every plane.
Hope you will like.
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 Eros, I saw that yesterday too.Originally Posted by ErosOlmi
And thanks for the mod, I plan on having several different planes to choose from for the player. With different values. But your mod could be a RANDOM plane. Good idea!
Perfect Mike.Originally Posted by Michael Hartlef
Remeber to keep updated first post of this thread with your latest version of AirDogs 1942. When I will finish filling new thinBasic web site with initial minimum content, I would like to make a dedicated gaming area and AirDogs 1942 is a perfect choice to start with, if you like the idea.
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
Don't forget TopDown3D.
I cant get it to run it complains about "%TBGL_Tex_ANISO" have i missed a TBGL update?
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Abraxas,
yes you did
You can wait till next thinBASIC preview release ( I think quite soon ) or grab it here.
It features mentioned anisotropic filtering and color masking for BMPs; more mini-patch than real new version.
Bye,
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
Of course, how can I forget all the Bonus Pack examples all of you have created.Originally Posted by Michael Hartlef
Ideas for the web are a lot, time a little less
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
Bookmarks