crazygrouptrio
Active member
Want to bring life to your title screen by using some game objects? Maybe add some characters or star sparkles to your title? Turns out it's really easy!
UPDATE: The only script we need to modify for this is HandleScreenLoads (located in Routines>Basic>System), so maybe back that up if you're worried about messing it up but we'll only be adding lines so it's not very invasive.
Near the end of the script you'll see this:
just after this, paste the following code.
In this example we are creating 2 game objects, #14 and #15 (the last 2 under your game objects, but you can use whatever game object/monster you want, as long as it isn't a player). Those objects will spawn at the coordinates you assign for it's X and Y (this will take a lot of trial and error to find the right spot), and once both are created the game counts 2 monsters on screen and skips creating more. Make sure those objects are flagged as Monsters so they will be counted (otherwise it will keep creating endless objects) You can also use regular monsters if you have used all of your regular game objects (monsters start at #10 and just count down to find their object # i.e. your first monster is #$10, the second is #$11, etc.). I've tried this with 1 and 2 game objects and it works fine. You can attempt to add more but I can't guarantee their effectiveness.
If you want a game selection on your title screen as well, this works fine with that. Just follow Dale Coop's selection script first: http://www.nesmakers.com/viewtopic.php?f=40&t=2707.
Okay so now we can make objects here, what can we do with them? You can do anything that a monster can really do action-wise. In the example above I have object #15 running back and forth, and game object #14 that goes to warp at the end of a timer, starting an intro cutscene that resets to the title screen at the end. Just using the standard "Go to Warp" will warp to overworld screen 0,0, so I recommend just using that screen for this.
A few things to note, a title screen does not entirely behave like a normal screen. Set your objects to ignore gravity to make sure they behave, which is necessary since we can't really mark tiles as solid anyway, and "edge of screen" does not seem to apply (at least it didn't in my game). The monster counting may not be necessary, but I found that if you leave the title screen and come back (either by warp or reset) the objects would misbehave and create new ones so I suggest leaving it in.
That's it! It's pretty simple, so get creative with it!
UPDATE: The only script we need to modify for this is HandleScreenLoads (located in Routines>Basic>System), so maybe back that up if you're worried about messing it up but we'll only be adding lines so it's not very invasive.
Near the end of the script you'll see this:
Code:
LDA gameHandler
ORA #%10000000
STA gameHandler
LDA #$00
STA update_screen
STA canUpdateScreen
LDA #%00011110
STA soft2001
Code:
titleScreenObjects::
LDA update_screen_details
BEQ +
JMP ++
+
;; is special screen:
LDA newScreen
CMP #$01
BNE +
JMP ++
+
;; StartScreen:
CountObjects #%00001000, #$00 ;; count monsters on screen
LDA monsterCounter ;; the variable used to count is monsterCounter
CLC
CMP #$02 ;; compare to 2
BCC + ;; if less than 2 on screen we can create a monster
JMP ++ ;; else we quit
+
CreateObject #$00, #$00, #$0E, #$00, temp ;; game object 14
CreateObject #$55, #$B1, #$0F, #$00, temp ;; game object 15
;; X coord, Y coord, Object #, Action State
++
If you want a game selection on your title screen as well, this works fine with that. Just follow Dale Coop's selection script first: http://www.nesmakers.com/viewtopic.php?f=40&t=2707.
Okay so now we can make objects here, what can we do with them? You can do anything that a monster can really do action-wise. In the example above I have object #15 running back and forth, and game object #14 that goes to warp at the end of a timer, starting an intro cutscene that resets to the title screen at the end. Just using the standard "Go to Warp" will warp to overworld screen 0,0, so I recommend just using that screen for this.
A few things to note, a title screen does not entirely behave like a normal screen. Set your objects to ignore gravity to make sure they behave, which is necessary since we can't really mark tiles as solid anyway, and "edge of screen" does not seem to apply (at least it didn't in my game). The monster counting may not be necessary, but I found that if you leave the title screen and come back (either by warp or reset) the objects would misbehave and create new ones so I suggest leaving it in.
That's it! It's pretty simple, so get creative with it!