Looking for issues with scrolling

jorotroid

Member
Hello. Long time. Life has been busy. Still working on things, but feel less inclined to put things out there before I feel they are ready. Anyway, digit2600 contacted me trying to merge my scroll core into Silver Island. Long story short, this eventally lead to me finding and using a program called WinMerge to find out what changes I made to the Basic core to get to my core. If you are also trying to adapt my core into your game instead of starting from scratch, then these note might be useful to you for finding out which files are important.

BankData\Bank14.asm
I commented out all of the auto scroll code because it doesn't work with my core.

DataLoadScripts\LoadAttUpdate.asm
I commented out some lines that have to do how the NMI update works. As I write this I don't remember why, but it probably means that I changed how NMI works.

DataLoadScripts\LoadTileUpdate.asm
I'm not 100% sure what the BIT opcode does. I might have just commented that out to see if it would break anything. I guess it didn't?

InitializationScripts\InitLoads.asm
The changes in the middle of the file have to do with me changing the names of some variables to remove some (what I saw as) redundant variables and also to help understand a variables function better.
The change at the bottom of the file is a personal preference thing and can go either way. I made it so that tile and sprites wont draw in the first 8 pixels of the left side of the screen. I did this so that sprites coming one the left side of the screen would look like they are moving on to the screen instead of popping on to it.

ModuleScripts\AiScripts\ShootStraight.asm
Name changing a variable to make more sense to me.
Replacing spaces with a tab because it bugged me.

ModuleScripts\AiScripts\ShootTowardsPlayer.asm
Name changing a variable to make more sense to me.

ModuleScripts\HurtWinLoseDeath\ScrollingPlatformer\CreateVictoryObject.asm
Name changing a variable to make more sense to me.

ModuleScripts\HurtWinLoseDeath\CreatePlayerDeathObject.asm
Name changing a variable to make more sense to me.

ModuleScripts\HurtWinLoseDeath\HandleDrops.asm
Name changing a variable to make more sense to me.

ModuleScripts\HurtWinLoseDeath\HandleHurtMonster.asm
I don't think that my core handles scroll locking, so this is commented out.

ModuleScripts\HurtWinLoseDeath\HandlePlayerWin.asm
Name changing a variable to make more sense to me.

ModuleScripts\HurtWinLoseDeath\NoMorePrize_CreateVictoryObject.asm
Name changing a variable to make more sense to me.

ModuleScripts\HurtWinLoseDeath\WapToScreen.asm
Name changing a variable to make more sense to me.
Here is an example of where I thought of there being redundant variables. I whittle things down a bit.

ModuleScripts\InputScripts\SimplePlatformer\a_simple_jump.asm
My core inverts how the gravity screen flag works compared to the basic core. It assumes you want gravity on all screens. The change here inverts the gravity check.

ModuleScripts\InputScripts\SimplePlatformer\varJump.asm
Inverts the gravity check.

ModuleScripts\InputScripts\ExtraControllReadCode.asm
Ignore this file. This isn't the version of this file that gets used. I should delete it.

ModuleScripts\InputScripts\varJump.asm
I think I copied this from the previous version of NESmaker, because most of the changes are less comments. But also this one inverts the gravity check again.

ModuleScripts\MainScripts\BoundsHandlers
There are 4 scripts in this folder. All with important changes for scrolling

ModuleScripts\MainScripts\ScrollingPlatformer\ExtraControllReadCode.asm
This is the version that gets used. Inverts the gravity check.

ModuleScripts\MainScripts\ScrollingPlatformer\HandleObjectCollisions.asm
An optimization, some renaming of variables, and the removal of some code that is no longer relevant to how the scroll core works.

ModuleScripts\MainScripts\ScrollingPlatformer\HandleSpriteWeapon.asm
Renaming variables.

ModuleScripts\MainScripts\ScrollingPlatformer\TileCollisions.asm
These are some very important changes to make the scroll core work.

ModuleScripts\MainScripts\HandleCamera.asm
These are some very important changes to make the scroll core work.

ModuleScripts\MainScripts\Physic_4_1_0.asm
These are some very important changes to make the scroll core work.

ModuleScripts\MovementScripts\SimplePlatformer
Uh.... Here are a bunch of scripts that have to do with moving and stopping the player. I don't know. I don't think any changes here are important. Whatever works for you.

ModuleScripts\ModuleScripts\TileScripts\ScrollingPlatformer\setCheckpoint.asm
Changing names of variables.

System\AI_Reactions\Reaction_3.asm
My comment says,"I think this will prevent objects from getting stuck in a wall just off screen." I think it ended up reducing it, but not preventing it.

System\Macros\ChangeTile.asm
The changes here have to do with me merging the two collision tables.

System\Macros\ChangeTileAtCollision.asm
The changes here have to do with me merging the two collision tables.

System\Macros\CheckForVerticalEjection.asm
It dared me to comment it out, so I commented it out. I think these lines didn't do anything.

System\Macros\CheckPlayerCameraPosition.asm
Important for scrolling.

System\Macros\CreateObject.asm
Variable renames

System\Macros\DetermineCollisionTableOfPoints.asm
Important for scrolling.

System\Macros\DoPlayerGuidedLeftScroll.asm
Important for scrolling.

System\Macros\DoPlayerGuidedRighttScroll.asm
Important for scrolling.

System\Macros\DrawSprite.asm
A petty correction of a typo in a comment.

System\Macros\HandleAimedPhysics.asm
Variable renames

System\Macros\HandleHorizontalInertia.asm
Important for scrolling.

System\Macros\LoadNametableFull.asm
I don't know. I guess either I found all of this unnecessary for how the scroll core works or I found a different place to do it.

System\Macros\LoadSpritePalette.asm
I don't know why I found these bank switches unnessesary... I should probably look into this one more. If you are having sprite palette problems with my core, this might be where the problem is.

System\Macros\SubtractValue.asm
Wasn't this a fix for a bug that was found after 4.1 released?

System\CheckForUpdateScreenData.asm
Variable renames

System\ConvertCollisionToNT.asm
Variable renames

System\HandleBoxes.asm
Variable renames

System\HandleScreenLoads.asm
Variable renames and other important changes for scrolling.

System\HandleScroll.asm
Important for scrolling.

System\HandleStateChanges.asm
Variable renames

System\HandleUpdateObjects.asm
Some important scrolling stuff, some variable renames, a fix for a bug with Action Anim End 13, and some code I think I moved elsewhere.

System\IncludeSystemFunctions.asm
Were warps not originally included in the system functions? Well, they are now.

System\LoadCollisionBytes.asm
These changes have to do with the merging of the collision tables.

System\LoadMonster.asm
Changes to monsters to make them deal with scrolling.

System\LoadScreenData.asm
Changes to monsters to make them deal with scrolling.

System\locationFinders.asm
I think this was a fix to the bug I ended up creating that would make you warp to the wrong screen if you jumped up a screen. If I remember correctly, the amount of space reserved for tile collisions is a full page which means 256 values, or a screen space of 16x16 tiles. But our screens are 16x15 due to the rectangular shape of tvs, so that meant that bottom row of memory was going completely wasted. I started putting things there, and that led to problems when trying to move up a screen because those values would get check for collisions. The change in this file just makes it so that row of addresses are ignored.

System\MemoryMap.asm
I put some variables in the last 16 addresses of the CollisionRam because they were previously going unused. Changed the second collision table to "MultiPurposeRam." The second collision table is now stored in the same address space as the first, and theoretically everything in the multipurpose ram could be disregarded in a non-scrolling screen if you wanted to have a Save room.

Variables\ModuleVariables.asm
Either moved or removed some variables. The only thing added is a variable that keeps track of whether xScroll_hi has changed recently.

MainASM.asm
Some optimizations to NMI that are important for scrolling. Ah, that's why handling warps is now a routine.

In addition to all of the above files that were changed, the following files are new or were moved to different folders than where they originally were:
DataLoadScripts\LoadScrollTilesUpdate.asm
ModuleScripts\InputScripts\a_create_projectile.asm
ModuleScripts\InputScripts\a_simple_jump.asm
ModuleScripts\InputScripts\b_activate_text_box.asm
ModuleScripts\InputScripts\b_create_melee.asm
ModuleScripts\InputScripts\b_create_proj_simple.asm
ModuleScripts\InputScripts\b_sample_change_tile.asm
ModuleScripts\InputScripts\bButtonActivateWarp.asm
ModuleScripts\InputScripts\TestBox.asm
ModuleScripts\InputScripts\TestSFX.asm
ModuleScripts\InputScripts\TestWarp.asm
ModuleScripts\InputScripts\TurnOnAutoScrollL.asm
ModuleScripts\InputScripts\UpLadder.asm
ModuleScripts\MovementScripts\ChangeToIdleAnimation.asm
ModuleScripts\MovementScripts\ChangeToIdleAnimation.asm
ModuleScripts\MovementScripts\SimpleLeft_NoScroll.asm
ModuleScripts\MovementScripts\StopSimpleLeft_noScroll.asm
System\HandleColumnUpdate.asm
System\HandleWarps.asm

All the new scripts in the ModuleScripts folder are probably optional. One thing I tried to do with this core was declutter the file system a bit and get rid of redundant scripts. Looking at some of the names of those scripts, I'm thinking some of them should be deleted. The script in the DataLoadScripts folder and the two in the System folder are definitely important for the function of the scroll core.
 

jorotroid

Member
dale_coop said:
Sounds awesome! Can't wait to try this new version... do you have a link to share?

Oh, sorry, still no new version. This is just if you want to adapt the old version to your current games. Progress is still being made on the new version. Some life stuff happened that got me away from it a little bit and I had to go through the process of relearning what I was doing. Pace has picked back up again, though.
 

Jonny

Well-known member
Just a quick question regarding the above. I've been trying out this new core and it seems great.

My question is, is it intended for use with games using HUD? I seem to have ended up with tiles being drawn over the hud when scrolling to the second screen. I just wanted to ask if it might be related before I start looking at other things I may have done wrong. I hope this make sense. Thank you
 

Jonny

Well-known member
https://youtu.be/2wwEo0QkKp0

My settings for the HUD and screens were exactly the same as when using the scrolling platformer base. The hud would eventually fill all the way.
 

dale_coop

Moderator
Staff member
I am pretty sure the default HUD will not work with this module. This module is experimental... and need to be used without hud (or built yourself a sprite based hud).
 

Jonny

Well-known member
A sprite based hud, sounds interesting. I do like this module, it seems to work better and the screen settings make more sense to me ('left bound' etc), maybe losing the hud is a trade off. I'm going to continue with this module and hopefully learn enough about assembly in the future to create some sort of hud. Thank you for your advise.
 
Alright, how about this? I'll go a head and post it in this thread for now as a sort of soft launch. Then after the competition, I'll make a new thread in the modules section for all to see and easily access.
For that actual release, I probably still need to do some quality of life stuff to the module, like update some Project Labels. I might also make gravity the default on a screen, and you would have to set the flag to turn off gravity since this module has platformers more so in mind.

Anyway, to install, I think all you have to do is put the Joros_Scroll_Core folder in the Routines folder, and the .MOD file in the modules folder. Then you should be able to select the module as you would with any other when starting a new project.

https://drive.google.com/open?id=1eT5cPFcC4OOGbCnhHZvFCuUIrnw4y8Qi
Excellent module. Reminds me of METROIDVANIA from 4.5. But it looks better in some ways. I like version 4.1, I think because of the habit of using more time. Too bad there's no scroll up and down
 
Oh, sorry, still no new version. This is just if you want to adapt the old version to your current games. Progress is still being made on the new version. Some life stuff happened that got me away from it a little bit and I had to go through the process of relearning what I was doing. Pace has picked back up again, though.
I tested the module. Incredible. But right left animations didn't work
 
Top Bottom