Advertising (This ad goes away for registered users. You can Login or Register)

PLEASE DELETE

Programming on your favorite platform, for your favorite platform? Post here
Post Reply
TheGuardian
Posts: 22
Joined: Sat Oct 29, 2011 4:25 am

PLEASE DELETE

Post by TheGuardian » Sun Jul 22, 2012 7:20 pm

UpdatedSWF.rar
Desktop.rar
First let me apologize because some people got *** off because I deleted some information in my last post the one related to action script. Now my question. I am making a flash mario game just to learn how to code works and then star making my own games. What I have by now is a working map and mario is able to move freel around it, I need him to move only following the guide lines that represent the way, but I don't know how to do that yet. I think it has something to do with collision detection, but I am still searching how to use this kind of code. I am uploading the SWF file and the code I used so far.

I am currently working on it and already figured out what to do, I am having troubles in the how to do it, but I am getting there. You can post your suggestions and all you have to say, that will help me a lot because I am still learning ActionScript.

Updating the question case thing here, I came up with this idea for this map. Instead of using collision detection in order to lock mario in the position I want and at the same time make him look true to the game when moving from point A to point B in the map, I am going to apply motion tween that react to keyboard events. I will let you guys know how did it go and I will post an update as soon as I can. I know this might not be such a great deal or topic, but it is important to me because I want to learn and if I get this one going that means that I have a future in this thing.


I did some changes on the file. This is what I got so far (download the file)in order to make Mario move in the map I am thinking of using the same kind of code used for the red arrow in the title screen just inserting extra values and extra keys if needed. Problem is that with this new fixes I am clueless of how to put mario in the map. I am programming in class files and not in the timeline because I heard that programming in the timeline is no good practice, that is the reason I have no Mario in the map. I am still open to suggestions if someone wants to help me out. For the time being I am only uploading the updated SWF file

Thanks!

Instruction
In the title screen you will be able to move the cursor arrow (red arrow) up and down.
The only option available for is 1 Player game. Select this option and press Space Bar, this will lead you to the OverWorld Map

That's for now everything you can do in it!
I am still working on it.
I am doing this as a practice because I am still learning ActionScript 3.0 and there are things I find hard to grasp

thank you for your support!


Hello again! I hope someone can help me out with this one. I am fixing the Mario thing I am doing, I got Mario to show up and to make some movement. OK here is the situation. Mario's original positions are

mapmario.x = 428.35;
mapmario.y = 207.00;

and I set up an event that moves him from that position to the next one which is

if(ev.keyCode == Keyboard.LEFT)
{
mapmario.x = 355.50;
mapmario.y = 207.00;
}
it works just fine, but then I want him to move to X= 283.15 when pressing the same key (LEFT). I have tried a lot of stuff, nothing has worked so far. I am hoping one of you guys can help me out with this one. If someone wants to see how much progress I have done, please let me know and I will upload it.

THANKS!
Advertising
Last edited by TheGuardian on Tue Oct 02, 2012 5:32 pm, edited 9 times in total.

User avatar
Xian Nox
Retired Mod
Posts: 2749
Joined: Fri Nov 05, 2010 5:27 pm
Location: Over the hills and far away

Re: Need help!

Post by Xian Nox » Mon Jul 23, 2012 11:28 am

Okay, I didn't read your code, just tried out the swf.
What you need is collision detection. Before you start with it, you need to finish two other things, namely make the sprite move around properly (aka animate only when needed, face it in the proper direction, make the movements smoother), and make your map scrollable (the second one is optional, but if you're going to make any proper game, you'll have to do it at one point).
Collision detection is fairly simple. In a game I'm making now, a set of rectangles are defined where the characters can't go, then every frame their position is checked, and if they intersect with the rectangle surrounding the player's sprite, the sprite is moved accordingly. There are plenty of tutorials and explanations lying around, but making it yourself after just reading some basic stuff might be best for your task.
Advertising

Post Reply

Return to “Programming”