Calculator Community > Casio Calculators

Side Scroller

(1/2) > >>

kucalc:
Hello, I'm wandering if someone can help me. I'm planning on writing the first side-scroller for the Casio fx-9860. Here's what I have:

* My levels are drawn using tiles (8x8 pixels) and the screen resolution is 128x64. The levels are stored within matrices, ex: mat_a[y][x].

* Since level data are stored within a matrix, how would I keep track of the player's position? Also, how do I "scroll" along a level? Would it be if the player's character reaches halfway across the screen would I increment the x-position?

* Last, how would I draw the level, which is stored using matrices, when scrolling? This is really complicated for me, as I want to scroll pixel-by-pixel instead of block-by-block.

trevmeister66:
hmm well, i don't know casio language at all, but someone else could put it into a TI BASIC language thing first and could explain it to you that way i guess.

kucalc:
Psuedo code would be helpful. Also, you can program the fx-9860 in Standard C (most of the standard C functions are supported) + some hardware functions.

Floodkiller:
Well, I know the forumulas you can do (without language info or var info) using a sidescoller that I have:

(position of character in matrix)-((position of character on screen)+(offset of variable according to matrix; this is only to simplify variable counting)) stored into your scrolling variable.

The above is for a block scrolling, however, so you may have to adjust it to a pixel by pixel.

kucalc:
Thanks Floodkiller, that does help a bit.

Navigation

[0] Message Index

[#] Next page

Go to full version