Monday, February 29, 2016

Cocos2dx Tutorials

Cocos2dx is a free game development tool for IOS, Android, Windows, Mac, and Linux used by many developers. This tutorials teach how to setup game engine based on android platform, a basic, intermediate and advance codes used in game development.

This tutorials is suitable for developer with no programming knowledge who then learn basic C++ in short time. Note : All tutorials are run on android platform


  • Basic section represent how to use simple code such as insert sprite, MoveTo, RotateTo, FadeIn etc.

Monday, February 8, 2016

Cocos2dx Game and GUI template for sale

This template is suitable for those who want to gain knowledge from newbie to expert on cocos2d-x and speed up game development by reuse source code or re-skin this template.
Features:
  • Use Cocos2d-x V3.10
  • Android platform. Compatible with iOS, mac, win32 and linux (not tested)
  • Multi resolution (tested on 1920x1080 resolution)
  • Scenes transaction
  • Scenes animations
  • Loading scenes(loading assets)
  • Popup animations
  • Popup animation when achieve 1,2 and 3 stars.
  • Helicopter animation(Sprite animation)
  • 2 levels example with 3 stars collectable
  • Collision between Helicopter and platforms
  • Game logic for helicopter, moving platform, star counting and fuel depleted
  • Game logic for scene transactions
  • Easy to re-skin and reuse source code
Or buy from this site https://sellfy.com/p/dfYt

 

 

 

 



Other feature:

Sunday, January 24, 2016

Cocos2d-x C++ Schedule update Level 2

Cocos2d-x C++ Schedule update Level 1 http://gamesculpt.blogspot.com/2016/01/cocos2d-x-c-schedule-update.html

From Schedule update level 1 tutorial was to show how to implement schedule update into your game. For this tutorial level 2 will show you how to add game logic into your games using schedule update method.

Lets make simple game logic. We're going to make the sprite jump when button pressed.
The flow chart above show how game logic implement into your game where when button is press, the variable touch will turn into TRUE, thus variable goUp will frame by frame add 3 pixels. Therefore when the button is release, the variable touch will turn into FALSE. if FALSE and goUp variable is over 0, the goUp variable will frame by frame subtract 3 pixels. The video below will show how it done.
Source Code https://github.com/GameSculpt/Cocos2d-x-Tutorial-schedule-update-Level-2.git

Cocos2d-x C++ Schedule update Level 1

The function of schedule update where the frame is update time to time, this is necessary for initialize game logic frame by frame. For example;

This video tutorial will show how to implement schedule update to your game, the sprite will move up using this method.

Cocos2d-x C++ Button

The button is implement into the game where player will interact by clicking/ touching to make something happen. For example, when player tell the game(touch button) for navigating the object's positions or open another scene.

This tutorial show how to implement button to your game where when the button is press and then release, it will create another sprite to the screen.
Source Code https://github.com/GameSculpt/Cocos2d-x-Tutorial-create-button.git

Saturday, January 23, 2016

Cocos2d-x C++ Setup Audio

In gaming industry, audio is a must component for making game more interesting. This tutorial show how to implement audio system in your game.

Aside playBackgroundMusic(), there are more function that you can apply,
  • stopBackgroundMusic(bool releaseData=false)
  • pauseBackgroundMusic ()
  • resumeBackgroundMusic ()
  • rewindBackgroundMusic ()
  • willPlayBackgroundMusic ()
  • isBackgroundMusicPlaying ()
  • setBackgroundMusicVolume (float volume)
  • playEffect (const char *filePath, bool loop=false, float pitch=1.0f, float pan=0.0f, float gain=1.0f)
  • pauseAllEffects ()
  • resumeAllEffects ()
  • stopAllEffects ()

Friday, January 22, 2016

Cocos2d-x C++ Actions

To move, scale, rotate etc of sprite are called action for making game more interesting. Action make the sprite change it properties in time.

Example of MoveTo Action;
//Create MoveTo Action
auto move = MoveTo::create(3, Vec2(100, 150));
//Assign MoveTo Action to spriteName
spriteName->runAction(move);
This represent sprite moving to coordinate 100,150 over 3 seconds

Source Code https://github.com/GameSculpt/Cocos2d-x-Tutorial-MoveTo-.git

Other actions examples;
RotateTo
//Rotate 180 degree over 2 seconds
auto rotate = RotateTo::create(2.0f, 180.0f);
spriteName->runAction(rotate);


ScaleTo
//Scale 2 times bigger over 2 seconds
auto scale = ScaleTo::create(2.0f, 2.0f);
spriteName->runAction(scale);

FadeOut
//Fade out sprite over 2 seconds
auto fade = FadeOut::create(2.0f);
spriteName->runAction(fade);

TintTo
//Tint to green over 2 seconds
auto tint = TintTo::create(2.0f, Color3B::GREEN);
spriteName->runAction(tint);

JumpTo
//Jump from center of screen to addition X=100 Y=100, 10 : jump height, 4 : number of jumps, over 2 seconds
auto jump = JumpTo::create(2.0f,Vec2(winSize.width/2 + 100,winSize.height/2 + 100), 10.0f, 4.0f);
spriteName->runAction(jump);