A shot from little game that I've ported from DB classic (3D) to Playbasic (2D).
It's called Quintrow.
(http://members.lycos.co.uk/sotmailings/shot1.jpg)
Nice, I guess I should remove the default 'show fps' thing.. What sort of features are you using ?
Btw, I finally added a sub domain for the Play home page the other day too.
www.PlayBasic.com (http://www.playbasic.com)
Well, in the end I ended up copying and pasting most parts from the original script. So I neither used user defined types nor other
more advanced things. However, some of PB's stuff (globals, scope) made the code a bit easier to read and shorter.
QuoteBtw, I finally added a sub domain for the Play home page the other day too.
www.PlayBasic.com
You should update the feature list ;)
No dramas, as long as it still runs ok..
Updating the feature list is pain.. So that must be Kohai's job :)
Yeah it works perfectly. The AI even runs a tad faster in PlayBasic.
I wonder why that is ?.
Got some good ideas about speeding up various write to the same array/type. I think some of those little tidbits could do wonders to most programs. Although it might help if i opt'd the VM a bit more . But anyway
With this game I think it's mainly because of the Loop speed.
Try this with DBC and then with Play:
Text 10,10,"Press a key to start"
wait key
t = timer()
for i = 1 to 1000000
x = i
next i
delta = timer()-t
text 10,30,str$(delta)
waitkey
BTW we need a flushkey command in Play ;)
I have a better algorithm (minmax) that relies heavily on loops. Might be worth trying it in Play.
Just looked at the forums total post count and had to have post 1000 :)
Right so it's loop heavy. I've a few little ideas for giving For/Next a little more speed, but if you use Do/DecLoop for fixed loops, their generally faster again. However the counter loops backwards from the Max value to zero.
I could build in a IncLoop version. It'd count the Left Param to the Right Param. For run time speed though, it couldn't use expression after the command. But it'd be perfect for For/Next situations..
So the WaitKey falls through both ? . There's a WaitNOkey also. Prolly Should have a param for WaitKey though also. Perhaps a "until to released flag' or something.
QuoteJust looked at the forums total post count and had to have post 1000
Good, but leave the 10000th post to me, ok? :)
QuoteI could build in a IncLoop version. It'd count the Left Param to the Right Param. For run time speed though, it couldn't use expression after the command. But it'd be perfect for For/NExt situations..
Yeah that might be useful.
QuoteSo the WaitKey falls through both ? . Theres a WaitNOkey also. Prolly Should have a param for WaitKey though also. Perhaps a "until to released flag' or something
Ah, didn't notice WaitNoKey. That'll do.
QuoteGood, but leave the 10000th post to me, ok?
ok :P, but I think we'll need more people for that to ever happen..