Oni is a fast and scalable game engine built for top quality games that run across a variety of platforms. Games made with the engine can be played on such as: iPads, iPhones, Android tablets/phones, OUYA, native Mac/Linux/Windows and the web. Oni is built from the ground up to support console/desktop quality 2D games.
Combining standard game engine practices and techniques from lower level game engines, hardware acceleration powered by Starling, shaders, physics by Nape the engine aims to push the boundaries of Flash/AIR gaming. Among its features are Smart textures, 2D lighting system, weather system, post processing effects and automatic support for lower-end devices.
Sample
package { import oni.Oni; import oni.utils.Backend; import oni.utils.Platform; import flash.desktop.NativeApplication; import flash.display.Sprite; import flash.display.Stage; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import flash.geom.Rectangle; import starling.core.Starling; import starling.utils.RectangleUtil; import starling.utils.ScaleMode; /** * Main startup class, you should extend this and set that class to your document if you don't know what you're doing. * @author Sam Hellawell */ public class Main extends Sprite { /** * The starling instance */ private var _starling:Starling; /** * Initialiser */ public function Main() { //Setup the stage stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; //Setup starling Starling.multitouchEnabled = true; Starling.handleLostContext = Platform.isAndroid(); //Get the stage dimensions var stageWidth:int = stage.stageWidth; var stageHeight:int = stage.stageHeight; //Check if mobile and set screen dimensions if (Platform.isMobile()) { stageWidth = stage.fullScreenWidth; stageHeight = stage.fullScreenHeight; } //Check if we're an iPad, if so, set minimum stage dimensions if (stageWidth == 1024 || stageWidth == 2048) { Platform.STAGE_WIDTH = 1024; Platform.STAGE_HEIGHT = 768; } //Set viewport var viewport:Rectangle = RectangleUtil.fit(new Rectangle(0, 0, Platform.STAGE_WIDTH, Platform.STAGE_HEIGHT), new Rectangle(0, 0, stageWidth, stageHeight), ScaleMode.SHOW_ALL); //Create instance _starling = new Starling(Oni, stage, viewport); _starling.antiAliasing = 1; _starling.simulateMultitouch = false; _starling.showStats = Platform.debugEnabled; _starling.enableErrorChecking = Platform.debugEnabled; _starling.stage.stageWidth = Platform.STAGE_WIDTH; _starling.stage.stageHeight = Platform.STAGE_HEIGHT; //test _starling.showStats = true; //Start! _starling.start(); //Listen for application activate NativeApplication.nativeApplication.addEventListener( Event.ACTIVATE, function (e:*):void { _starling.start(); }); //Listen for application deactivate NativeApplication.nativeApplication.addEventListener( Event.DEACTIVATE, function (e:*):void { _starling.stop(true); }); } } }
RT @as3gamegears: New: Oni (fast and scalable game engine powered by Starling and Nape) http://t.co/A7Lc1U6MYj #as3 #flash #gamedev
No demo project?
None that I could find. I’ve tried the author’s website and other repositories, but there is nothing in there.
Maybe an email to the author can give you some answers.
None that I could find. I’ve tried the author’s website and other repositories, but there is nothing in there. Maybe an email to the author can give you some answers.
It seems that this engine was developped for a purposed game : http://www.oniworld.co.uk/.
Hey guys, I’m working on a demo project as we speak! I didn’t expect this repo to go public so quickly. I’ll get one uploaded tonight.
Although if anyone would like to email me directly: sshellawell@gmail.com – I’m also organising everything, the codes really messy right now.
Thanks for the feedback, Samuel!