can blitz3d use to make 2d games?

Blitz3D Forums/Blitz3D Beginners Area/can blitz3d use to make 2d games?

sec05(Posted 2006) [#1]
hi, want to ask, is it possible to use blitz 3d to make a 2d game? I know it's weird but then I was thinking of making a game that has a compilation of both 2d and 3d games.

For the 2d game, the main gameplay uses the mouse to click and drag objects across the screen. Just wondering, can blitz 3d does that?

Thanks alot for your time!


H&K(Posted 2006) [#2]
I did it when practicing by turning off perspective and using a fixed camera. (ie a 3d game that looks 2d). I cannot remember how I did it, (but I think It was just a flag when the camera was created)


Ricky Smith(Posted 2006) [#3]
Blitz3d has the entire 2d command set of BlitzBasic - so yes you can create a 2d game with Blitz3d and you also have the advantage of HW accelerated 2d in 3d.


mindstorms(Posted 2006) [#4]
I am fairly sure that 2d in Blitz3d is alot slower than 3d...


Pongo(Posted 2006) [#5]
Yes, Blitz3d is very capable of 2d performance.

It is not that 2d is slow, it is that graphics card manufacturers have put EVERYTHING into accelerated 3d performance and nearly nothing into 2d display speed for several years now.

In any case, the only really slow things for 2D are individual pixel plotting, which should be avoided if possible, and image rotation, for which you should pre-calculate anyways.

If you are just starting out, Blitz will allow you to have hundreds of 2d images flying around the screen (all in 2d) without much trouble, and this will be more than enough for any basic 2d game, platformer,... whatever.

Once you know a bit more about it, you can move the 2d into 3d to be able to take advantage of the 3d cards performance. By doing this, you can gain the advantage of realtime scaling and rotation to your sprites, as well as the use of alpha, transparency and blending modes like additive, but you will lose the pixel perfect collision that you had in 2d. There are, of course ways to get this back (check the code archives to see some of these)

Anyways,
short answer: 2d is plenty fast and you can get things going with very little code or knowledge about blitz
long answer: 3d accelerated 2D is faster, but a lot more work.


jhocking(Posted 2006) [#6]
yes

yes


Farflame(Posted 2006) [#7]
My entire game I'm working on is in 2d without a single 3d command. It's a Soccer management game - very text heavy, without much animation. The screens are updated constantly though - all the text and graphics (icons, background, some small images) are refreshed 50 times or so per second. Blitz3d has very good 2d performance :)


H&K(Posted 2006) [#8]
@FarFlame
Why?
The screens are updated constantly though - all the text and graphics (icons, background, some small images) are refreshed 50 times or so per second

Do you just mean the screen flips 50times a second. Or do you mean you actualy redraw each part of the screen "from virgin"

I only ask, because in my "thing of the moment", I too am simply "re doing" the whole screen each frame, irrelivant of whether ANY of the screen has changed.

I was thinking of implimenting a "Static-ish" screen which I would Blitz onto the backbuffer, but I havent bothered yet, because so far it hasnt been nesesaray to try and "claw" back any CPU time.

And so I was just wondering if it was a deliberate program design on your part?


Farflame(Posted 2006) [#9]
Now you mention it, you're right. I don't refresh the entire screen every frame because it started to cause the mouse pointer to become 'heavy'. I should point out that some of my screens are completely full of text (at 1024 * 768) and have about 10 graphic icons aswell as a full-screen background, so it was asking alot.

So in the end I did what you suggested - I put the static screen into a buffer and flip that every frame instead, and then just update the mouse pointer each frame. Also the entire bottom 1/3 is updated every frame because I have a scrolling text area there. And of course if the manager alters the screen in some way, the entire thing is changed.

But I have to say, even at it's very worse when updating everything, every frame, it wasn't too bad - nothing a new computer wouldn't have fixed :)


Ross C(Posted 2006) [#10]
Why not use triple buffering type thing? This is where you have an image the size of the screen. But, instead of drawing directly to the backbuffer, you draw straight to the image buffer. This way, all you need to do, is draw the big image every frame, which is super quick in blitz.

When you want to change everything, redraw everything, including your changes to the image buffer.


Farflame(Posted 2006) [#11]
Yeah that's what I do, probably didn't explain it very well.


Blitzplotter(Posted 2006) [#12]
@Ross C, very well put, I hadn't grasped the concept of this until reading your post. cheers.


Rook Zimbabwe(Posted 2006) [#13]
Blitz3d has the entire 2d command set of BlitzBasic...
Well except for the GUI primativews I thought they were not in there (though they should have been!!!
My $0.02: I go with the fixed board and fixed camera position...


LineOf7s(Posted 2006) [#14]
Blitz3D has no GUI elements. Blitz+ has that.


Damien Sturdy(Posted 2006) [#15]
I do need to point out that my old Blitz 2D platformers currently perform much better on my old celeron 1.2ghz, intel onboard than they do on my current A64 2X4200+ with an ATI x1300.

Hardware manufacturers seem to be pulling the 2d accell stuff out in preference to hardware accelerated 3D.


Rook Zimbabwe(Posted 2006) [#16]
If you are looking for 2D I do suggest BMax... use Grey Aliens framework as well... OR you can do it in B3D the simpler way but you will have to hard code (or borrow from TOOLBOX) GUI primatives like BUTTONS etc... I used only a few of them for SLOTZ! but used 3D models as well.

My only problem was the nVidia cheat... the irregular textures error and the number of polygons... (dang! thats a lot!!!)


Boiled Sweets(Posted 2006) [#17]
Or you could use Sprite Candy with Blitz3d.

Yes the Sprite Candy police are alive and well :-)


Rook Zimbabwe(Posted 2006) [#18]
Sprite Candy is VERY GOOD as well... yes... (does this make me a Sprite Candy Stoolie???)


Reactor(Posted 2006) [#19]
Yep, Sprite Candy is great... and it now comes with a GUI enhancement, which makes it extra special ;)