Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sprites in a 3D environment

Status
Not open for further replies.

qbasicking

Programmer
Aug 19, 2001
628
0
0
US
I am working on a sophisticated 1st person shooting game.
The 3D graphics are beautiful, I am using 63-ray raycasting to show a view of 63 degrees, that seemed to be the easy part, I haven't been able to figure out how to display an enemy properly

I have an image of an enemy stored in a 2D array and I want to display it on the screen, I can work out drawing it all at once and at the proper size, but I want to be able to break it down into rays for two reasons - 1st so that it doesn't flicker as much and 2nd so that it shows up correctly if it is halfway hidden by a wall
Any ideas how to do this?



FYI -
I am using screen 13
Each ray is 5 pixils across
I want the sprites 25x25
The raycaster is preprogrammed to do 18.2 frames per second
 
First of all you should be aware of this source:
http://math.artshost.com/1psqb-a8.bas
You can learn many things from it.
You should create an offscreen buffer to avoid flickering.
Well, your question makes me think you are drawing non-textured walls. If you were using thextured walls you would have a routine that reads vertical lines from the texture, rescales them and draws it into screen. That's what you need to draw enemies.
I'm now at work and i can't code here :( So tell me if you would like some source and i'll post it later.


Antoni
 
never mind - i figured out a way to do it

"You idiots, teacher was trying to teach you to be great artists, but you've only learned to be great mimics"
-Unknown taoist artist
Originality is the key to greatness
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top