From zero to Bombuzal – step 3

In the previous step we had the problem of the level panning away if the mouse is outside the movie.

The first solution come from souled that created a button in the entire stage to manage the panning

Maybe it’s not the best solution ever, because it may require you to redesign mouse pointer, but at the moment it works.

Now it’s time to add the main sprite, Bombuzal itself! I’ll create an object to store all its information. If you have troubles with objects, refer to Understanding Flash Objects tutorial.

At the moment the only information about Bombuzal I need are its x and y position

And here it is!

I know, Bombuzal sprite sucks, but I’ll fix it later. Now, I want it to move using arrow keys. If Bombuzal steps off the floor, then he dies and at the moment I want it to be redrawn at its starting position.

And now the game looks very bad… first you can walk in diagonal while in the original you can’t… then the sprite moves too fast… and there is a tiles bug.

In the original game, the sprite moves slowly and he can’t stop between a tile and another. This means when you press, in example, the right arrow, Bombuzal will slowly walk until the rightmost tile, even if you release right arrow while it’s walking. That’s a very tile based concept indeed.

I must reproduce this kind of movement, and not allow the player to walk diagonally. This is the correct actionscript, read all comments because I changed various things.

And now we have a walking Bombuzal as in the original game.

The winner of this step is souled. Now, I would like to have a better Bombuzal… that silly blue circle does not look very professional… can you draw one for me?

Download source codes meanwhile…

  • Grifo

    No one did the drawing yet? I can do it if so… just let me know what it should be like. In details.

  • Emanuele Feronato

    something cute…

  • Yay thanks, I’ll help more if you need it. :)

  • its walking waaaaay to slow :o.

  • Hey styxtwo, you’re right…it does move way too slow.
    Hey Emanuele, maybe double the speed for the next tutorial.

  • David

    what’s the point of creating the ‘base’ movieclip at the beginning?

    otherwise very interesting

  • David

    doesn’t matter anymore, i’ve worked it out

  • EagleVision
  • Andre Marianiello

    The base clip was created to detect when the mouse was on the stage and when it wasn’t

  • Grifo

    There’s an MC attached to mouse coordinates, then? If that’s right, is it truly the best way to do it? Well I’m no coder so…never mind. OKay I’ll start the sprite now…so if anyone has any idea of what it should be(especially Emanuele), it will surely be helpful.

  • Grifo

    Oh my i didn’t notice that EagleVision uploaded a sprite already…well now it’s already done so I’ll link anyway…

    http://rapidshare.com/files/95465829/SpriteFeronato.fla.html

    Sorry if it looks crappy but I’m not at 100% right now, in fact my wrist’s been complicating my life lately. Now, if someone else could take care of platforms…

    That’s it and sorry for the “crappy style” -_-

  • Hey, Grifo, could you upload it to mediafire.com

    Thanks, proboly yours is way better then my blob. lol :)

  • Grifo

    OK I’ll try it in a minute. And Thx for being the only one that said something about it, even tho u didn’t see it yet.

  • Grifo
  • EagleVision

    Your Welcome! :D
    I am about to see it….

  • Ok…I am using Flash 8 Pro…If you can provide the .swf, it might work.

    Or you could convert it, thanks! :D

  • Pingback: From zero to Bombuzal - step 4 : Emanuele Feronato - italian geek and PROgrammer()