Quads

Blitz3D Forums/Blitz3D Programming/Quads

Fry Crayola(Posted 2004) [#1]
I hear this is the best way to achieve 2D using 3D, which is faster and better than any other way. Possibly.

Except I haven't a clue where to start. Are there any guides available, or does anyone have any pointers? Thanks.


Bot Builder(Posted 2004) [#2]
/me imagines frying crayons

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

Here's a single-surface collection including a 2d in 3d system that should work pretty well, and if you want to write your own it shouldn't be to hard to dig out the quad creation commands.


Tom(Posted 2004) [#3]
Hi Crayola,

I've mailed you some old code for doing 2D in 3D, I can't remember exactly who created it, I suspect it was 'JP' (John Pickford?) by one of the graphics file names, does anyone recall the code with Ermintrude the cow graphics? :)

I'm confident the author made it public at the time, if anyone remembers & can shed more light, please let us know!


Cheers
Tom


Fry Crayola(Posted 2004) [#4]
Cheers. I'll play around with that when I get the chance (and get my internet connection at home so I can try it out).

Maybe I'll be able to fire something up this week.


John Pickford(Posted 2004) [#5]
Tom,

Yes that's my code (the one wit Ermintrude). Feel free to use it.

Some people have since told me that rebuilding the mesh each frame is quicker than modifying a fixed mesh (what I'm doing in there).

I might re-work the code with this technique and repost it.


Anthony Flack(Posted 2004) [#6]
My initial tests indicated that modifying the mesh is slightly faster, but that the difference was so negligable, that it really made no practical difference.

I went with the clearing and rebuilding method because it was simpler for my needs.


Fry Crayola(Posted 2004) [#7]
Clearing and rebuilding would be like a CLS command, so it's quite likely I'll go with that and see how the results are. I'd have a function that updates the screen by clearing it, and replacing any graphics in their new position, just like I would using DrawImage.

I also have a lovely sheep, but that's another matter.