Wonderfulwardy's FAQ's

Discussion in 'Discussion and Q&A Archive' started by wonderfulwardy, Feb 1, 2011.

Thread Status:
Not open for further replies.
  1. wonderfulwardy

    wonderfulwardy Active Member Exiled

    Joined:
    Nov 22, 2010
    Messages:
    37
    Location:
    Billericay, Essex, UK
    Right, rather then make a seperate topic for every question I have involving Sonic Hacking/Porgramming ASM (of which I will have many as time goes on), I don't want to feel like I'm spamming the forum with so many topics. This is why I'm creating my seperate FAQ's Topic.


    I will continue to update this first post with more questions as time goes on, so sorry if you see other posts by me stating only 'NEW QUESTION AVAILABLE' but I will link it back to the very first post. I'll start off now with my very first couple of questions...


    1.) Is it possible to have two seperate types of ASM programming code for a single object (most perferbly an enemy's AI movement)?


    2.) If so, can they both be set to something like how many emeralds the player has collected?


    Seeing as I am making my hack like a vanilla Sonic 1 and allowing you to gain new character abilities per emerald collected, chances are the game will get easier the longer you play. Personally, after reading a recent Kotaku article about game difficulty/balance, I believe this is not really a perfect plan, seeing as most experienced Sonic 1 players are gonna find this a breeze. My plan if possible, is to have certain enemy's / bosses AI movements changed with increase difficulty depending on the amount of emeralds collected so that the game can still feel fresh & challenging.
     
    Last edited by a moderator: Feb 1, 2011
  2. MarkeyJester

    MarkeyJester ♡ ! Member

    Joined:
    Jun 27, 2009
    Messages:
    2,867
    ; ===========================================================================


    ; ---------------------------------------------------------------------------


    ; Code designed to jump to a routine based on the number of emeralds Sonic has collected


    ; ---------------------------------------------------------------------------


    moveq #$00,d0 ; clear d0


    move.b ($FFFFFE57).w,d0 ; load number of emeralds collected


    movea.l ObjectRoutines(pc,d0.w),a1 ; load correct routine to jump to


    jmp (a1) ; jump to correct routine based on the statuses


    ; ===========================================================================


    ; ---------------------------------------------------------------------------


    ObjectRoutines: dc.l Emeralds_00 ; Routine when no emeralds are collected


    dc.l Emeralds_01 ; Routine when 1 emerald is collected


    dc.l Emeralds_02 ; Routine when 2 emeralds are collected


    dc.l Emeralds_03 ; Routine when 3 emeralds are collected


    dc.l Emeralds_04 ; Routine when 4 emeralds are collected


    dc.l Emeralds_05 ; Routine when 5 emeralds are collected


    dc.l Emeralds_06 ; Routine when 6 emeralds are collected


    ; ---------------------------------------------------------------------------


    ; ===========================================================================


    ; ---------------------------------------------------------------------------


    ; Routine when no emeralds are collected


    ; ---------------------------------------------------------------------------


    Emeralds_00:


    rts ; return


    ; ===========================================================================


    ; ---------------------------------------------------------------------------


    ; Routine when 1 emerald is collected


    ; ---------------------------------------------------------------------------


    Emeralds_01:


    rts ; return


    ; ===========================================================================


    ; ---------------------------------------------------------------------------


    ; Routine when 2 emeralds are collected


    ; ---------------------------------------------------------------------------


    Emeralds_02:


    rts ; return


    ; ===========================================================================


    ; ---------------------------------------------------------------------------


    ; Routine when 3 emeralds are collected


    ; ---------------------------------------------------------------------------


    Emeralds_03:


    rts ; return


    ; ===========================================================================


    ; ---------------------------------------------------------------------------


    ; Routine when 4 emeralds are collected


    ; ---------------------------------------------------------------------------


    Emeralds_04:


    rts ; return


    ; ===========================================================================


    ; ---------------------------------------------------------------------------


    ; Routine when 5 emeralds are collected


    ; ---------------------------------------------------------------------------


    Emeralds_05:


    rts ; return


    ; ===========================================================================


    ; ---------------------------------------------------------------------------


    ; Routine when 6 emeralds are collected


    ; ---------------------------------------------------------------------------


    Emeralds_06:


    rts ; return


    ; ===========================================================================



    That'll do it, also if you have questions that are relitively minor like this, then this is the topic for them, you'll find it'll draw you less unwanted attention =)
     
  3. wonderfulwardy

    wonderfulwardy Active Member Exiled

    Joined:
    Nov 22, 2010
    Messages:
    37
    Location:
    Billericay, Essex, UK
    Thanks Markey. Not that I understand anything about ASM code as mentioned before. I just wanted to know if this idea was possible. Mostly the choosen object to run a diffrent / seperate course.


    Also, thanks for the link and I'll use that place to post minor questions like this if you say it's best but just wondering what you mean by not attracting too much attention?


    Also sent you a PM recently.
     
    Last edited by a moderator: Feb 1, 2011
Thread Status:
Not open for further replies.