Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
So I am trying to make a ray casting game using ICE. The only problem is I canít figure out how to display textures on to the walls. If you did not know ray casting is a technique to make a 2D map into a 3D world (for more information look at the wikipedia article). Long story short, I need to make each splice of a the wall textured. So far I have the 16 by 16 image saved to a sprite on my calculator and I need a way to take each splice of the image and display it onto the wall.

Question: How do I split up the sprite into multiple pieces/splices to display to my screen? Remember these splices have to be display at different hight and are one pixel wide.

What I have considered:
I have considered splitting the one 16x16 sprite into 16 different sprites that are 1 pixel wide and are 16 pixels high. This would not work because to texture the walls I would need to input the x value of the block slice location and get out the corresponding x value texture. The variables for the pointers to the sprites canít be used to find the x position for the wall texture.
Sorry if this sound a bit confusing. I am kinda new to this.
Capspop wrote:
Long story short, I need to make each splice of a the wall textured. So far I have the 16 by 16 image saved to a sprite on my calculator and I need a way to take each splice of the image and display it onto the wall.


I'd suggest a tilemap instead of a sprite. A tilemap is a bunch of sprites [tiles] put into one big "map", making a {tile}{map}. This solution will make higher-res wall textures with a tiny performance drop, and a smaller programme size [I think?].

As for implementing this, I do not know, As I've never used ICE to any great extent, but I'm sure someone else on this forum could help you a lot with implementing a tilemap
Izder456 wrote:

I'd suggest a tilemap instead of a sprite.


Is it possible to resize the tilemap and display the tiles at random intervals?
Capspop wrote:
Is it possible to resize the tilemap and display the tiles at random intervals?


I don't really know, but when there's a will, there's a way.

You'd have to ask someone else; as I said, I never really gotten into ICE programming.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement