-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|509|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Showcase Home -> Functions Libraries


 
Jayenkai
Created : 20 February 2008
 
System : Windows
Language : Blitz

Blitz 2D in 3D (v2)

2D sprites in 3D.

2D in 3D v2
OK, I used this in Alien Deathmatch so things are getting nice and useable now.
For starters, you no longer have to keep track of things yourself.

What you can do.. Set sprite sizes, rotation and drawing color (+alpha if needed), then drawsprite texture,x,y,frame

Nice and easy.

Just be sure you don't go overboard!

If you want to up it's max sprite limit, you can tweak the 2Din3D source. The MaxSprites global is near the bottom of the first page of source.

I should probably also point out that there's a tilemap thing in there, but it's a bit dodgy right now, and you should probably ignore it!!
It works "enough" just not 100% perfectly.

I also included the imagefont loader and display routine, that can draw the imagefont as even more 3D sprites.
I should probably add more functions to the text display, but right now it just plain throws out the text!

A nice example is included, just open it up and run it in Blitz3D and you should be able to figure out how to use it for basic graphics.

Latest Update

Obviously I need to fix the Tilemap thing. I'm working on figuring out how to get it all working nice and swiftly.
..
Not sure how!

Other than that, you should probably be aware that there's NO collision detection in here, so you're left to your own devices for that.

More might be done, it depends if I decide to use it again.

 

Comments


Wednesday, 20 February 2008, 17:39
dna
This does not run in B2D. Was it not supposed to?
Wednesday, 20 February 2008, 17:52
Jayenkai
No, it's meant to run in Blitz 3D. It uses Blitz3D commands to create lots of little squares with textures on, that act like 2D sprites.
Wednesday, 20 February 2008, 17:56
power mousey
it looks really great.
and runs really cool and spinning psychotically.

And congratulations on writing all those functions for your library. In the include file of 2Din3D.bb

Beep!