I'm trying to make a pokemon game, but cant figure out how to do a side scrolling game. Can someone help and give me pointers? Also, if you could estimate how much time and RAM it would take, that would be awesome.
I haven't really thought of a way to do active scrolling, but the "room" scrolling is something I have used, so here is some help:

Code:

prgmPOKEMON:
1->A:1->B //X,Y coordinates inside of each room
1->M:1->N    //X,Y coordinates of what room the user is in, if you are going to do upstairs and downstairs in buildings you can add a third variable, although I won't for this right now.
//call prgmMAP
prgmMAP
//Key loop, make a loop that when pressing arrow keys it moves, figure out how to make this loop before I can help you with collision detection. Post if you need any help making a key loop; should follow this rough outline:

Repeat K=45 (ends if key is clear)
getkey->K
//this is the easy way without worrying about using an advanced boolean trick.
If K=24 (left) and A/=1 (does not equal 1): Then
blah: A-1->A
end
ETC!!!
end
--------------------
prgmDMAP:
//Need a string for the room!
If M=1 and N=1: Then
"blah blah -> str1 //make a ASCII room to your liking that fits in 8x16 number of characters (the size of the homescreen!)
#->A:#->B //where you want your character positioned for this room.
end
//Time to draw now that you have the correct map
output(1,1, str1
output(B,A, "X   //or whatever character you want.

//Note: Draw map, I personally would use a subprogram for this whole get map data and draw, but I know tifreak would choose otherwise. Then again this is a really basic example, so here it is.


Sorry If this is confusing, I would have grabbed some code from one of my projects but I have to leave the house.
thanks!
Wow, go procrastination. I have just had the inspiration to make a new Pokemon game, now that I've gotten better at programming. Just one question for now, though:
How would I do a four-way active side-scrolling game?
Use DCS7 Hybrid commands.

real(4,direction,step,ulcd
If I remember right...

you could use the tilemap command [real(2], only thing about that Is that you can't move it around to specific pixel spots, only 8x8 chuncks.

I've been trying to come up with some programs using the sidescrolling thing, and I think I might be able to use for( loops and copy sprites on the sides according to placement using real(1
I do not have a linking cable.
One needs a linking cable to download DCS.
Therefore, I cannot download DCS.

I need to do this in BASIC, please.
Something like http://www.ticalc.org/archives/files/fileinfo/403/40345.html ?
tifreak: I've looked at it (including the code and README and the Developer's Guide) but still don't quite get it. Could you correct me on the points I think I get?
1. You use sub( to change the position of T, the character's location in a string.
2. A list determines how the map is able to move.
3. You need several programs.
4. Actually, how do you do collision detection? I tried using a matrix, but it takes up a ton of memory.
gaventemples31415 wrote:
I do not have a linking cable.
One needs a linking cable to download DCS.
Therefore, I cannot download DCS.

I need to do this in BASIC, please.


Which calculator do you have?
1. sub( doesn't work like that, I use it to pull specific parts of a string out to display

2. If memory servers (it has been ages since I've looked at the code) the list just tells the dimensions of the map. There could be more to it, though

3. Yeah, for storage of the map data and other things, which lets the engine be faster.

4. Collision detection is done by checking the variable T to the direction pressed by adding either 1 or the width of the map and seeing if the spot is passable, or not.
aroth: 83+

tifreak:
1. But you can by using sub("...",1,3)+"T"+sub("...",...,...
4. Could you explain how to tell if it is passable?
For 4: Use sub( to pull out the character, and check if it's a passable character.
Why would you want to make changes to the string all the time? That takes additional processes that slows the game down, especially with the size of maps that I was using for that project. No reason to make it any slower when you have to do all you can to get it to be fast.

And you just do a check against another string if those characters are ones you are looking at in that direction.
This all makes sense. Thank you all.
So, since you can figure out if a character is passable (with instring( , I suppose), you could also have each character do different things, like move the character down if you step on one?
  
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 UTC - 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