Readonly – A simple setting which one would expect to find among the ComboBox properties in 5 seconds or less is actually a little bit of a mystery.
Read the rest of this entry »
Developing games in Cocos2d-x is fairly straightforward. Once you get your first executable running, you can’t wait to see your dream turn into reality. And so you keep coding and coding, brushing aside any minor issues which might slow you down.
As you work on your first Cocos2d-x game, you will eventually reach a point where you will start thinking about AppStore submission. Deep inside you will remember all of those skeletons in the closet, the issues you skipped in the name of progress.
Read the rest of this entry »
Occasionally you may run into a situation where you need to pop the current scene (CCDirector::sharedDirector()->popScene()) and adjust your main scene based on user’s input while on the popped scene. A good example could be a settings scene which is pushed onto the scene stack and then popped. The main scene may need to respond to the new settings (i.e. new color theme). But how do you do that when the popScene function does not result in a call to the main scene init() function?
Read the rest of this entry »
At this time it is not officially possible to develop for the new generation iPad or iOS 5.1 in general on Snow Leopard (Xcode 4.2 being the latest version) without upgrading to Lion and Xcode 4.3+. But as usual there is quite a simple workaround which you can implement yourself to get cracking again.
Read the rest of this entry »
While working on my last project – a game for small children, I have encountered a strange Cocos2d-x behavior on iPhone 4S. The game would run fine on iPhones 3, 3GS and 4 but it was showing several of my images with a weird distortion on the iPhone 4S.
Read the rest of this entry »
Layer Clipping in Cocos2d-x
Feb 16
There are countless reasons why you may need to use clipping when programmming a game. One good example is scrolling credits/instruction layer with a long text content stretching beyond the visible screen bounds.
Read the rest of this entry »
You can do amazing things with Cocos2d using only its basic features but if you learn how to use masking you can get your game up to a completely different level. You can use it to display only portions of sprites, drill holes into your sprites, dynamically paint your sprites with different textures and colorfull shades, and much more.
Read the rest of this entry »
Whe you double click a folder shortcut on Windows 7, the Windows Explorer opens at the desired but the folder tree stays closed. If you are used to setting up shortcuts for your active projects in the Quick launch menu you will probably find this to be a major annoyance on Win7.
Read the rest of this entry »
C++ – Generate a static library (.lib) from a DLL using a definition file (.def) in Visual Studio
Jan 23
You need lib.exe utility to turn the .def file into a .lib file. The utility is stored in the vc\bin directory of the visual studio directory, C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\lib.exe. But you don’t have to waste time looking for it on your hard drive. The easiest way is to use the “Visual Studio Command Prompt”. You’ll find its shortcut in the Start menu, Microsoft Visual Studio 2010, Visual Studio Tools.
Next, run lib.exe with the /def:foo.def option to generate the .lib.
Occasionally you may encounter the Internal Server Error error when you move your existing web site to a different URL or when you have just uploaded your brand new site. You notice it immediately when you try to browse the site’s menu. The Internal Server Error usually means that there is something wrong with your site’s “.htacess” file. And that is also the case here.
Read the rest of this entry »
