Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
Say I would like to create a space invaders game. I want to have a list of aliens, enemies, bullets, and other objects, that each have an assigned ID (as I assume this is how it's done in real games) then assign them to a list of currently in-use objects that can be changed at any time. I'm assuming you'd need Copy commands to set up a list, but I really don't know. There doesn't seem to be an ICE tutorial on this. Any help appreciated!Smile
Use the CopyData command to send data to a list. You don't have to create your own list, you should utilize L1-L6, the 6 default lists on your calculator. No need to have an id for each invader, just have a type, an x, and a y. So that's three bytes for each. Here is an example of copying data for the invaders:

Code:
//type = 0, x = 10, y = 15
//the 1 is because you are using 1 byte values
CopyData(L1, 1, 0, 10, 15
//now, to add a second one, you have to increment the L1 pointer by 3 bytes
CopyData(L1 + 3, 1, 0, 5, 25
  
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