This page is a mirror of Tepples' nesdev forum mirror (URL TBD).
Last updated on Oct-18-2019 Download

Fast-Paced, "continuous map" game..

Fast-Paced, "continuous map" game..
by on (#119919)
I'm thinking of creating a game, much like the game "Icy Tower Classic"..

I've never programmed in ASM before, but I have beginner knowledge in C/C++, and I am experienced in some scripting languages like PHP, Bash, etc..
My plan is to make it in C, and then later learn asm, and re-write it.. Just doing it in C to get the maths of it correct..

Anyways, I'm wondering if it's possible, with NES games, to have such a game like Icy Tower..
Because it's a _very_ 'fast' game, will it just be so slow that it can't handle it?

Here's a video of the game: https://www.youtube.com/watch?v=lMqq07EZwDk

Anyone know?

Thanks :)
Re: Fast-Paced, "continuous map" game..
by on (#119920)
That appears very doable, including the parallax scrolling of the side walls, using an engine similar to that of Mineshaft by Nioreh (video).
Re: Fast-Paced, "continuous map" game..
by on (#119921)
The speed limit for scrolling in one direction (drawing in the new tiles) on the NES is 48 pixels per frame (6 rows of 32 tiles), assuming very tightly optimized drawing code and displaying the entire screen, but that game probably won't go any faster than 8 pixels per frame (1 row of tiles).

Battletoads did something similar to get the parallax scrolling, but it didn't use any background obstacles. Otherwise, parallax scrolling could be done with bankswitching, or rendering a repeating pattern to CHR-RAM.
Re: Fast-Paced, "continuous map" game..
by on (#119929)
tepples wrote:
That appears very doable, including the parallax scrolling of the side walls, using an engine similar to that of Mineshaft by Nioreh (video).

There are 3 separate scrolling planes though, so in order to recreate the complete effect of Icy Tower you'd need to combine the trick in Mineshaft (dynamic tiles in the background) with the one used in the second level of Battletoads (dynamic tiles at the sides). It's the same trick actually, the tiles just scroll at different speeds. It's perfectly possible to recreate this game on the NES.
Re: Fast-Paced, "continuous map" game..
by on (#119931)
Thanks for the links and replys guys.

I didn't even think about Battletoads level 2.. Time to search for the method they used!

Hmm, well guess I'm going to have to get to work..
As I said, I'm very bad at C, and only know the extreme basics, but I understand the concepts of coding/etc..



Is http://shiru.untergrund.net/articles/pr ... s_in_c.htm the best page for NES games in C?
Re: Fast-Paced, "continuous map" game..
by on (#119932)
MegaManSec wrote:
Is http://shiru.untergrund.net/articles/pr ... s_in_c.htm the best page for NES games in C?

Not just the best, but also the only one. :)
Re: Fast-Paced, "continuous map" game..
by on (#119936)
MegaManSec wrote:
I didn't even think about Battletoads level 2.. Time to search for the method they used!

If you modify a tile in the pattern tables (either by rewriting CHR-RAM or by bankswitching CHR-ROM), all instances of that tile in the name tables will reflect the changes when the next frame is rendered, because the NES redraws the entire picture every frame. So the idea is that you modify the graphics of the tiles to attenuate or intensify the amount of scroll you have actually performed.

For example, if you modified the scroll registers to move the screen up by 2 pixels, you can modify the graphics of the tiles in the background to look like they scrolled up 1 pixel, so when you look at the final picture the backdrop will appear to have scrolled only 1 pixel while everything else has scrolled 2 pixels. So every frame you'll have to calculate how the graphics of these special tiles should look as a function of the scroll value used for the actual level map.
Re: Fast-Paced, "continuous map" game..
by on (#119954)
Well, thanks for the replys.
I'll probably continue to post here periodically(in this thread) once ever week or so, asking questions.. :P

I'm not looking foward to using bitshifts :D
Re: Fast-Paced, "continuous map" game..
by on (#119960)
MegaManSec wrote:
I'm not looking foward to using bitshifts :D

Why exactly are you anticipating the need for lots of bitshifting?
Re: Fast-Paced, "continuous map" game..
by on (#119962)
tokumaru wrote:
MegaManSec wrote:
I'm not looking foward to using bitshifts :D

Why exactly are you anticipating the need for lots of bitshifting?

In that C 'guide', it says "Avoid to use multiple and division as much as possible, they are very slow. Use bit shifts where possible instead"

And due to the way the speed in Icy Tower works, it will have some calculations.

Something like this..(Obviously not the real speed)
MapSpeed = Level*Timer/2
For example.
And because it will be making these calculations every time you hit next 100th floor, it will probably be doing it every 5 seconds or so.
Re: Fast-Paced, "continuous map" game..
by on (#119964)
Running a multiplication or division once in a while is fine. Doing it 100 times a frame on the other hand...
Re: Fast-Paced, "continuous map" game..
by on (#119966)
What Dwedit said. Multiplying isn't evil. Multiplying or dividing two 8-bit values takes less than two scanlines of CPU time. In fact, it takes several multiplies and divides to fire a missile in one of my own games. Just don't do it for every critter on the screen every frame. If you absolutely need muls and divs and arctangents in your movement code, you could give each critter a think cycle every few frames and then just hold the critter's velocity constant until its next think cycle.
Re: Fast-Paced, "continuous map" game..
by on (#119968)
Ok, thanks for the information(again).

Could anybody link me to some open source nes .C files that I can read through to get the idea of the NES c functions? Other than the ones already on that .htm page.
Thanks again
Re: Fast-Paced, "continuous map" game..
by on (#119986)
Here is some info on C in general (on 8-bit systems)
http://homepage.cem.itesm.mx/carbajal/M ... it_mcu.pdf

Here is a link for NESICIDE (Ready-to-go IDE + examples)
http://www.nesicide.com/