2D in 3D - Revisited

Blitz3D Forums/Blitz3D Programming/2D in 3D - Revisited

Darkuni(Posted 2004) [#1]
All right .. I've resigned myself never to see transparency in any version of Blitz that isn't 3D :)

So, for us non-lovers of 3D that ONLY want to utilize 3D to tap the alpha/transparency/rotation aspect of 2D graphics, can someone point me to a tutorial, article, code sample of writing a 2D game using a 3D engine for 'effects' only?

I assume there is a way you can make a surface that is 1 pixel thick, the full size of the screen, and write 2D graphics to the surface to "simulate" a straight 2D game. The next step would be putting a 3D "sprite" (no depth required) on TOP of this, 1 pixel closer to the camera, to put particles, rocking text over the top, etc.

I really appreciate any help anyone can offer.


Warren(Posted 2004) [#2]
Check the code archives. There are several examples in there of this very technique.


Yan(Posted 2004) [#3]
Should give ya plenty to play with...

http://www.blitzbasic.com/toolbox/toolbox.php?tool=54

http://www.blitzbasic.com/toolbox/toolbox.php?tool=71

http://www.blitzbasic.com/codearcs/codearcs.php?code=150

[edit]
That last one isn't what I thought it was, although it may still be useful.

JP did a full 2D in 3D system with rotation, scaling and transparency ETC...Dunno where that can be found? :o/
[/edit]

[edit...again]
Found it!...

http://www.retropia.co.uk/SCROLLER.zip
[/edit]


YAN


Darkuni(Posted 2004) [#4]
Thanks guys ... I'm off to check it out!


big10p(Posted 2004) [#5]

for us non-lovers of 3D that ONLY want to utilize 3D to tap the alpha/transparency/rotation aspect of 2D graphics,



Ah, you say that now but soon you'll be saying "I'll just put a spinning cube in the title screen background", then "actually, I could use a simple model instead of a cube" etc. etc. :)

Before you know it, you'll be devoloping a full 3D game! :O


Bot Builder(Posted 2004) [#6]
Well, this is kinda related to imagepacker, but:

http://playerfactory.proboards25.com/index.cgi?board=imagepack&action=display&num=1082995662


EOF(Posted 2004) [#7]
Hi Shane,
See my post under Hobby Programming of classic games on your forum.


BlitzSupport(Posted 2004) [#8]
Use JimB's stuff -- it's perfect for what you want.


Michael Reitzenstein(Posted 2004) [#9]
Ah, you say that now but soon you'll be saying "I'll just put a spinning cube in the title screen background", then "actually, I could use a simple model instead of a cube" etc. etc. :)

Before you know it, you'll be devoloping a full 3D game! :


I think that Shane R. Monroe changes his mind as frequently as he changes his middle initial, so I don't see that happening. :P


Darkuni(Posted 2004) [#10]
Hey, someone has to be passionate about the past, or it will be swept away with me-too FPS games ... :)

3D has its place ... its just not where my heart lies, that's all :)


RiK(Posted 2004) [#11]
I'm with you Shane...

I still love my 2d shooters and classic side-on platformers..

I for one would be a very happy man to see some standardised support for alpha/scale/rotation in blitz, but somehow I think Mark has far higher priorities.


gosse(Posted 2004) [#12]
nSprite (one of the link Yan supplied, and my lib) replicates Blitz' behavior. Only difference is that you have to initialize it and call renderworld afterwards, and use the nS_ prefix ;)
Very (IMO) easy to use, and all the doc is complete, plus the demos should give you a decent idea of how to work with it.
Is is also freeware, even for commercial use :D
http://gosse.proboards19.com/index.cgi?board=nsprite


Orca(Posted 2004) [#13]
Hey, someone has to be passionate about the past, or it will be swept away with me-too FPS games ... :)

3D has its place ... its just not where my heart lies, that's all :)

I still love my 2d shooters and classic side-on platformers..


I Couldn't Agree More! :D


Michael Reitzenstein(Posted 2004) [#14]
I didn't say it was a *bad* thing!


DREAM(Posted 2007) [#15]
Yan , do you still have that
http://www.retropia.co.uk/SCROLLER.zip

file i would love to see it, the link is broken, its 2 years old or if anyone has the file just email me...


Yan(Posted 2007) [#16]
Dunno...I'll have a shufti and send it on if I find it.


DREAM(Posted 2007) [#17]
thanks Yan appreciate it....


QuickSilva(Posted 2007) [#18]
It would be nice to see this added to Blitz 3D in a future update though but like others here I feel this will never happen which is a shame as it seems to be a much asked for feature.

Jason.


cyberyoyo(Posted 2007) [#19]
It's not difficult to do a full 2D in 3D system.
Just create a type to contain the sprites, the type will contain: texture,x,y,velocity_X,velocity_Y,rotation, and handle to the sprite (you can use out-of-the-box B3D sprites) and any other vars you may need.

Then, in the main loop, you iterate through that list and display each sprite at its location.
Of course you'll have to add more functions to make it interesting and it will take some time to have it work properly, but it's not really difficult.


MixailV(Posted 2007) [#20]
Try FastImage library and be happy :)
http://www.blitzbasic.com/Community/posts.php?topic=66995