[size=large][b]What is QuickTiGame2d?[/b][/size]
QuickTiGame2d is a 2-dimensional game engine module for Titanium Mobile that provides quick and easy api to create casual 2d games on Titanium. QuickTiGame2d runs much faster on mobile devices because it is based on OpenGL ES: the industry-standard graphics library on embedded systems. Currently QuickTiGame2d supports both iOS and Android.
[url=http://code.google.com/p/quicktigame2d/]http://code.google.com/p/quicktigame2d/[/url]
An addictive Whac-A-Mol like game "Kawaz-tan tataki!" is included as example of QuickTiGame2d.
[img]http://dl.iteye.com/upload/attachment/0062/5822/76735cfc-c2cb-31c2-88c3-c53cf8b1230e.jpg[/img]
[size=large][b]What does it look like?[/b][/size]
[size=large][b]Performance Test[/b][/size]
[img]http://dl.iteye.com/upload/attachment/0062/6739/49b4953d-3989-3fc0-aae4-e9d48e02dde0.jpg[/img]
QuickTiGame2d is a 2-dimensional game engine module for Titanium Mobile that provides quick and easy api to create casual 2d games on Titanium. QuickTiGame2d runs much faster on mobile devices because it is based on OpenGL ES: the industry-standard graphics library on embedded systems. Currently QuickTiGame2d supports both iOS and Android.
[url=http://code.google.com/p/quicktigame2d/]http://code.google.com/p/quicktigame2d/[/url]
An addictive Whac-A-Mol like game "Kawaz-tan tataki!" is included as example of QuickTiGame2d.
[img]http://dl.iteye.com/upload/attachment/0062/5822/76735cfc-c2cb-31c2-88c3-c53cf8b1230e.jpg[/img]
[size=large][b]What does it look like?[/b][/size]
// Obtain game module
var quicktigame2d = require('com.googlecode.quicktigame2d');
// Create view for your game.
var game = quicktigame2d.createGameView();
// Frame rate can be changed (fps can not be changed after the game is loaded)
game.fps = 30;
// Initialize your game scene
var scene = quicktigame2d.createScene();
game.pushScene(scene);
// Create your sprites and add them to the scene
var background = quicktigame2d.createSprite(
{image:'background.png', width:640, height:960, x:0, y:0}
);
var sprite = quicktigame2d.createSprite({image:'ball.png'});
// Sprite sheet is supported
var tiles = quicktigame2d.createSpriteSheet(
{image:'tiles.png', width:32, height:32}
);
// Add sprites to the scene
scene.add(background);
scene.add(sprite);
scene.add(tiles);
// Set sprite opacity to 50%
sprite.alpha = 0.5;
// Rotate sprite in 30 degree
sprite.rotate(30);
// Scale up the sprite by twice
sprite.scale(2);
// Z-order can be changed
background.z = 0;
sprite.z = 1;
// Called when the game is loaded
game.addEventListener('onload', function(e) {
Ti.API.info("your game is loaded");
// Change position of your sprite
sprite.x = game.screen.width * 0.5;
sprite.y = game.screen.height * 0.5;
// Select first frame of sprite sheet
tiles.frame = 0;
// sprite sheet animation is also supported
tiles.animate([0, 1, 2], 500);
game.start();
}
// Called when the game enters frame
game.addEventListener('enterframe', function(e) {
// Change position of your sprite
sprite.x = sprite.x + 1;
// Rotate your sprite
sprite.rotate(sprite.angle + 6);
}
// Called when user taps screen
game.addEventListener('singletap', function(e) {
// Note that Ti.UI.View returns non-retina coordinate even on retina devices,
// so we have to take the scale into account to process touch event.
var scale = game.screen.width / game.width;
// Change position of your sprite
sprite.x = e.x * scale;
sprite.y = e.y * scale;
}
[size=large][b]Performance Test[/b][/size]
[img]http://dl.iteye.com/upload/attachment/0062/6739/49b4953d-3989-3fc0-aae4-e9d48e02dde0.jpg[/img]
QuickTiGame2d是一个专为Titanium Mobile设计的2D游戏引擎模块,提供简洁易用的API来创建iOS和Android平台上的休闲2D游戏。它基于行业标准的嵌入式系统图形库OpenGLES,运行速度快。通过简单的代码示例和内置游戏,展示了如何快速搭建和定制游戏。

被折叠的 条评论
为什么被折叠?



