On the topic of scrolling

CutterCross

Active member
You've probably heard this question many times before, but are you planning on implementing horizontal/vertical scrolling by the time NESmaker releases in August? That being, will there be an easy, intuitive way to add scrolling built into NESmaker? Seeing as how it's a pretty ubiquitous feature in NES games. If not, at the very least, will there be an explanation/tutorial on how scrolling is handled in assembler?
 

Bucket Mouse

Active member
Scrolling is the most important part of the Platformers module and I'm surprised it's not there already. Maybe it needs a bit more tinkering.

They haven't responded yet. If their response is to link to this, we're all in trouble.
 

Mihoshi20

Member
Mostly, currently I think they're just working on getting the tool functional and the assembly code modular enough to easily swap code in and out. The tool mostly being adventure came centric was because they started with it's design for Mystic Searches which is a zelda style adventure game. When they start planning out the modules (which they're thinking of right now with adjusting the tool for swapping out platformer specific code.) I imagine we'll see common elements for those types of games be added which includes scrolling the screen type functionality.

Scrolling is such a common functionality and really what defined and set the NES apart from all the systems that came before it that I have no doubts it's on their minds as a feature they have to get into the engine at least for the August release. Hopefully at least...
 

RadJunk

Administrator
Staff member
So let me give you guys some of the issues with scrolling, as it pertains to the engine right now.

Right now, how it works is, a screen is loaded, including its tilesets, its palettes, its nametable data, its collision data, its monster placements, its music, etc, which you define screen by screen. So then, the question starts to become...how do you translate that to scrolling across multiple screens? For most of that data, it is imperative that the screen be turned OFF in order to load (like tilesets, etc). So then...you'd have to load a whole platform level's data in one shot. But that would work different from a platform game than a screen specific, as you'd have to preload x amount of screens worth of data (like monster placement)...OR...you could have some check that when a player gets to a certain point, it loads monsters just off screen, based on the screen data for that new screen being loaded...but that's completely different than the current monster load protocols.

Now, add in collision to that. Our collision data is loaded into ram on a screen by screen basis when the screen loads. There isn't enough RAM space for 16 screens worth of collision data to be loaded in, so a routine has to be used to load in collision data procedurally. This, again, is completely different than how it handles things now, and there's no one way to do it.

Right now, you can ALREADY make the screen scroll (from one screen to the next) if you were to write a code to load in a second nametable to $2400. You can even test basically graphical scrolling right now...I think the variable is called xScroll and yScroll in our engine. Write a code that, when you press the right dpad button, it increases xScroll, and you'll see the screen "scroll" behind you. That doesn't handle anything practical, though, like the collisions or data loads. It's a lot to work out how to make this not only work, but work in a way that is congruent with the rest of the code for all the variable options a game might have.

Lastly, the "will NESmaker support scrolling" is the wrong question. NESmaker is a front end that allows you WYSIWYG access to the engine underneath. The engine underneath is meant to be infinitely modifiable. There is no single engine underneath...code for the underlying engine will likely be created for years to come by us, by other users, etc. NESmaker can "do" whatever a NES, using mapper30, can do, which absolutely includes scrolling. Whether we'll have a "one button press" solution to engage scrolling or non scrolling in August? I'm not sure. But don't make the misconception that NESmaker 'can't do scrolling yet'. We just have many other things that are primary fundamentals of ANY game engine that need to be nailed down first, before we get to particulars of genres. Someone who was into it could absolutely write routines into the underlying ASM that would make NESmaker games observe scrolling right now. And let's not forget, still one of the most renowned homebrews thus far is Battlekid...a platformer that has zero scrolling. Just something to consider :)
 

MistSonata

Moderator
You know, something has always bugged me about the answer to the "Can NESmaker do _____" question, it always leaves me with more questions and it never seems satisfying. I think I know why. First I think it's because people who ask this aren't experienced NES programmers, and saying "yeah it's possible if you write it into the code" isn't helpful because if they were capable of writing complicated engines in ASM they wouldn't really need NESmaker. But also I think it's because we (and I'm including Joe in this) don't know what's going to be possible with NESmaker and its modules, not really.

I'm sure Joe has a pretty good idea, based on what the NES is capable of and what can be done easily with it, but it's possible that when it comes time to code the module, there'll be hiccups and setbacks that mean we won't be able to include x feature in the base module. It's like asking what a person will be like before they're even born. Sure, you could reasonably assume that they'll have legs, but sometimes people are born without legs. Both parents have brown eyes, so the baby will probably have brown eyes too, unless they have blue eyes, or green eyes. That's how I see it at least.

Anyway, right now I've been perusing through a commented disassembly of Final Fantasy 1's code, hoping to get an idea of how I might get NESmaker to do the kind of vertical and horizontal scrolling you see in that game. Just in case it's not going to be a feature in the RPG module.
 

Bucket Mouse

Active member
I hope you guys haven't coded yourselves into a corner. When this is a non-beta finished product, people are going to be buying it expecting to make scrolling platformers. There will probably be more people wishing to make platformers than people wishing to make RPGs. And it's not just that genre...the shooting module will need a scrolling background, unless the intent is to make really old Space Invaders clones. A fighting game or brawler without the ability to scroll and advance would feel dull. So what now?
 

Mihoshi20

Member
There's a lot you can do with the Pitfall approach and Battle Kid, Metal Gear, or even TrollBurner are very good examples, but even those two would have benefited greatly if their levels could scroll as even if you look at Battle Kid there isn't too much going on and many rooms play path double duty. Granted I am happy you guys are setting the tool up for flexibility and focused on making it diverse in the beta phase. Though when it comes to working on and finalizing the modules, many people who have and will take interest in NESmaker for making their dream platformer won't be thinking Battle Kid. Instead they'll be thinking Megaman or Mario 3, myself included. When the platformer module is considered ready for consumer consumption, I think it's safe to assume some form of at least rudimentary horizontal or toggle-able horizontal/vertical scrolling functionality will be included out of the box as it's the single most function above all else that defined the NES. Adventure, fighting, or RPG modules don't need it as much, or clever NESmaker users will find ways to mix it into their games given the wonderful modular nature of the tool.

It's safe to say though most of the general market for NESmaker will be making platformers or brawlers the most and will expect basic scrolling functions out of the box.
 

CutterCross

Active member
I think the best UI solution is that NESmaker should let the user make "metascreens" in the overworld editor, made up of several individual screens. There could be three different colored metascreens: One would allow X-axis scrolling only, one would allow Y-axis scrolling only, and one would allow scrolling in both the X and Y axis (Not at the same time though, I'm talking more along the lines of Dragon Quest/Final Fantasy scrolling, where it scrolls in the direction the player moves, up down left or right. I'm not talking about 4-way scrolling like SMB3). This would allow the user to easily tell how the scrolling connects each individual screen (whether it be a level, or an entire overworld), and let them control where and how they want their screens to scroll.

Obviously, there would be some extra limitations for metascreens. You wouldn't be able to change tilesets or palettes inside the metascreen (or at least not without disasterous results). And if you're planning for X and Y axis scrolling like an RPG overworld and have a HUD that appears when you press a button (like Dragon Quest) you'd have to have grid-based movement to make sure the HUD lines up correctly with the screen every time. Also diagonal movement with an X and Y axis scrolling would be out of the question. (I know 4-way scrolling is a nightmare.)

Now I'm no programmer, and I know the engine would need a MASSIVE overhaul for scrolling to be implemented in an intuitive way, but it's one of those things that should have been included and planned from the outset. I can safely say that most people (including myself) expected one-directional scrolling to be a base feature in NESmaker, and have been planning games around that feature.

I'm still very happy for the progress NESmaker has made so far! I'm not dismissing any of the hard work that's making it a reality, but I think it could have been planned better with reguards to scrolling.
 

Mihoshi20

Member
I'd be perfectly happy with the in tool option to lock the game to only horizontal or vertical scrolling, least for the basic platformer module. Most general users won't need 4 way directional scrolling or even Mario 2 horizontal and vertical scrolling and those who do will probably have the knowhow to code it up anyhow.

As for the best way to do it, that parts tricky, if doing mario 1 style one way scrolling, could probably just do the screen you're on in $2000 and the next screen to the right of your current screen on $2400 though I'm not sure how you'd do the screen above or below ala Ducktales unless that could be handled the same way the engine does it now.

If doing two way scrolling ala Mario 2's horizontal parts or Ducktales, I wouldn't even know where to begin as I don't know enough about the hardware only what I've observed watching the nametable debug function of FCEUX.
 

CutterCross

Active member
Mihoshi20 said:
I'd be perfectly happy with the in tool option to lock the game to only horizontal or vertical scrolling, least for the basic platformer module. Most general users won't need 4 way directional scrolling or even Mario 2 horizontal and vertical scrolling and those who do will probably have the knowhow to code it up anyhow.

As for the best way to do it, that parts tricky, if doing mario 1 style one way scrolling, could probably just do the screen you're on in $2000 and the next screen to the right of your current screen on $2400 though I'm not sure how you'd do the screen above or below ala Ducktales unless that could be handled the same way the engine does it now.

If doing two way scrolling ala Mario 2's horizontal parts or Ducktales, I wouldn't even know where to begin as I don't know enough about the hardware only what I've observed watching the nametable debug function of FCEUX.
Like I said, I'm no programmer, but most of what I know about NES scrolling came from here: https://www.youtube.com/watch?v=wfrNnwJrujw
It's a really good video showing how the NES handles all kinds of scrolling.
 

Mihoshi20

Member
CutterCross said:
Mihoshi20 said:
I'd be perfectly happy with the in tool option to lock the game to only horizontal or vertical scrolling, least for the basic platformer module. Most general users won't need 4 way directional scrolling or even Mario 2 horizontal and vertical scrolling and those who do will probably have the knowhow to code it up anyhow.

As for the best way to do it, that parts tricky, if doing mario 1 style one way scrolling, could probably just do the screen you're on in $2000 and the next screen to the right of your current screen on $2400 though I'm not sure how you'd do the screen above or below ala Ducktales unless that could be handled the same way the engine does it now.

If doing two way scrolling ala Mario 2's horizontal parts or Ducktales, I wouldn't even know where to begin as I don't know enough about the hardware only what I've observed watching the nametable debug function of FCEUX.
Like I said, I'm no programmer, but most of what I know about NES scrolling came from here: https://www.youtube.com/watch?v=wfrNnwJrujw
It's a really good video showing how the NES handles all kinds of scrolling.

Yeah, that's a great vid. All the vids this guy does are very well done and informative. Also finally solved the mystery of all the block garbage at the edge of Mario 3's screen I noticed as a kid.
 

DChilders84

New member
This is a very important feature, not only for the platformer style of game, but what about shoot-em-ups or spaceship games? I'd rather development of the tool continue past the designated release date, even push the release date back if necessary, to include a scrolling option.
 

RadJunk

Administrator
Staff member
Like I said...this is the wrong sort of question.

It's sort of like if someone were to ask, "So, with Microsoft Word...can you write in screenplay format?" Microsoft Word has some templates built into it, but the program Microsoft Word itself is the program that handles things like representing characters on the screen, line spacing, font selection, font size, justification, etc etc etc. The answer to "Can you write in screenplay format" with Microsoft Word is a hard question to answer. Sure...you CAN write in screenplay format, with the proper use of the things that Microsoft Word does.

NESmaker is the tool that handles the things. The engine underneath is the variable here, and this will updated and changed and optimized probably for years to come, by us and other members of the community. "Can NESmaker do scrolling?" is sort of like asking "Can Microsoft Word write in screenplay format?". If you manipulate it correctly, sure. Will there be a single button that suddenly puts it into "scrolling mode"? That's too broad a concept to definitively answer.

The idea that "Well, I KNOW NES games could do things, because look at xyz game, it did this sort of thing." Yes, that's true, however that engine was written specifically to do all of those particular things. The default engine and the data organization underneath NESmaker is vanilla, meant to be able to easily modified into as many potential forms as possible. It would be much easier (not easy, mind you...but easier) to, say, create a standard RPG scrolling if we made it so each collision byte only had to be 2 bits worth of data (4 possibilities), but obviously that doesn't work for other types of games. Our main functionality has to be sort of the middle of the road, to be built upon.

Consider HUD development, for instance. It is SUPER easy for us to create a hud that functions just like the HUD in Super Mario Brothers. It's also super easy for us to create a hud that functions just like the HUD in Legend of Zelda. However, these are so dramatically different that what we have to do is create a central code base that can be manipulated through a front end to approximate both. The tool's job is not to make one that functions like Mario's OR Zelda's, but instead to give you access to components...draw a word here, draw a variable there, draw an image dependent on a variable over there, draw it at the top, or at the bottom, change the background color to match the level, or change the background color to black, etc etc etc. And then you take all the options and construct a thing out of all of that that fit's YOUR game's needs and visions.

I hope that we have a scrolling engine that supports basic horizontal (or vertical) scrolling natively by release. If not, I'm sure it would come in the months that follow soon thereafter, but that's no surprise. As soon as we started hitting stretch goals, each goal might take longer than the official release of the tool. But the main point is that people will be able to start getting acclimated in August, start snapping things together and seeing them on cartridge in a way they never have been able to before. Adding new ASM code to the back side of things will be a constant thing for us and any other developer who chooses to dig into the code. And trust me - learning to code in an environment where 90% of the backbone is already set up is MUCH easier than building from scratch.
 

darkhog

New member
I wonder, do the boards NESMaker comes with have enough on-board RAM to support 4-way scrolling without loading seams? In any case, I know it's important, but scrolling on the NES is kind of a mess. If it would be powerful enough to load an entire screen worth of nametables in one frame, it probably would be easier. But it isn't.

I think the current way the engine does things is optimized for Mystic Searches which is a zelda clone and as such is fine with no scrolling. But, while hard, some scrolling capability should be added, though it most likely would require rewriting loading routines. The preloading monster/collision data probably wouldn't work since there isn't enough ram to work with on the NES. Instead, it should be loaded line-by-line (I'm talking about tile lines) for metatiles and collision, on every NMI and monsters should be loaded only as they're about to show on the screen, unless player is stationary. This, along with discarding old data should prove performant enough to work well. In fact, I think Mario 3's working this way.
 
Top Bottom