Ludus Windows 8 Game Starter Kit - Pleasing the Platformer in you...

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Todays project by Christer Kaitila is a kit that will help you quickly and easily build Windows 8 Platform games. Almost painfully easy to create games... If youve ever wanted to create your own platform game, and youve got a weekend, this kit is just for you...
Windows 8 Platformer Game Starter Kit


Platformer Game Starter Kit(includes 2 HTML5-based examples)
Dont start from scratch. Our Platformer Game Starter Kit for Windows 8 will get you going with full code & free game art.
How

Feel free to take the examples, mix them up and build your own great game for the Windows Store following these steps:
  1. Download your free Visual Studio for Windows 8 for all the tools you will need.
  2. Download the Platformer Game Starter Kit.
  3. Mix it up and build your own epic game.
  4. Open a Windows Store Developer Account.
  5. Let us know about it and we can even give you free advice on making it great and help pass store certification.
  6. Publish it to the Windows Store.
We know everyone is not a game artist, so we have provided you with some free game art and other places you can find royalty-free art for your game.
Ludus Game Starter Kit

An HTML5 Platformer Game Starter Kit for Windows8 Store
by Christer (McFunkypants) Kaitila http://mcfunkypants.com
Source: https://github.com/mcfunkypants/ludus
Demos: http://www.mcfunkypants.com/ludus
Welcome to Ludus, brave adventurer!
Ludus is a dirt-simple game engine that uses html5 canvas. It was designed specifically for mario/sonic style platformer games but could be used for any genre with minimal changes. It boasts great performance, and requires only free tools.
The word Ludus means PLAY/GAME/TRAINING in latin. The Ludus engine is designed to be a great way to learn to make games.
Sure, there are bigger and more complex game engines.
This one is designed to be easy to play around with.
Why? It was created to run real-world games that have a beginning, middle, and end. It was optimized to run on less powerful systems and touch-screen tablets. It is simple, but goes beyond the level of a "tech demo" to encapsulate all the required functionality you might need to make a polished game, such as GUI and sound.
...
ITS POSSIBLE TO MAKE A GAME USING LUDUS IN A WEEKEND.
You could make your own game just by changing the artwork: it is possible to make a new game without ever touching a line of code. All you would need to do is modify the .png and .mp3 art assets as well as the level#.js level data files.
The best tool to create in-game worlds is TILED (http://www.mapeditor.org) which exports data in .json format.
Check out the example .tmx source files and see if you can make your own game! Once youve made a level, export as .json and then run the _buildlevels.bat file to convert JSON to JSONP data to a new level#.js file.
The one important thing to remember is that each layer is important. The order matters. The bottom-most layer is for regular world tiles that the player will collide with. The rest are for pickups, bouncy platforms, dangerous spikes, and so on.
Additionally, you should modify the game settings in the MAP MENU -> MAP PROPERTIES dialog. Gravity, speed and the players starting position are all stored there.
HACKING THE SOURCE CODE
The only source code file you will want to modify, if you choose to start coding, is ludus.js. Inside, youll notice all sorts of variables at the top which you can modify to your hearts content. Note that some of these variables are overwritten by whatever is defined inside the level data.
With regard to the structure of the code, the most important thing to know is that the game is controlled by STATE objects.
Each state (title screen, in-game, and between level transitions) is a class object that has a .setup(), .update() and .draw() function. You could add new states for things like boss battles, inventory screens or a high score table.
See these class constructors: function TitleScreenState() function LevelTransitionScreenState() function PlayState()
HAVE FUN!
...​
Lets take a peek at the two included example games (In Visual Studio of course!)...
4feb1a7db3812184c45493b766ca9ce8.png

fb1da46c7600ba26a96ef8f18fe3efd3.png

Both games ran for me the first time with no issues and were fun (in a platformer kind of way). Sure theres only 3 levels, but hey, if there was too much done it would take all the coding fun away!
So either start from scratch or copy off of these, this kit and the provided free artwork, framework and code will have you building your next great Windows 8 game...
5e8b04489a7e15e237203c32c4db16f8.gif


View the full article
 
Back
Top