2d engine for iphone games with box2D for physics
C++ Objective-C C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Assets
Classes
Engine2D.xcodeproj
Engine2D
Game
TBXML_1.4
Engine2D-Info.plist
Engine2D_Prefix.pch
MainWindow.xib
MainWindow@2x.xib
README
defines.h
main.m

README

29/08/2011
-Redesign actions class
-Added a pointer in the statemanager to the eaglview class, this way we can easily add UIKit views on top of our opengl view
-Added flag to enable retina from the appdelegate


16/03/2011
-Added support for retina displays, check the new boolean value in statemanager, now you can select which assets load with this boolean value
-Added support for the 4 rotations available, comment the unneeded ones in EAGLVIEW.m
-Added support for Tiled maps, now you can choose between mappy or tiled

17/03/2011
-Added collisions method to the tiled maps, now you are enforced to create a layer called "Collisions" to get your collisions ready. Also you need to define a map property called "CollisionValue" and give the value you want, then in the tileset add a property for the "blocking tile" called block and give the same value as the map property "CollisionValue". Just make sure you put both values the same for the collision to be enabled.
example:
Map property = CollisionValue, 1;
tile property = block, 1;


18/03/2011
-Refactored Tiled class, no more 3 dimensions array, hold the layers with a single 2d array which is created dynamically to save some memory
-Added method for display animated tiles automatically, just create a new layer and add the animated tiles here. And then just create the properties in Tiled for the animated tile, 
example:
Tile number 6 within tile will be animated, so button right and add properties for this tile.
Add the properties for example with the name frame1, frame2, etc (the name is irrelevant), the important here is the value, the value will be the number of the frame to animate.
Imagine your tileset, from tile 1 to 5 they are part from an animation, so the properties will start with:
frame1 = 1;
frame2 = 2;
frame3 = 3;
frame4 = 4;
frame5 = 5;

Just doing this the Tiled class will recognize this as an animated tile and will "play" the animation as soon as the tiles will become visible.

-Added a new scene with tiled maps to show how to do this, there's a collision layer and some animated tiles in the same scene. For now the player doesn't respond to the collisions, but the collisions exits




28/03/2011
-Added Slider class, ideal for menus to have a slider to adjust values like volume or something like that.
-Some bugs fixed on widgets and fonts class



22/04/2011
-Added ActionManager class, very basic for now, just to move widgets or sprites from one position to another
-Fixed things and added rotation to sprites in BaseActor class, now all sprites responds to the rotation if any
-Added new font effects to the Fonts class
-Removed the CALinkdisplay method in EAGLView and switched to a thread for better performance
-Modified particle emitter class to accept the use of a camera, useful in games with scroll to place effects outside screen respecting the camera position









------Introduction--------
2D engine to create iPhone/iPod games. Created by Alejandro Perez 2011, licensed for free to anyone, copy, use it or do whatever with it, no need for credits if you don't want to.


Tools recommended/needed:
Mappy or Tiled for tilemaps
Glyph designer, hiero or angel code for bitmap fonts
Particle designer for particle emmiters from 71squared.com


Things included:
-Written in Obj-C
-OpenglES for sprites, it's important to maximize the perfomance to use spritesheets/atlas (call them whatever) for everything. 
All the sprites are cached using a vertex array interleaved buffer, no VBO used
-OpenAL for in game sounds
-Avplayer for mp3 music using the accelerated iphonehardware to play them
-Tilemaps with mappy, export your each layer as a .CSV file and use them in the engine
-Bitmap fonts, using Hiero or Glyph export your bitmap font and the .fnt file and use it in the engine. It's better to put the font with the rest of the sprites together in a single 1024x1024 image to increase performance
-Particle emmiter, using the 71squared class and particle designer to create your particles. This was never been so easy
-Widgets, for your menus, buttons or any other sprite.
-Animation class, use the xml included as a template and configure your game animations within the xml
-Language selector, using the default iphone language load a xml file with the texts needed for your game, take a look at the xml files provided as a example. Simple name each file with the proper termination (euro zone only) ES.xml = spanish, DE.xml = deutsch, etc,etc.
-Touchmanager
-Statemanager, to control the game workflow.
-Physics with Box2D
-Joystick class for virtual joystick support on your games
-ActionManager class for automatic movement of sprites


The engine comes with an example with a main menu and 2 scenes, one with physics and another with a tilemap with automatic scroll, like a topdown shooter. Learn how you can go from the menu to the game and return to the menu with the buttons included in the game. The top right button pauses the game, then with the game paused press the bottom right button to exit the game to the main menu.