Page 1 of 1
Sprite3d Functions
Posted: Sun Sep 24, 2006 11:02 am
by Steve Elliott
The Sprite3d functions are far too slow.
Sadly, functions for game production in general are either too slow or are missing. Features such as analogue joystick support and LoadAnimSprite for animation (several animation frames loaded as one sprite).
So while PureBASIC is superb for application writing, for games it's not so hot. A pity because it's a lovely language to use.
Posted: Sun Sep 24, 2006 11:32 am
by djes
Sprite3d functions are fast, why do you say that? I'm working on games for a while, and I have no problem!
And for joystick, you have the joystickex userlib on
http://www.purearea.net/pb/english/index.htm
Posted: Sun Sep 24, 2006 12:07 pm
by Steve Elliott
Because I compared them to the equivalent BlitzMax command - over 3 times the speed.
Posted: Sun Sep 24, 2006 12:15 pm
by nco2k
have you used Start3D()/Stop3D() and turned the debugger off?
c ya,
nco2k
Posted: Sun Sep 24, 2006 12:35 pm
by Steve Elliott
Yes.
Posted: Sun Sep 24, 2006 12:50 pm
by djes
Your needs are really extensive! Could you send us your benchmarks, it would be usefull.
Posted: Sun Sep 24, 2006 1:02 pm
by Steve Elliott
347 FPS - PureBASIC
1105 FPS - BlitzMax
Posted: Sun Sep 24, 2006 1:26 pm
by Flype
in my humble opinion - if you think it's slow it's more a programmer-side error than a purebasic limitation.
when i saw what can be done by polux and his team (for example Lethal Judgment III from BGames :
http://www.bgames.org/) it seems that purebasic has no speed problem when correctly coded.
but well, i don't know, maybe you're right.
we need a code sample (one for pb and another one for bb with the same visual result) to compare/benchmark.
then, from the pb sample code, polux or others guys can explain how to make the result faster with purebasic.

Posted: Sun Sep 24, 2006 3:08 pm
by Steve Elliott
Lethal Judgement III uses very little Sprite3d function calls - all my sprites are alpha blended 3d sprites running at 1280 X 1024 32bit colour.
It's a chess game so I can get such high FPS - 347 FPS for PureBASIC is quite high, but obviously there is room for improvement.
Posted: Sun Sep 24, 2006 3:56 pm
by dracflamloc
Why don't you give us the actual code for the benchmark and we can tweak it.
Posted: Sun Sep 24, 2006 7:13 pm
by Steve Elliott
There's no code to tweak - just a static chessboard and pieces being drawn using sprite3d commands.
PureBASIC has threads and can produce DLLs - BlitzMax can't. It is also better for writing application software than BlitzMax - but the simple fact is it's not quite as good for game related programs at this time (no language is perfect).
Posted: Sun Sep 24, 2006 9:24 pm
by chris_b
Steve Elliott wrote:There's no code to tweak
In Windows version of PureBasic it's possible to call Direct3D's triangle drawing functions directly in conjunction with the standard OpenScreen(), InitSprite3D(), CreateSprite3D() functions.
This can give a quite a significant performance boost especially if you have, say, a bunch of sprites on a single bitmap (eg. 16 different 64x64 sprites on a 256x256 texture).
Posted: Sun Sep 24, 2006 10:32 pm
by Joakim Christiansen
I agree, it can be a little slow.
But I haven't testet it against other languages.
Posted: Mon Sep 25, 2006 3:48 am
by coma
Steve Elliott wrote:There's no code to tweak - just a static chessboard and pieces being drawn using sprite3d commands.
PureBASIC has threads and can produce DLLs - BlitzMax can't. It is also better for writing application software than BlitzMax - but the simple fact is it's not quite as good for game related programs at this time (no language is perfect).
do you use only one start/stop3D() in your drawing loop ?