Quads
Blitz3D Forums/Blitz3D Programming/Quads
| ||
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. |
| ||
/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. |
| ||
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 |
| ||
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. |
| ||
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. |
| ||
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. |
| ||
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. |