Questions about making a 2D platformer
Blitz3D Forums/Blitz3D Beginners Area/Questions about making a 2D platformer
| ||
I'm not so new - I used to be a die-hard Blitz Basic coder - but I've been away from it for years and have just gotten back into it. This time, I'm using Blitz3D instead of classic Blitz Basic. I'm resuming a platform game project I started years ago, and because I'm new to Blitz3D I have a couple of questions: - I'm thinking about using sprite for the player and enemy characters. Is it possible to "flip" the sprites to simulate facing left and right? - I would possibly want to be able to zoom in and out of the game map, possibly with rotation (á la Mode 7). How could I do that? Many thanks. |
| ||
Just scale the texture minus 1.ScaleTexture texture,-1,1 And yeah, it would be possible, and very easy in 3d, to do this. However, the rest of your game will have to be in 3d for this to work. |
| ||
Thank you! |
| ||
Here comes the inevitable question: how can I draw a 2D map in 3D mode? I haven't been able to find any examples. It's a tile-based map by the way. |
| ||
You need to first draw the image, then, ensure your cameraclsmode is set so it doesn't clear the buffer when it renders. You should look out for a sprite lib called nSprite 2. Great this kind of thing, because it uses 2d co-ords and acts just like 2d mode. |
| ||
I found a solution just a while ago; will try what you've suggested. Basically I created a texture, drew the entire map onto it and then assigned the texture to a sprite. (Though it only shows part of the map!) I'll also check out this nSprite 2 library; I know there's a few of those floating around. |
| ||
It just makes the whole process easier. Why code a whole way of doing this, when one already exists :o) Saves you lots of time and lets you concentrate on actually making your game. Oh, and remember your textures must be dimentioned on powers of 2. eg: 1,2,4,8,16,32,64...etc 512,1024 2x16 32x256 512x128 etc etc And try and keep the ratio 8 to 1 for the sizes if using a different sized dimensions for your texture. Older video cards have problems, or introduce scaling if you don't adhere to the above. |