Go Back   kirupaForum > Flash > Game/AI Programming

Reply
 
Thread Tools Display Modes
Old 10-09-2003, 08:36 PM   #1
Marz
Artificially Respawned
 
Marz's Avatar
Location Shippensburg, PA

Posts 1,891
Video Game Programming Tutorials

This is where I will be processing and showing you how to create video games through the use of programming. I'd really appreaciate it if you would create a seperate TOPIC to reply to these.

The topics highlighted in GREEN are currently DONE and listed below. The topics listed in BLUE are currently being worked on and the ones in red are going to be done in the future. I understand that I don't have alot of time at times, so these tutorials may come slow.. But they will come

Introduction to Video Game Programming
  • What do I need? What should I know?
  • What are design documents?
  • Getting to know how to flowchart.
  • Game Types and Examples
  • The elements of a Video Game

Role Playing Games
  • What makes a Role Playing Game?
  • Storyline
  • Secret of Mana Style
    --------------------------------------------
  • Character Movement and Animation
  • Character Attacking / Fighting : Part 1 (Regular Attacks)
  • Character Attacking / Fighting : Part 2 (Power Up Attacks)
  • Drawing and Setting up the Enemies
  • Handling Enemy Attack Animations
  • Enemy AI : Part 1 (Setting it Up)
  • Enemy AI : Part 2 (Putting it in Motion)
  • Enemy AI : Part 3 (Bosses and Advanced AI)
  • Setting the Scene : Part 1 (Drawing Tiles)
  • Setting the Scene : Part 2 (Placing Drawn Tiles)
  • Setting the Scene : Part 3 (Depth and Tips)
  • Setting the Scene : Part 4 (Inside Buildings and Transitions)
  • Inventory : Part 1 (Drawing Items on Screen)
  • Inventory : Part 2 (Inventory Screen Developement)
  • Inventory : Part 3 (Using Items)
  • Inventory : Part 4 (Weapons and Armor)
  • Meters and Bars : Part 1 (Life / Health Points)
  • Meters and Bars : Part 2 (Magic / Magic Points)
  • Inventory : Part 3 (Power Gauges, Attack Gauges and More)
  • Handling the Dialogue or Chat Messages
  • Inventory Shops and Buying / Selling Items
  • Drawing the Entire Screen
  • Loading Enemies by Location and Transferring Screens
    --------------------------------------------
  • Final Fantasy Style
  • More to come shortly.....

Other game types will be announced as soon as I get around this time... This is a work load as is... I'm starting the first one tonight for ya all though... What do I need and what should I know.

__________________
aiMarz : v. 7.03a - Current Version is : Mildly Disturbed

Last edited by Marz; 02-04-2004 at 01:56 PM..
Marz is offline   Reply With Quote

Sponsored Links (Guests Only) - Register | Need Help?

Old 10-09-2003, 09:16 PM   #2
Marz
Artificially Respawned
 
Marz's Avatar
Location Shippensburg, PA

Posts 1,891
What do I need? What should I know?

Well first off, since we are developing these games in Flash.. I'd highly suggest having either Flash MX or Flash MX 2004. I still only have Flash MX but it's perfectly acceptable as a form of game creation.

Then.,. Comes the side resources.. If you want sparkling good graphics and awesome tones, then I'd suggest grabbing a high quality graphic design program such as Adobe Photoshop. There are other products that will work just fine.. Like 3D Studio Max if you wanted to create a 3-dimensional feel to the game.

You will also need to have some sort of sound recording device. My personal favorite would have to be Fruity Loops.. With an extremely wide variety of options and functionability and a rather cheap price too. It has got to be one of my favorite sound recording and editting programs. Likewise with sound programs, there are many, choose what you can get comfortable with.

Now. There are some other programs you could get familiar with, but these will take care of most of the headaches that you will come against.

Now... What should you know? You should be very familiar wiht the Actionscript langauge.. Whether it be AS 1 or AS 2. You should also be familiar with how a video game works.. The best advice I can give for this is to go play one.. Try it out.. You know what a bad game is and what a good game is.. So use that as a judgement.. What pisses you off about a game.. What makes you happy.. Developement around feelings and not "surprises".

Now.. Last but not least.. The one thing you WILL need... Is PASSION... You will need the passion to code through an entire engine just to have to recode it over 3 or 5 times.... Just to get it running fast enough for what you want.. You will need the passion to work on this until the middle of the night when your eyes feel like a ball of lead about to fall off a table.. This passion is what drives people such as myself and such as the folks at Blizzard for instance.. To make great games!

These are just a couple of tips to start off with... Now.. On with the Design Documents..

__________________
aiMarz : v. 7.03a - Current Version is : Mildly Disturbed
Marz is offline   Reply With Quote
Old 10-09-2003, 09:52 PM   #3
Marz
Artificially Respawned
 
Marz's Avatar
Location Shippensburg, PA

Posts 1,891
What are design documents?

These will literally save you countless numbers of hours. This is a book of how the gnines of the game will be developed, characters will be devewloped, ideas will be jotted down and it will be organized in a manner that you or your team can concisely stay on track of things.

This design document at it's final version will very RARELY change... There is nothing worse then someone sitting above you changign the design document after 2 months of working on something just because they think the idea is "COOL"... And indeedly making you go back a month just to change things around and ultimately ****ing everything up! You wouldn't believe how annoying it was.. Until you try it.. hehe

Now... A design document should have everything in it clearly stated. If you want the one character to be able to jump, how high do you think he should jump, how long and can he jump in 3D or is it just a 2D game. it should brief down just about everything of the game.. But not go into TOO much detail. DOn't tell me that the character has blonde hair and has an infected right arm that makes him scratch like a dog. Not needed, way too much information. Just anything that a programmer will need to know. Like, can he attack, can he jump, can he move, can he crawl? Stuff like that.

You should start by introducing the team (if there is one) in the very start of this document, so that others are familiar with who is who. If they haven't already met that is. You should right down what equipment you'll need to do the game, what type of game it is (genre), what style the game, what are the game elements. This is basically your all out gaming notebook and is highly important. This also makes sure you keep track with your current subject and try not to add things in when you know it will just cause havok.

Keep in mind about this document, it isn't "needed" but it should be included with every game project you have. Just for the sake of having it there.

Now, let's move on to the next idea of sketching.. For the programmers out there... FLOWCHARTING!

__________________
aiMarz : v. 7.03a - Current Version is : Mildly Disturbed
Marz is offline   Reply With Quote
Old 10-09-2003, 11:01 PM   #4
Marz
Artificially Respawned
 
Marz's Avatar
Location Shippensburg, PA

Posts 1,891
Getting to know how to flowchart

Flowcharting.. WTF is that?!

Flowcharting my friend is a programmer's BEST FRIEND. If you have ever taken a programming course for C++ or pretty much everything, then my guess is that you know how to do something like a flowchart. Now, over the years of programming I have developed some different methods of flowcharting. Some for more business reasons, others to just remind me of things.

What is it really though? Flowcharting is a graphic and text based summary of what you are going to program and how you are going to piece it together. It typically gets drawn on a piece of printing paper and is usually scratched out and redone 500 times during the developement of the game! *lol*. But, no matter what, it can save you loads of time when getting into the real programming comes around.

This my friend.. Is what a typical flowchart might just look like. Allright.. Seeing as how my scanner is being entirely ghetto, I'm going to have to display this through a Flash Drawing :-D



Allright, I know it's very small but at the same time, it conveys what a flowchart might look like and some of the elements found in a flowchart. I know, I know... It doesn't look like a flowchart you might see in a real programmer's hands, but it still shows you what a flowchart is.

Now... A real programmer's flowchart will be alot more complex.. Sometimes it will look something like this.



Now, looks complex doesn't it? Multiple that by about 50 and you'll have yourself a working game flowchart! *lmao*... But no worries.. It can be a pain, but like I said.. it can help out tremendously.. Each symbol in a flowchart has its own function and use.

Like, the diamond symbol is used for an if type statement. Basically stating that if, this happens.. Go this way, if it doesn't happen go this way or if this happens go this other way..

On with the flowcharting symbols...

Diamond : Used for if statements. Each msg branches off in a different area, each with their own line.

Box : Can be used to describe functions, variables or anything really. The function, variable name is located at the top in the gray area and the information and description about the object is located in that box right below it. Also, if it returns a value (true or false).. Then seperate lines can be drawn off this function as well if it goes well.

Parallelogram : Is used to actually state the function and use it. This is where the action typically happens. throwBaseball() for instance... And if returns anything, then that is when you start to branch off with different lines.

Solid Box : This is where you put the final layout image, or whenever you print to the screen this is what happens!

Lightning Bolts : Are used for debugging and termination. If you run into this area, your program should quit in an error or terminate without saying. A problem should occur at these areas. This is great for debugging everything.

These are all of the basic symbols, if you have any problems using these or if you need a better description of what to do with these, ask and you shall receive at ai_marz@hotmail.com

The next tutorial on line is.... GAME TYPES and EXAMPLES!

__________________
aiMarz : v. 7.03a - Current Version is : Mildly Disturbed

Last edited by Marz; 01-14-2008 at 01:22 PM..
Marz is offline   Reply With Quote
Old 10-10-2003, 12:31 AM   #5
Marz
Artificially Respawned
 
Marz's Avatar
Location Shippensburg, PA

Posts 1,891
Game Types and Examples

Allright.. Now I will describe to you the many different game types availible and I will give you a couple of examples of those game types. You might hear me off and on use the word genre also. It's basically the same as "game type".

Role Playing Game (RPG) : A role playing game is typically a game that is very long and drawn in. There aren't too many RPG's out there that does not require over 20+ hours of your life. Some fine examples of RPG's are Final Fantasy, Dragon Warrior, Breath of Fire, Secret of Mana and other many varieties. Typically a RPG involves a group of characters that you need to build up or develope to reach a common end goal. To get to this goal, you will need to strengthen your character by leveling him up or gathering new equipment.

First Person Shooters (FPS) : A first person shooter are more popular amongst the multiplayer world than the single player world. Albeit, some single player FPS games have captured our attanetion very well. Some fine examples of a FPS game would be Half-Life, Counter-Strike, Doom, Castle Wolfenstein and many other types. A first person shooter puts you into the role of a single character toting many weapons and the common goal of reaching the end, escaping doom and all that fun stuff. When playing in a multiplayer game, you can play in a FFA (Free For All), Team game or any other variaties.

Real Time Strategy (RTS) : The role of a real time strategy game is to put the strategic part of your mind into the views of a fast paced environment. Typing your goal in a RTS game would be to defeat the opposing army with an army of yours that you have to build up by getting resources. Fine examples of RTS games would be Starcraft, Warcraft, Total Annihilation, Command and Conquer and many other varities of games as well.

Sports Games : Allright well, the sports genre typically denotes those sports at which you can play in real life. Sports like, skateboarding, snowboarding, tennis, basketball, football and likewise. Typically games like this are demured to those who are hardcore into the sports scene. They feature real life pro teams and they put you into the game so to speak.. Some good excmaples of games like this would be Madden NFL, Cool Boarders, NBA Slam, and many others... PGA Tour Golf, Tiger Woods Golf, Brunswick Bowling.. As you can see the sports topic and genre revolves around the biggest series of games out there.

Racing Games : I think racing games are hella fun. Typically they revolve around one of the follwing: stunts, speed, tricks, colissions, or any of the above together. Off-road Racing and Need for Speed are fine examples. It can be trucks, snowboards, skateboarding, dune buggies, sports cars, basically EVERYTHING! Some awesome games in this topic could be Need for Speed, Moto Racer, Offroad Racing and other titles as well.

Puzzlers : Puzzle games are another variety that is very popular. Your typical puzzle game can include everything from chees and checkers to your lonely Marble Madness. This genre is way too undefined to actually write a source for. Let's just say, if it involves your brain in a puzzle type environement, it's a puzzler!

Other types... Allright everyone.. I basically went over some of the main types you would see in a Flash Environment.. Strategy Games, Pinball Games, and many other varieties do exist... And If I feel like it someday.. I will actually put some opf those smaller types down in here.. But for now, this list compensates alot of thought and effort and I think it is sufficient enough.

Now... next tutorial is.... Da da da..... The Elements of a Video Game.

__________________
aiMarz : v. 7.03a - Current Version is : Mildly Disturbed
Marz is offline   Reply With Quote
Old 10-10-2003, 01:48 AM   #6
Marz
Artificially Respawned
 
Marz's Avatar
Location Shippensburg, PA

Posts 1,891
The Elements of a Video Game

There are so many different elements found in a video game that naming them all would become an all week chore. So I'm just going to go over some of the basics here and then in each section (RPG, FPS and whatnot) I will frther explain some more that are more associated with that game.

Graphics Engine : This powers the graphics behidn the game. You may be thinking that because you have Flash that you already have that.. SORRY GUYS... But you also have to think about how to load in tiles, characters, weapons, magic and all that ****. PLUS, you have to make sure that it is fast enough to pull all this in 40 FPS. Something that is very demanding about games is the need for a constant speed. No slowdown allowed.

Sound Engine : You are going to have a pretty bland game unless you liven it up with some music or sound effects. But, this is also one of those processor drivers! What a pain in the *** huih?! So basically, you are going to have to figure out how to do the graphics and the sound in 4- fps? oh yes.. And that's not everything.. Just wait til you gte to the real game management programming. I told you you need passion!

Characters : Most of the game types are going to revolve around choosing some sort of character and driving that character throughout the world of that game. So, what is the big deal? Well you have to make your character fit that game so well that it makes the gamer dive into and grab feelings for the character. Make the gamer feel emotions and he'll wnat to play your game for hours on end!

Storyline : This is what that character or object goes through to basically establish your feelings or emotions. One of the best storylines out there has to be from Final Fantasy 7. I've heard of people crying when Aeris, the one character in the games dies. One of the first games to make a character die, it was tragic.. But it got people to hate Sephiroth so much that their vengeance drove them mad into the game. THIS is how a storyline should be.

There are many other elements, like physics, gameplay and other stuff.. But right now.. I'm tired.. So I will gte to those tomorrow.. Goodnight everyone.

__________________
aiMarz : v. 7.03a - Current Version is : Mildly Disturbed
Marz is offline   Reply With Quote
Old 10-10-2003, 10:48 PM   #7
Marz
Artificially Respawned
 
Marz's Avatar
Location Shippensburg, PA

Posts 1,891
What makes a Role Playing Game?

This is actually an ongoing debate on many forums now-a-days. What really makes a RPG stand out from another RPG?

Well.. If you ask some people, they would tell you that it is the Storyline that makes the RP game unique... But then there are those who would say that the Characters are what makes it unique. How about the battle system or the maps or the ..... Now you udnerstand where I'm coming from.

If you ask me, it takes all of those to make a great RPG. Now, as a programmer though, what are the things you are going to have to worry about when you try and figure out what to do with the RPG...

Well.. For one, you will need to have a **** good story written up. I'd highly suggest that if you yourself are not creative enough to do this, to find the most creative mofo around to do this for you. It needs to be intense and it needs to be done in a dialog system at times as well.

Next, I would say you would have to start working on the graphics system, no matter what you will need something that looks unique when compared to all the other RPG's out there. We don't need 50 million Zelda look-a-likes and I know that for sure. The graphics engine is very important because, well... Let's face it... Even thoguh Flash is graphics based.. You can't just have all the game's graphics sitting there in one file.. it wouldn't even run at 1 fps... So you'll have to have some sort of loading up feature.. Tiling system, or whatnot.

Now, the sound engine doesn't have to be completely extravagant.. Therefore this topic probably won't be a very long one. But, still there is the possibility that you will wnat to have multi-layered sounds with music and sound effects. So that's what this section will be all about.

Character Developement... Why so far down the list? because this is the one that takes alot of thought. You will need someone extremely creative and it usually ends up being the person who is writing the story. As he will see the most likely characters in his own story of course. Then, while astethic desinging of a character is all good.. And so is a profile. How will this character fight, walk, jump, magic, limits, stats, items, steal? All of those are legitamate questions.. And that doesn't even get close to how much you'd really have to touch base on.. Strength, Intelligence, how are stat points done? What about levels? This we will all touch base on.

Battle system... Much like the character developement.. has to be well thoguht out.. An overly easy system will draw people away form the game while an overly complex one will do the same. Make it a happy little median that's not too hard or too easy, and you have yourself a winner!

Turn based or Real Time... This is a question.. To find out the difference betwene these all.. Look at these three games... Secret of Mana (real time), Final Fantasy 7 (real time wlaking, turn based fighting), Final Fantasy Tactics (turn based all around)... Then you will figue this out..

These are the basics behind an rpg.. Of course you have stuff like dialog boxes, inventories and all that other good stuff. But they will all come in due time.. In their each little individual packet of information.

Now.. Onto the Storyline!

__________________
aiMarz : v. 7.03a - Current Version is : Mildly Disturbed
Marz is offline   Reply With Quote
Old 10-13-2003, 12:21 AM   #8
Marz
Artificially Respawned
 
Marz's Avatar
Location Shippensburg, PA

Posts 1,891
Storyline

Allright well. Sorry for the lack of update last night. Ran into some server problems.. But enough with that and onto RPG Storylining.

Creating a storyline for a RPG is like creating a graphic novel. You have to create an imagery for the graphic artists to create with and characters that the player has to interact with. The moment your story gets too bizarre or too off-track, the entire RPG is ruined. Just think about it, if Cloud would have been killed instead of Aeris in FF7... Would we really have cared as much? NOPE!

The main focus to watch out for in any Role Playing Game Storyline is to make it relate to something that happens in the real world. That way, people who play the game, can somehow relate to the characters they are playing. The number one example that people use in great RPG's is religion. The second best would have to be the constant struggle of good and evil.

So.. What should your goals be when you create a storyline for a RPG. Well.. For one thing. Choose what the whole tale is going to revolve around. The hidden meaning behidn the entire story. Are you going to be challenging God the entire time or are you going to be saving the Earth from destruction? How about the intergalactic time space intertransportating system? Once you figure this out, start developing the world that you will be living in. Create maps if necesary, this will help you out tremendously. Getting a visual look at things always helps. Buy a sketch pad and about 50 notepads. (those .10 cent things you can get at Wal-Mart) and strat jotting down notes and drawings here and there. I probably have a closet full of notebooks at home with programming in them, and that's not getting to my art collection! :-D

Now.. Start developing the main character and his accomplices.. And then start writing some stories. What do you want the characters to go through. How many ways can they make it through those problems? Wll there be complicated puzzlkes on their way or just strong monsters. This is something you will have to ask yourself. If you want to go into it deeply, make a script for the characters to talk out in. For the complete dialog system. The whole reason a RPG takes longer than any other game to make is the story itself.

These were just a couple of pointers about the storyline itself. I personally, am not a writer.. But I will have my creative writer (the person writing my storyline for my RPG) to put some addendums on this then. He can go into detailed explanations of how to write an engaging storyline better than I can.

Now.. On with some real programming eh? With the GRAPHICS ENGINE!

__________________
aiMarz : v. 7.03a - Current Version is : Mildly Disturbed
Marz is offline   Reply With Quote
Old 10-15-2003, 10:57 PM   #9
Marz
Artificially Respawned
 
Marz's Avatar
Location Shippensburg, PA

Posts 1,891
Character Movement and Animation

In this tutorial, you will learn how to make a character walk across the screen and animate at the same time. With this, you can create multiple characters and then move them around with the simple use of your arrow keys.

The first thing you need to do is create your character. For now, it can be a simple pixel character, like such:



Cute little guy isn't it? I'd say so myself *thumbs up* But now, let's animate this guy in designs. He kind-a looks boring standing there like that... The easiest way to do this is .gif by .gif in photoshop or your favorite designing tool. I'll show you a series of animation.



With this series, you can see my pixel guy walking to the east. Not too hard not too fancy smancy either. This is all about programming, not designing. I'm sure all you designers can come up with some more in depth images but for me for now, I can't *lol*.. The final animations should look something like this when completed.



Anyways. Now, we will want to put these into Flash somehow so we can animate them and use them to their full advantage. So we will simply import them into your library.

Easy enough.. You should have a whole list of animations sitting in your Flash Library now.. Now, open up the Insert Menu and go to -> New Symbol. Create a MovieClip..

Open it up and insert all of your animation files.. But insert them in this sort of way...
  1. northstanding01
  2. northwalking01
  3. northstanding01
  4. northwalking02
  5. northstanding01
  6. southstanding01
  7. southwalking01
  8. southstanding01
  9. southwalking02
  10. southstanding01
  11. eaststanding01
  12. eastwalking01
  13. eaststanding01
  14. eastwalking02
  15. eaststanding01
  16. weststanding01
  17. westwalking01
  18. weststanding01
  19. westwalking02
  20. weststanding01

Also, while you are in the moveiclip, open up Frame 1's Actions Menu and add this one line of code.

[AS]stop();[/AS]

That is all you should need. If you wnat to check out what it will somewhat look like, go ahead and open up the COntrol Menu and go to -> Play. It should play through the frames to give you a clue what it will look like in the end.

Now, head back to the main _root canvas in Flash and get ready for the real stuff.

Open up your library if you don't already have it open and go ahead and move your walkingMan onto the canvas. Now we have a walkingMan sitting on the canvas. Easy enough, now give it an instance name. Throughout this tutorial I used the name walkingMarz to interpret my guy. Just change all instances of walkingMarz to the name of your man to get it to function correctly.

Then.. Open up the first frame's action window and copy and paste this here code set.

[AS]
MovieClip.prototype.moveMan = function(moveX, moveY, facing)
{
if(_global.aniMation == 5)
{
_global.animation = 1;
}
else
{
_global.aniMation++;
}
currentFacing = (facing * 5) + _global.aniMation;
this.gotoAndStop(currentFacing);
this._x += moveX;
this._y += moveY;
}

_root.onEnterFrame = function()
{
if(Key.isDown(Key.DOWN))
{
walkingMarz.moveMan(0, 5, 0);
}
if(Key.isDown(Key.UP))
{
walkingMarz.moveMan(0, -5, 1);
}
if(Key.isDown(Key.RIGHT))
{
walkingMarz.moveMan(5, 0, 2);
}
if(Key.isDown(Key.LEFT))
{
walkingMarz.moveMan(-5, 0, 3);
}
}

_root.onLoad = function()
{
_global.aniMation = 1;
}
[/AS]

This is what runs our moving character. It animates him as well. Let's take a look at each prototype and regular function and see how I did it.

First..

[AS]
MovieClip.prototype.moveMan = function(moveX, moveY, facing)
{
walkingAnimations = 5;
if(_global.aniMation == walkingAnimations)
{
_global.animation = 1;
}
else
{
_global.aniMation++;
}
currentFacing = (facing * walkingAnimations) + _global.aniMation;
this.gotoAndStop(currentFacing);
this._x += moveX;
this._y += moveY;
}
[/AS]

I placed the function moveMan in a simple MovieClip.Prototype Function. If you do not understand what a prototype function is, there are plenty of references about it and what it does here at kirupa.com, just do a search around for them.

[AS]
walkingAnimations = 5;
if(_global.aniMation == walkingAnimations)
{
_global.animation = 1;
}
else
{
_global.aniMation++;
}
[/AS]

This basically guides what animation your character currently is on. If each one of your wlaking cycles has more than 5 animations.

standing, walking1, standing, walking2, standing

Say.. it was more..

standing, walking1, walking2, standing, walking3, walking4, standing

Then you would set walkingAnimations equal to that number... 7 in the second case, 5 in the first case. If you wanted to, you could make a fourht argument in the prototype line to carry this number. That way say.. You eastern walk could be 5 animations but your western walk could be 7. The possibilities here are endless

The rest of this just basically loops through the animations then. Making sure they get processed in the correct order. The _global.aniMation is a variable that holds what animation you hit last.. maiing sure everything is ambiguous.

[AS]
currentFacing = (facing * walkingAnimations) + _global.aniMation;
this.gotoAndStop(currentFacing);
this._x += moveX;
this._y += moveY;
[/AS]

These next four lines of code finish off the function. the currentFacing variable gets set with the current facing (0 for south, 1 for north, 2 for east and 3 for west). With this number it is multiplied by the number of wlakingAnimations in that set and then the current animation that will be playing is then appended to the end of this. Giving you the frame that should play to gte the right animation.

This frame is then gone to using gotoAndStop(currentFacing);

Along with these lines of code. The current MovieClip (walkingMarz in our case) gets moved in the right x and y directions depending on which key was hit.

Now.. Onto the next function... The main function of this movie.

[AS]
_root.onEnterFrame = function()
{
if(Key.isDown(Key.DOWN))
{
walkingMarz.moveMan(0, 5, 0);
}
if(Key.isDown(Key.UP))
{
walkingMarz.moveMan(0, -5, 1);
}
if(Key.isDown(Key.RIGHT))
{
walkingMarz.moveMan(5, 0, 2);
}
if(Key.isDown(Key.LEFT))
{
walkingMarz.moveMan(-5, 0, 3);
}
}
[/AS]

Anyways... This is a pretty sefl explanatory set of code... Basically it is four if statements saying that if a person hits a certain key (Key.isDown()) then you do the actions found in that if statement.. So basically..

if(Key.isDown(Key.DOWN)) then if the DOWN arrow is hit, it will perform the function walkingMarz.moveMan(0, 5, 0);

The same goes with all the other if statements except they have different values passed into the arguments of the moveMan function.

The last function in the list of functions however is the easiest....

[AS]
_root.onLoad = function()
{
_global.aniMation = 1;
}
[/AS]

This just basically tells the movie to set the aniMation to a global variable and to set it's starting amount to definition. This will never be loaded again during the coarse of the movie after it's officially loaded up.

Now.. That wasn't too hard was it? If any of you are having problems with this tutorial, please e-mail me at playamarz@mentalconcepts.com immediately and I will try to resolve the issues. The .fla is attached to this post and here is my final .swf.

[swf="http://www.mentalconcepts.com/game/walking.swf height=300 width=300"][/swf]

Now.. Onto getting your character to attack things! (change things around again... sorry) hehe

__________________
aiMarz : v. 7.03a - Current Version is : Mildly Disturbed
Marz is offline   Reply With Quote
Old 02-03-2004, 06:29 PM   #10
Marz
Artificially Respawned
 
Marz's Avatar
Location Shippensburg, PA

Posts 1,891
Allright everyone. I know it has been a while since my last post but I promise I'm not done with these. I've just been trying to finish off all the art I'll need to do for all of these tutorials first, so I can just plow through the code like it is nothing.

Also, there is a HUGE update on how I will be presenting the Game Programming Tutorials and I'm going to provide a new list of tutorials I plan on writing. These were put into careful consideration.

Secret of Mana Style
  • Characater Attacking / Fighting : Part 1 (Regular Attacks)
  • Character Attacking / Fighting : Part 2 (Power Up Attacks)
  • Drawing and Setting up the Enemies
  • Handling Enemy Attack Animations
  • Enemy AI : Part 1 (Setting it Up)
  • Enemy AI : Part 2 (Putting it in Motion)
  • Enemy AI : Part 3 (Bosses and Advanced AI)
  • Setting the Scene : Part 1 (Drawing Tiles)
  • Setting the Scene : Part 2 (Placing Drawn Tiles)
  • Setting the Scene : Part 3 (Depth and Tips)
  • Setting the Scene : Part 4 (Inside Buildings and Transitions)
  • Inventory : Part 1 (Drawing Items on Screen)
  • Inventory : Part 2 (Inventory Screen Developement)
  • Inventory : Part 3 (Using Items)
  • Inventory : Part 4 (Weapons and Armor)
  • Meters and Bars : Part 1 (Life / Health Points)
  • Meters and Bars : Part 2 (Magic / Magic Points)
  • Inventory : Part 3 (Power Gauges, Attack Gauges and More)
  • Handling the Dialogue or Chat Messages
  • Inventory Shops and Buying / Selling Items
  • Drawing the Entire Screen
  • Loading Enemies by Location and Transferring Screens

And there you go.. I know this has changed alot.. But I plan on keeping the current settings for this.. If anyone at all would like to help out in the Pixel Artist position. It isn't hard at all to fill in and I'm not a dictator..

__________________
aiMarz : v. 7.03a - Current Version is : Mildly Disturbed
Marz is offline   Reply With Quote
Old 06-08-2006, 08:11 PM   #11
xxj4dx
xxj4dx
 
xxj4dx's Avatar
wow this is kewl
xxj4dx is offline   Reply With Quote
Old 06-08-2006, 09:19 PM   #12
mofongo9
Registered User
really really interesting.

ive always wondered, though, what code do video game programmers use? what program? or just from scratch? wat?
mofongo9 is offline   Reply With Quote
Old 06-09-2006, 02:12 AM   #13
Templarian
Moses = Jedi
 
Templarian's Avatar
Location Kalamazoo, MI In a Galaxy Far Far Away

Posts 8,464
oh wow a marz post... too bad he left. smart guy.

off topic:
-------------------------

http://www.harveycartel.org/metanet/tutorials/tutorialA.html mostly understand trig in ever aspect and you will understand a very very small part.

Code: C++.
Program: VC++ (this is large scale).
Engines: Havok, Ogre. There are really a ton.


__________________

Join #kirupa | WebOS Blog | COLORlovers | DM | Jeff
Templarian is offline   Reply With Quote
Old 06-09-2006, 02:35 AM   #14
lone_wild_wolf
Ambitious noobing
 
lone_wild_wolf's Avatar
Location Flash Heaven

Posts 59
he left?^

__________________
OpenFor

PM's
lone_wild_wolf is offline   Reply With Quote
Old 06-09-2006, 03:32 AM   #15
hybrid101
iAm t3h hybrid
 
hybrid101's Avatar
Location In my House

Posts 6,172
yes, he did.
didn't i see him post last year?
about some secret project
hybrid101 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:47 PM.

SHARE:

SUPPORTERS:

cdn
content delivery network (cdn)

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Copyright 2010 - kirupa.com Copyright 2010 - kirupa.com