This tutorial will go through all the basics of FlashPunk. After following it, you’ll be ready to make a simple game with this amazing library!. Browse FlashPunk tutorial direct from indie game developers. Create a simple platformer-style game from scratch using only your brain and FlashPunk! – zachwlewis/FlashPunk-Platform-Tutorial.

Author: Nazshura Moogut
Country: Australia
Language: English (Spanish)
Genre: Business
Published (Last): 28 February 2009
Pages: 186
PDF File Size: 19.55 Mb
ePub File Size: 14.84 Mb
ISBN: 839-3-83244-655-3
Downloads: 22341
Price: Free* [*Free Regsitration Required]
Uploader: Mesar

I hope you enjoyed the first part of the tutorial. Notify me of new comments via email.

Handling Collision

Much tuyorial defining animations for Spritemaps, the Input class has the define method, that lets you bundle a group of keys under one label. Both ways work the same, so you can do it whichever way you prefer.

Illegal assignment to class Player. These tutorials serve to teach you how to make games using FlashPunk, but do not teach you the basics of ActionScript3 and how to use it. The speed limit is used to define the speed of the player.

You flashounk commenting using your WordPress.

FlashPunk Tutorial: We RTFM for you.

So now, when our World is created and set active, it will tell this Entity to update and render. The player input governs the movement and animation. For this, tuotrial can use the collide function in Player again, and do this:.


Just make sure that each embedded file has a unique property reference. World is an organizational class in FlashPunk: The yutorial procedure is used for vertical movement.

With this knowledge, we can then use that assigned variable in the if-statement, since the statement will only evaluate true for a non-null value. Now we move on to implement the player into the game world! Immediately after this function is called, the game loop will start ticking and your game will run.

The last parameter is important, because it decides what type of timestep we want to use for our game.

Player to an unrelated type Class. If it is pressed, we want to increase the x coordinate by the players speed property for moving left, we just substract speed from the x property, and so on. By continuing to use this website, you agree to their use. So if we have flashpuunk Entity called Playerin it we can define hitbox parameters like this:. We then define a tutoria limit and the curAnimation variable of type String.


The function call Input.

FlashPunk Basics

Currently working on reformatting the tutorial. Those frames are then played at a certain frequency so as to simulate motion. Entity ; import net. First off, we load our spritesheet into the class ttuorial the Embed, that defines the relative filepath to the player. When FlashPunk starts ticking, the game loop updates a specific World.

Engine ; import net. This is the Engine class. To find out more, including how to control cookies, see here: But FlashPunk also supports more specific collision behavior as well. We define input labels. tutorrial

Implicit coercion of a value of type Class to an unrelated type net. For non-animations, it is enough to specify only one frame, set the framerate to 0 and set looping to false. Leave a Reply Cancel reply Enter your comment here