Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Sidescrolling in Zelda  (Read 755 times)

0 Members and 1 Guest are viewing this topic.

blackmoon

Sidescrolling in Zelda
« on: May 12, 2007, 12:03:57 pm »
You know in the GB games (and FSA) how sometimes there would be a "basement" area, which was a sidescrolling part of the game? I was wondering if there was a way to do this without making complete new objects.

Link is the main priority here. I don't mind making new enemies for a sidescrolling part of the game, they DO need to act differently. And it's a good excuse to put Goomba's in. But Link... Link is complicated, and having to make an entire other object just for this seems like a waste of time, and I'm sure it's not how the "real" developers did it (ie. Capcom).
Logged

mit

Re: Sidescrolling in Zelda
« Reply #1 on: May 12, 2007, 12:21:15 pm »
  • QBASIC programmer since age 4. Take that, world.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 1079
Lol, the 'real' developers didn't use gamemaker, either.

You don't need new objects, but you will need basically a new movement code thingy. Have a way of determining if it's a sidescrolling area, such as a global variable, or if it's just a few rooms you could have a
if room=rm_sidescrolling1 or room=rm_sidescrolling2 or...
kind of thing. Then, in Link's code, anything that's not to be done when he's sidescrolling should be in the else part of that condition. Have two movement codes.

I'd advise against using more objects, but some people like to do it that way... I think simpler is better, though. 

Logged
Programmer / Spriter / Level designer / Game Director / Web Designer / Music Sequencer for
Random Highscore table:

Play the Kousou Arcade today!
  • Kousou Games
Re: Sidescrolling in Zelda
« Reply #2 on: May 12, 2007, 12:55:45 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6206
You should have 2 scripts! 1 for just moving in the normal world! and 1 for the sidescrolling. It's really easy!
Logged

Koh

Re: Sidescrolling in Zelda
« Reply #3 on: May 12, 2007, 01:21:31 pm »
  • Tamer Koh
  • *
  • Reputation: +6/-0
  • Offline Offline
  • Gender: Male
  • Posts: 980
Well, this is just my movement code way, but:

For the Overworld Script:
Code: [Select]
//Define Variables
var d, u, l, r;

d = keyboard_check(vk_down)
u = keyboard_check(vk_up)
l = keyboard_check(vk_left)
r = keyboard_check(vk_right)

if (d or u or l or r) && moveable{
    moving=1
}
else{
    moving=0
}

if d{
    facing="D"
    if place_free(x,y+2){
        y+=2
    }
    else{
        move_contact_solid(270,6)
    }
}
else if u{
    facing="U"
    if place_free(x,y-2){
        y-=2
    }
    else{
        move_contact_solid(90,6)
    }
}
if l{
    facing="L"
    if place_free(x-2,y){
        x-=2
    }
    else{
        move_contact_solid(180,6)
    }
}
else if r{
    facing="R"
    if place_free(x+2,y){
        x+=2
    }
    else{
        move_contact_solid(360,6)
    }
}
if moving{
    image_speed=0.35
}
else{
    image_speed=0
    image_index=0
}
if moveable{
    execute_string('sprite_index=sprPlayer'+facing)
}

For the Sidescrolling Script
Code: [Select]
//Define Variables
var d, u, l, r;


d = keyboard_check(vk_down)
u = keyboard_check(vk_up)
l = keyboard_check(vk_left)
r = keyboard_check(vk_right)

if place_free(x,y+1){
    gravity=0.5
    gravity_direction=270
}
else{
    gravity=0
    gravity_direction=270
}
if vspeed>5{
    vspeed=5
}

if (l or r) && moveable{
    moving=1
}
else{
    moving=0
}

if l{
    facing="L"
    if place_free(x-2,y){
        x-=2
    }
    else{
        move_contact_solid(180,6)
    }
}
else if r{
    facing="R"
    if place_free(x+2,y){
        x+=2
    }
    else{
        move_contact_solid(360,6)
    }
}
if moving{
    image_speed=0.35
}
else{
    image_speed=0
    image_index=0
}
if moveable{
    execute_string('sprite_index=sprPlayer'+facing)
}
if keyboard_check_pressed(ord('Z')){
    sound_play(Jump)
    vspeed=-3
}

At least thats the way I'd do it, I hope this helps you.
Logged
  • Megaclipse Games
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.04 seconds with 42 queries.

anything