I found the implementation description from the author of this effect:
It surely was a lot of work to create the depth illusion in a 2D plane.
The principle is very easy though: circles start in the middle of the screen with scale 0. Then the first circle of the tunnel starts scaling proportionally to the time elapsed (linear scaling doesn't work) ...
Here's an explanation of the keys.
The sprite location within the sprite-sheet as position and size values.
Most of the current texture packing tools remove transparent areas of the image before they pack it. Imagine you got a sprite with the size of 100x100, but on the left and right there are 4 columns of totally transparent pixels. The ...
That method of moving a player left and right is a little bit complicated and can be done in a much much nicer way using a simpler class design.
Create a player class and declare cgpoint vel and pos. You will also want a CCSprite in the header file of this class:
@interface player : CCLayer
If you're going to use a perspective camera like that, you're really not saving anything by using a sprite sheet. I mean I guess you could render all of the potential walls in one quarter of the screen and then do mirroring for the other 3 quadrants, but that assumes a stationary camera.
Why would you want to use a sprite sheet anyway? You're not really ...
From the image you posted it looks like the only thing you did wrong was the order in which you applied the scale and rotation to your transformation. I don't have any experience with Cocos2D but I just mocked it up in XNA and here are the results:
And here's the transformation matrix I used in XNA. See if you can find any correlation to your code:
Scripting is generally used in bigger projects to allow non-programmers to easily add content to the game. This can be new quests, interfaces, gameplay for levels, etc.
A scripting language in itself shouldn't be difficult for a programmer to learn, what will take time is the integration into your game framework.
Whether it's worth it or not is really your ...
Lag results from the speed of light limitation, and the processing speed of network protocol translation and switching in intermediate networking devices and at end points. From yours and your players' point of view, these are invariant factors.
Game that deal effectively with lag do so by adjusting player perception of the impacts of lag. One example is in ...
Do it via events.
Spell begin is an event. Start playing the sound for that event.
Enemy getting hit by spell is also an event. If the enemy is further away and you Throw a dart, for example, you only play the second sound (dart hitting) once the dart reaches the target (if you consider Throw as a spell).
If you need to tie it to a frame (so for example,...
You don't speed up the engine, you speed up your units and their actions. For example, when you update an enemy, you usually do something like enemyDirection * enemySpeed * timePassed to get their new position. Now, if you want to double or halve the speed of gameplay, you just add this in as a factor: enemyDirection * enemySpeed * timePassed * ...
There are numerous ways of smoothening a rotation. If there is any physical meaning to it, we'll need to know what that is, but if you are merely doing it to make it appear less jerky, it is pretty arbitrary. Note that unless you know what the velocity is going to do in advance, any attempt to smoothen the corresponding rotation will cause it to lag behind ...
I actually found a simple solution!
Changed the character objects to not only include info and sprite, but also a CGPath.
Then implemented a method, to loop all character objects, and check for
CGPathContainsPoint( params ...)
CGRectContainsPoint( params ...)
Tutorial I used: http://www.youtube.com/watch?v=HxHZwzaadNQ - "The magic of CGPath"...
You can only call [self presentModalViewController...] from a UIViewController (or one of its subclasses). In Cocos2d 2.0, the CCDirector is a subclass of UIViewController, so you can do something like:
[[CCDirector sharedDirector] presentModalViewController...]
(In previous versions of Cocos2d, I think you need to latch back to the RootViewController, ...
Both are valid choices, but with Unity3D it's going to be much simpler to achieve what you want, mainly because:
Unity3D has a much easier content-pipeline. You can simply drop a lot of different image- and 3D formats into Unity and work with them, while cocos3d requires models to be in PowerVR POD format.
Unity3D has/is a visual editor, which makes it much ...
Here is the way generally followed to sub-class a CCSprite.
public class CharacterSprite extends CCSprite
// Add new custom fields or methods here,
// or override the specific methods of CCSprite
// that you want to extend the functionality of.
From your question I can understand that you are inheriting CCSprite ...
You could use something that someone has already created.
It looks like the developer who wrote that ran into some troubles using the out of the box object as well and as such he decided to write a custom solution and subsequently share it with the world!
There are several ways to go about this. Here are some ideas:
Use a 3D rendering and animation software to animate 6 different die rolls. The advantage of this is that you don't need any 3D library, as you can show the rendered animations in a 2D context. Also pre-rendered animations give you lots of artistic freedom.
In your game ...
I will talk how I render those things in my game.
My background (parallax) is divided in four segments. The game starts with the three segments on the screen, but as the player moves forward, the forth start showing up and the first starts disappearing (in the left side). Once it completes disappear, I move that segment to the front, and keep doing it. ...
My second question is that my actual game scene uses bound camera and I perform scrolling on that camera but my other scene uses the normal camera. So in this situation what to do? how to use multiple camera for single engine? or how to reset available current camera?
Our 3d game engine allows us to create as many render targets we wish. A render target is ...
Use Approach #2 (render to a small offscreen texture, then display that texture onscreen scaled up using nearest-neighbor texture sampling), because:
The asset workflow is simpler. You can edit individual pixels, without having to quadruplicate them, or manually scale everything up.
The assets will probably take up less space on disk. This is particularly ...
Since cocos2d is OpenGL based (sprites are just textured quads), you can create one large quad and modify the UV coordinates accordingly.
You don't have to mess with the UV coordinates yourself, cocos2d has some helper methods for that. In order to have an image repeat over the whole screen, you can do something like this:
// get the screen size
Frames Per Second (FPS) should be just that. The number of frames drawn every second. What FPS is not is something that you should be basing your gameplay timings around. You are running into issues when spawning enemies according to elapsed time because the rest of your game is not based around time, I bet.
In your current setup I imagine you are updating ...
I think your basic idea is sound. I'll summarize what your current code is doing. To get the average normal within an area around a point, you're gathering all the pixels in a rectangle centered on that point. For all the pixels in the rectangle that are solid ground, you're averaging the vector from the pixel to the query point. Effectively you're ...
There are a number of things to ask, but if you understand the basics you should be able to not just determine the speed your sprite is moving but dictate it.
Unless you are overtaxing the processor, or you schedule a routine to "update" less often, the game "loop" is going to execute 60 times per second. Assuming the routine that moves your sprite is ...
It's very simple. Which is your primary goal: learning or time to market?
Avoid using a library if your primary goal is to learn from the experience of implementing the concepts that are solved by the library. Whenever I develop a game (part time), my goal is purely learning. I don't care how long it takes, thats why I'm doing it all from scratch! Now, you ...
GameSalad is good for either quickly prototyping ideas, or if you want to develop an iPhone game on your own but don't know anything about programming. If however you have even a little familiarity with programming then GameSalad has many significant cons. The most significant con is that it is simply a very restrictive development tool; I haven't looked at ...
You seem to be worried about how to store your data when you should be concerned with the design of both your data, and how you expose it. Storing data in files or using a database is not a solution to design.
Instead of a singleton, pass the data by reference into functions. It may make sense to use a hierarchy of data types, such as a planet type that ...
Actions (sadly) can't be re-used or run multiple times. Instead you'll have to instantiate two actions or copy an existing one.
Something like this should work:
[Sprite1 runAction: [repeat copy]];
[Sprite2 runAction: repeat];
It's late in the day, but 71Squared has now released a command line app for Glyph Designer that allows you generate your font assets as part of your build process and also specify the size you would like, so you can automatically generate SD/HD output as required by your project.
I went over the whole code today, only to (after way too long) spot one mistake, that did it all.
leftJoystick = [joystickBase.joystick retain];
attackButton = [joystickBase.joystick retain];
It actually has to be
attackButton = [attackButtonBase.joystick retain];
and it works now. Always the little things that drive you crazy...