PS4 Spec


Here's the official listing of the PS4 specification, released after the event.
Main Processor:
Single-chip custom processor
CPU: x86-64 AMD 'Jaguar' 8 cores
GPU: 1.84 TFLOPS, AMD next-generation Radeon™ based graphics engine
Memory:
GDDR5 8GB
Hard Disk Drive:
Built-in
Optical Drive (read only):
BD 6xCAV
DVD 8xCAV
I/O and communication:
Super-Speed USB (USB 3.0)
AUX
Ethernet (10BASE-T, 100BASE-TX, 1000BASE-T)
IEEE 802.11 b/g/n
Bluetooth® 2.1 (EDR)
AV output:
HDMI
Analog-AV out
Digital Output (optical)


Gamification and cocos2dx updates


Well that is a nice course on gamificaiton got a good idea how this domain is works and speeding up.

And mean while in the cocos2dx they had released a new version.

I am porting the code to the new version and you can follow it from here
https://paruthidotexe@code.google.com/p/bubbleburstcocos2dx/

you can use mercurial to download and add this project to your cocos2dx solution folder
That is it you check the code and output from there on.

I will have 3 post per week from this point onwards for this cocos2dx tutorial.

cheers,
Paruthi{.exe}

Course on gamification

hi,

There will be a little delay in the cocos2dx posts.
I am taking a course on gamification
And also occupied in learning Html5, css3, js for developing a website.

thanks
Paruthi{.exe}

Step 8: Developing Game Screen

Thanks for the feedbacks, now lets go back to next step. We will create the game scene.
A game screen has the following
  • One Director
  • One Scene
    • GameScene
  • And two layers
    • GameLayer
    • HUDLayer
Steps:
0. We had already created the Director.
1.Create GameLayer and add components to it.
2.Create HUDLayer  and add components to it.
3.Finally add these both layers to the GameScene.
4.All the code goes in to GameScene.h and GameScene.cpp
You can download code from this link

Output of the GameScreen

First lets create a HUD layer:
It has a score, timer and quit button.
This will be shown on top of the game layer.
Following is the code for HUDLayer
Declaration
class HUDLayer : public cocos2d::CCLayer
{
public:
virtual bool init();
void DrawHUD();
void OnMenu(CCObject* pSender);
LAYER_CREATE_FUNC(HUDLayer);
};

Definition
bool HUDLayer::init()
{
bool bRet = false;
do
{
CC_BREAK_IF(! CCLayer::init());
this->setTouchEnabled(true);

CCLabelTTF* scoreLabel = CCLabelTTF::create("Score 12345", "Arial", 24);
CC_BREAK_IF(! scoreLabel);
CCLabelTTF* timeLabel = CCLabelTTF::create("Time 00:00", "Arial", 24);
CC_BREAK_IF(! timeLabel);

CCSize winSize = CCDirector::sharedDirector()->getWinSize();
scoreLabel->setPosition(ccp(scoreLabel->getContentSize().width/2,
winSize.height - scoreLabel->getContentSize().height/2));
timeLabel->setPosition(ccp(winSize.width-scoreLabel->getContentSize().width/2,
winSize.height - scoreLabel->getContentSize().height/2));

CCMenuItemImage* closebtn = CCMenuItemImage::create("CloseNormal.png", "CloseSelected.png", this, menu_selector(HUDLayer::OnMenu));
CCSize closebtnSize = closebtn->getContentSize();

CCMenu* closebtnMenu = CCMenu::create(closebtn, NULL);
closebtnMenu->setPosition( ccp(winSize.width/2-closebtnSize.width/2, winSize.height - closebtnSize.height/2));

// add this to the layer
this->addChild(scoreLabel, 1);
this->addChild(timeLabel, 1);
this->addChild(closebtnMenu, 2);

bRet = true;
} while (0);

return bRet;
}

void HUDLayer::OnMenu(CCObject* pSender)
{
CCScene* nextScene = MainMenu::scene();
CCDirector::sharedDirector()->replaceScene(nextScene);
}

Now create the game layer
Add a BG for now we can go in to gamelayer in later stage
Declaration
class GameLayer : public cocos2d::CCLayer
{
public:
// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
virtual bool init();

// there's no 'id' in cpp, so we recommand to return the exactly class pointer
static cocos2d::CCScene* scene();

// implement the "static node()" method manually
LAYER_CREATE_FUNC(GameLayer);
};
Definition 

bool GameLayer::init()
{
bool bRet = false;
do
{
CC_BREAK_IF(! CCLayer::init());

// Enable touch/click actions
this->setTouchEnabled(true);

CCSize winSize = CCDirector::sharedDirector()->getWinSize();
CCSprite *player = CCSprite::create("BG02.jpg", CCRectMake(0, 0, 800, 600) );
player->setPosition( ccp(winSize.width/2, winSize.height/2) );
this->addChild(player, 1);
bRet = true;
} while (0);

return bRet;
}

Finally we have to add the two layers to the game scene by
Game Layer is added to scene @ layering position 1,
HUD Layer is added to scene @ layering position 5,
So that HUD is drawn over Game. I am leaving 2,3,4 layers position as that will be used by other layers for the game. Like particles or some other gameplay like maps etc...

CCScene* GameLayer::scene()
{
CCScene* scene = NULL;
do
{
// 'scene' is an autorelease object
scene = CCScene::create();
CC_BREAK_IF(! scene);

// 'layer' is an autorelease object
GameLayer *layer1 = GameLayer::create();
CC_BREAK_IF(! layer1);
HUDLayer *layer2 = HUDLayer::create();
CC_BREAK_IF(! layer2);

// add the layers as a child to scene
scene->addChild(layer1, 1);
scene->addChild(layer2, 5);
} while (0);

// return the Main menu scene
return scene;
}


GO TO INDEX