Legacy GM Drawn To Life style movement

A

AquaticChaos

Guest
Before I move on to why I made this thread, let me tell about the DS game Drawn To Life.

Released in 2007, the action-adventure platformer was rated fairly for its fun concept: Drawing just about everything in a pixel art style. From your character, to blocks to jump on, even to weapons used, they were all customizable and yours to create. It was given a sequel- "The Next Chapter"- and a Spongebob spinoff. I'd rather not focus on plot, but rather mechanics.

As such, this game had two levels of movement, one for the overworld and one for the levels.

The Overworld had top-down movement, with the 2d sprites of your character simply moving left and right.

The levels were side-scrolling, featuring what most platformers are recognized as.

How would I go about making the former of two movements, and enable the ability to toggle between them?
 

LilRony

Member
Oh man I remember that game.

Are you looking to make customizable characters? Or do you have set sprites, and just want to code the movement animation? I'm not very well versed in making custom characters in-game, but I can help with setting the animations.
My first suggestion is to have two separate player objects for the overworld and the gameplay sections. Then you can have a player that moves top-down like and platformer-like. All you would need to do is place them in the rooms.

As for animating them when in top-down mode, it should be simple, given you have (i think) two sprites: Idle and walking/running.
Code:
// Step event - Animate player (after hspeed is set)
if (hspeed != 0 || vspeed != 0) { // if moving horizontally or vertically
    sprite_index = spr_walk;
}else{
    sprite_index = spr_idle;
}

// apply direction of player facing
if (hspeed > 0) {
    image_xscale = 1;
}else if (hspeed < 0) {
    image_xscale = -1;
}
// note that your sprites' y-axis must be centered in order for them to stay in their position. Otherwise they will jump spontaneously forward and back when changing directions.
That should be it. You can change hspeed to whatever variable you're using to calculate the player's horizontal speed, as well as vspeed.
 
Top