Fast-Paced, "continuous map" game..

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
MegaManSec
Posts: 18
Joined: Sun Oct 27, 2013 5:15 am

Fast-Paced, "continuous map" game..

Post by MegaManSec »

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 :)
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Fast-Paced, "continuous map" game..

Post by tepples »

That appears very doable, including the parallax scrolling of the side walls, using an engine similar to that of Mineshaft by Nioreh (video).
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Fast-Paced, "continuous map" game..

Post by Dwedit »

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.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Fast-Paced, "continuous map" game..

Post by tokumaru »

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.
MegaManSec
Posts: 18
Joined: Sun Oct 27, 2013 5:15 am

Re: Fast-Paced, "continuous map" game..

Post by MegaManSec »

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?
User avatar
thefox
Posts: 3139
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: Fast-Paced, "continuous map" game..

Post by thefox »

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. :)
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Fast-Paced, "continuous map" game..

Post by tokumaru »

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.
MegaManSec
Posts: 18
Joined: Sun Oct 27, 2013 5:15 am

Re: Fast-Paced, "continuous map" game..

Post by MegaManSec »

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
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Fast-Paced, "continuous map" game..

Post by tokumaru »

MegaManSec wrote:I'm not looking foward to using bitshifts :D
Why exactly are you anticipating the need for lots of bitshifting?
MegaManSec
Posts: 18
Joined: Sun Oct 27, 2013 5:15 am

Re: Fast-Paced, "continuous map" game..

Post by MegaManSec »

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.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: Fast-Paced, "continuous map" game..

Post by Dwedit »

Running a multiplication or division once in a while is fine. Doing it 100 times a frame on the other hand...
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Fast-Paced, "continuous map" game..

Post by tepples »

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.
MegaManSec
Posts: 18
Joined: Sun Oct 27, 2013 5:15 am

Re: Fast-Paced, "continuous map" game..

Post by MegaManSec »

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
slobu
Posts: 275
Joined: Tue Jul 12, 2011 10:58 am

Re: Fast-Paced, "continuous map" game..

Post by slobu »

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/
Post Reply