2D is much faster in D3D than in DDraw. PB's 2D uses which?

Advanced game related topics
fmcpma
New User
New User
Posts: 9
Joined: Fri Dec 17, 2004 5:21 am

2D is much faster in D3D than in DDraw. PB's 2D uses which?

Post by fmcpma »

:)
coma
Enthusiast
Enthusiast
Posts: 164
Joined: Fri Aug 15, 2003 3:46 am
Location: Canada

Post by coma »

I think that pb use ddraw for classic sprites and d3d7 for sprite 3d.
to be confirmed.
fmcpma
New User
New User
Posts: 9
Joined: Fri Dec 17, 2004 5:21 am

Post by fmcpma »

I'd really like to know. I need to choose a Basic for games programming. If PB uses DDraw for 2D sprites, I'll have to go for DarkBasic (stupid name or what?)
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Reading the manual helps :) I, too, made the mistake not reading it before asking questions on these forums :)

Sprite2D uses DirectDraw. but hardly anybody uses sprite2d these days .. so... use Sprite3D, much better, pretty much the same other then the 256x256 or so restriction :)
User avatar
Comtois
Addict
Addict
Posts: 1432
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Post by Comtois »

fmcpma wrote:I'd really like to know. I need to choose a Basic for games programming. If PB uses DDraw for 2D sprites, I'll have to go for DarkBasic (stupid name or what?)
Download demo-version of PureBasic 3.92 and compare 2D speed by yourself !

I'm sure it's more faster than darkbasic ?
Please correct my english
http://purebasic.developpez.com/
fmcpma
New User
New User
Posts: 9
Joined: Fri Dec 17, 2004 5:21 am

Post by fmcpma »

Actually, the manual refers only DirectX for the sprites, it doesn't specify whether D3D or DDraw. It does imply that Sprite3D uses D3D, but also says these are actually slower :(

As for testing myself, alas, I cannot, because one of the "features" of the demo version, as stated by the author, is that the debugger is always compiled in and therefore executables are very slow :(

It seems, then, that I will have to look somewhere else for a really fast (and humanly understandable -- not considering things like C) language for 2D games programming. It's a pitty, because PB seems to have so many nice features :(

Thanks for the replies, though :)
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Take some advice from me: Purebasic even if it does use Ddraw is a hell of alot faster than DarkBasic. I bought DarkBasic first and the language is extremely buggy and IMHO just worthless. The engine they use is quirky and poorly written. TGC never updates the software and when they do they are more likely to break stuff rather than fix it. PB = Best bang for the buck. I got PB after DB and its really so much faster and its good for more than just games too. DBP doesn't even have real networking support. PB's networking is very easy and quick.

I wrote a few 2D games in DB before switching to PB and once I converted... the difference was amazing.

Also note that a typical DB exe even for a small program is 5000KB+ (no, thats not a typo) in size. PB is usually less than 100KB

Another thing to note is you can use PB to compile for Linux and AmigaOS.

As far as simplicity goes, the commands in DB seem simpler because they are things like "make sprite 1,"./sprite.bmp"

But note that commands in DB have spaces. In a large program this can become extremely confusing as many variable names you'll find yourself using are the same as portions of certain commands, which can create a big mess.

Also, DB does not have multithreading, which while not essential, can help you make your game much more advanced in the future.

Another BIG thing to note is that currently DB's debugger is totally and completely broken. It crashes right when you try and use it. TGC says they are fixing it but it's been quite a few months now with no word on progress.

My best advice however is to: Download both demos, create a quick stress-tester by loading and displaying and moving lots of sprites all at once on both languages and see which is faster. It's the best way to truly know.
fmcpma
New User
New User
Posts: 9
Joined: Fri Dec 17, 2004 5:21 am

Post by fmcpma »

Thank you very much for your informative post.

You got me thinking again about PB. But! I cannot, using the demo of PB, get a half decent number of sprites moving at the same time. The frame rates soon falls dramatically. I assume this is because of the debugger being compiled in with no way to switch it off (in the demo). Now, my PC is a lowly thing (PIII, 750 Mhz), granted, but I had a demo (written in BlitzBasic, in this case) running in it and moving 400 sprites at 60 FPS with no frame drop.

What I really want is something that lets me do a 1024x768x32 full-screen multy-layer parallax scrolling game with lots of large sprites moving around @60 FPS. On a top of the range PC, of course. Now, can I do this in PB? Is there a game or a demo written with PB that shows this off?

Thanks for any advice.
Post Reply