Displaying whole screen image on multiple devices without stretching In my(Android) game, all of my sprites are scaled against to a particular ratio (this 'guide' ratio stays the same regardless of the actual ratio of the screen on which they are to be displayed) these sprites are then displayed on screens of different ratios. This way, the game can run full screen on any device, it simply means that more less of the game is visible on some devices than it is on others. However, I can't work out how to diaplay a large (full screen) image on different devices. The only thing I can think of is to simply create the original image for the larger display and the crop it down to fit other ratios. Something like this So here, the image on the right is how the picture will show on the original device (full screen with no cropping), the device on the left has a smaller width. But what if this runs on a device with a larger screen? In this case is it simply a case of (uniformly) stretching the image until it fills the screen? Would be grateful for some guidance.


Rendering 2d sprites into a 3d world? In opengl how do I render 2d sprites in opengl given that I have a png of the sprite? See images as an example of the effect I'd like to achieve. Also I would like to overlay weapons on the screen like the rifle in the bottom image. Does anyone know how I would achieve the two effects? Any help is greatly achieved.


What are these odd distortions on far away textures? I'm currently writing a simple voxel engine just to get some practice in, and I'm coming across some odd issues. In order to generate terrain, I create a mesh and then assign UV coordinates on a texture atlas to each vertex. Whenever I run the game, I get strange distortions, like these I've tried doing a few things so far Generating mip maps for the texture atlas. Play around with the max size of the texture atlas. Play around with the format of the texture atlas. Unfortunately, none of these have worked so far. As of right now, the import settings on the texture atlas itself look like this Is there any way I can get rid of these obnoxious distortions?


Checking if two lines are crossing How can I check if two lines (created with function love.graphics.line) are crossing themselves? I may use this ability to create procedural maps via graphs.


SDL deleting an image from the screen? Well, I'm sort of a beginner to SDL, and I was wondering how one would go about deleting an image from the screen and replacing it with another? I attempted to do this, but it didn't seem to change it, how would someone with more experience than me go about doing it?


What does the term "channel" mean when used in regards to computer graphics? I was studying terminology for computer graphics, and this statement came up that confused me. The image can have alpha channels for transparency. I tried searching for the meaning of the term "alpha channel," but I got really confused by the definition which used another concept called a "channel." I'm not really sure what this means, so could someone be kind enough to please explain this term to me?


Correctly bitmasking path tiles based on existing paths Currently, I have a bitmasking implementation that sometimes incorrectly bitmasks the tiles. Conventionally, it is done correctly, and the math etc is sound, but it achieves results such as the following This is similar to what you might expect, and looks fine when doing simple x shaped crossings. However, I would like for the images to remain unchanged in some of these cases. For instance, the parallel paths in the third image would remain parallel paths instead of being bitmasked into many crossings. In the first and second images, only the parts of the path highlighted in the following images would be bitmasked (Different parts of path labelled for clarity.) If I purely update only the tiles that make up the newest path, I again get good results in simple x shaped crossings, however I get results such as those demonstrated in the following image What could I do to achieve results where this would not occur? I have though about adding some sort of flag to the tile to indicate that it is a crossing, but how could I detect that?


what is order of implementation of matrix transforms? What is the meaning of Tr Sh Ro Sc M ? How is matrix M written to form the graphic transformation 1st Sc Scale, 2nd R Rotate, 3rd Sh Shear 4th T Translate ? Is the matrix M above written properly in a "post multiplcative" format" T Sh R Sc , but executed Scale, Rotate, Shear , finaly Translate ?


About floating point precision and why do we still use it Floating point has always been troublesome for precision on large worlds. This article explains behind the scenes and offers the obvious alternative fixed point numbers. Some facts are really impressive, like "Well 64 bits of precision gets you to the furthest distance of Pluto from the Sun (7.4 billion km) with sub micrometer precision. " Well sub micrometer precision is more than any fps needs (for positions and even velocities), and it would enable you to build really big worlds. My question is, why do we still use floating point if fixed point has such advantages? Most rendering APIs and physics libraries use floating point (and suffer it's disadvantages, so developers need to get around them). Are they so much slower? Additionally, how do you think scalable planetary engines like outerra or infinity handle the large scale? Do they use fixed point for positions or do they have some space dividing algorithm?


Outsourcing Artwork Hourly or Per Project? I've hired people to produce art and graphics before, but only ever at a per job rate and that has worked out well. This question is for both artists and the people who hire them As a buyer, are there any situations or types of projects you've experienced where it worked out better billed at an hourly rate? For artists, do you have a preference for one over the other and if so, why?


Basic Collision Detection Math First a bit of background. I have yet to read a book on game development, though I do plan on picking one up sometime. A long time ago I made a simple pong game, followed by a simple Arkanoid type game. In both games I figured the collision detection by comparing the x, y, and z of the ball to the paddle. I did this calculation for each side of the ball and each side of the paddle. It was the only way I could think of to do it at the time. It was something along the lines of if (thing.x gt otherthing.x) if (thing.y gt otherthing.y) And so on. Is this the normal way of figuring collision detection? Did I over complicate it, or is this the basic way that it's done?


Do SpriteBuilder's Smart Sprite Sheet need to be loaded to memory? When I create an Smart Sprite Sheet Folder using SpriteBuilder and publish it, must I load that SpriteSheet into memory "FrameCache" with code or does SpriteBuilder do this automatically (so I just have to access any image inside of SpriteSheet?)


How do I load graphical resources asynchronously? Let's think platform agnostic I want to load some graphical resources while the rest of the game is running. In principle, I can load the actual files on a separate thread, or using async I O. But with graphical objects, I will have to upload them to the GPU, and that can (usually) only be done on the main thread. I can change my game loop to look something like this while true do update() for each pending resource do load resource to gpu end draw() end while having a separate thread load resources from disk to RAM. However, if there are many big resources to load, this could cause me to miss a frame deadline and eventually get dropped frames. So I can change the loop to this while true do update() if there are pending resources then load one resource to gpu remove that resource from the pending list end draw() end Effectively loading only one resource per frame. However, if there are many small resources to load, loading all of them will take many frames, and there will be a lot of wasted time. Optimally, I would like to time my loading in the following manner while true do time start get time() update() while there are pending resources then current time get time() if (current time time start) time to load(resource) gt 1 60 then break load one resource to gpu remove that resource from the pending list end draw() end This way, I would only load a resource if I can do it within the time I have for that frame. Unfortunately, this requires a way to estimate the amount of time it takes to load a given resource, and as far as I know, there are usually no ways to do this. What am I missing here? How do many games get to load all their stuff completely asynchronous and without dropped frames or extremely long loading times?


Small 3D Scene Graph I'm looking for a 3D graphics library (not a complete game engine). Preferred a scene graph. Something small (unlike jME, XNA or Unity), that I can easily expand and change. Preferred features Cross Platform Wrriten in Java Scala (JOGL or LWJGL), C (preferred OpenTK), Python or JavaScript WebGL. Support for OpenGL is a must. Direct3D is optional. Some material system Full support for some model format with full animation support (preferred COLLADA) Level of Detail (LOD) support Lighting support Shaders, GUI, Input and Terrain Water support are also preferred, but not required Thanks!


rendering a reflection on a texture I want to render reflection on a planar surface but the reflecting surface has a texture mapped onto it.Would the normal technique of using stencil buffer and then blending in the reflected image with the reflecting surface in this case? If not then could some one suggest me how to render reflection on a surface that has a texture mapped onto it? Thanks


Aquaria like graphics look in 3DS Max? I'm making a 2D game and I'm starting to think about graphics. I'm pretty good at 3D modelling, but I'm not very good at drawing or painting. I was wondering if there were settings, or even a renderer that someone could recommend that could achieve the nice painted look found in Aquaria. Thanks.


How to make image bigger than the screen to be slideable in the screen in monogame for windows phone 8? (Idk if my title is correct, because when I google it, there is no related result I guess) I am not sure how to explain it correctly, but I am making a plain 2D, tile based, tactic game in windows phone 8 using monogame. I want to make my map is "slideable". With "slidable" I mean I can draw larger images (in total) than my screen and then slide it so I can view a certain area of the drawn images Example I have a screen which dimension is 1280x720. I have a 1500x1500px image, which consists of 15 tiles, which is 100x100px each, which each tiles is redrawn each times the "Draw" is called. If the image is larger than the screen, the displayed area will be trimmed and of course, making a 220x780px area that is unseenable. The only way to see all of it is through "sliding" the screen around, so I can see all the area. My question is How to make that happen? Because in default, the screen is unslideable and the image remains trimmed. Sorry if my question and explanation is not clear enough. Clarify it as much as you like. Thank you.


What is "ROAM" related to terrain rendering? I saw it mentioned on this question, but no one explained what it is.


How do I scale down pixel art? There are plenty of algorithms to scale up pixel art. (I prefer hqx, personally.) But are there any notable algorithms to scale it down? My game is designed to run at a resolution of 1280x720, but if it is played at a lower resolution I still want it to look good. Most pixel art discussions center around 320x200 or 640x480 and upscaling for use in console emulators, but I wonder how modern 2D games like the Monkey Island Remake could look good on lower resolutions? Of course ignoring the option of having multiple versions of assets (i.e. mipmapping).


Precomputing Visibility Having noticed that UDK (Unreal) and Unity 3 include similar pre computed visibility solutions that unlike Quake are not dependent on level geometry, I've been trying to figure out how the calculation is done. The original Quake system is well documented You divide the world into convex volumes that limit both the camera and the geometry. Each volume has a list of all the other volumes that are visible from it. Visibility would be computed by firing rays at some random distribution of points in the target volume and see if any hit. And because the position of the camera in the source volume could have an effect, those thousands of rays would have to be fired from multiple places in the source cell. So what I'm wondering is if there's any been fundamental change to this basic scheme in the intervening 15 or so years? I can see how to adapt it to a UDK Unity scheme that has regular source volumes and deals mostly with arbitrary meshes as the targets, but is there a better way than stochastic ray testing?


How to combine objects in a rendered scene with and without bloom effect? I'm working on a game and engine as I go under OpenGL. I've had a bloom effect in place for a while that works as a post procesing effect on the entire screen. It's been fine up until now. I have an object that is made up of a few meshes, and one of these meshes is mostly white. The result is it blooms like crazy, but I really don't want it to. The only way around it I can see is that the objects I do want to have bloom would need to be rendered to a bloom framebuffer from which I can bloom (and store the depths) to then mix back in with the rest of my scene. Is this the only way to go about it? It seems like a lot of work to simply isolate something from a screen wide affect.


How to make game appear to run faster? I believe I read somewhere that there is a technique which will make games appear more smooth than they are. I believe it is some visual trick, but I don't remember which one. (It is be something like "You percieve game to be more fluid if there is good shadows"). I may be wrong and there is no such thing.


How do I generate a random curve for landscape (like Worms)? Possible Duplicate How do I generate terrain like that of Scorched Earth? How can I generate Worms style terrain? I must build random curve line for the 2D Game on the BitMap (like in Worms, from the side). Teacher said that I should do it using Terrain Generation through recourcy (I work in Delphi 7). I understand the main principle, but I don't know how to introduce it as code. All measurements according to the screen resolution.


Slick2D translate scale translate doesn't return to the old position I am trying to implement zoom using Slick2D library. As I understand, to zoom something on non (0,0) coordinates, we need translate so the target point is in (0,0) apply scale factor translate the target point back from (0,0) Code example aGraphics.translate( width 2, height 2) aGraphics.scale(2,2) aGraphics.translate(width 2, height 2) The issue is, as far I understand, that the scale factor is applied to the translation too. To compensate this, I have use the next code aGraphics.translate( width 2, height 2) aGraphics.scale(2,2) aGraphics.translate(width 4, height 4) Is this expected behaviour for graphics ? Can I workaround the above effect using push pop matrix ?


Cannot find the Cocos2d templates I am about to upgrade to the last version of Cocos2d and would like to uninstall my current Cocos2d templates before installing the new one but cannot find the templates to delete. I have looked at a number of web comments on this such as Uninstall Cocos2D ans another uninstall example but to no avail. However, I still see Cocos2d in my Xcode (4.5) framework. I have been searching my directories but cannot find it. Is there anyone out there who can give me a hint where to find it so i can delete in?


Cocos2d Check if place is free before moving (all objects) Is there a method in Cocos2d like CGRectIntersectsRect, except instead of limiting it to one sprite, it checks for ALL objects?


Why does the Texture placement of my CCSprite slightly shift when changing it's location? So I've been seeing this issue for a while now. When using a delta method to change the location of a CCSprite, the placement of texture of my sprite slightly moves into the direction where I'm headed, while the physicsbody stays the same. This is really noticeable, since I'm using CCActionFollow to center this sprite in the view at all times. The code is displayed below. Is this normal behaviour, or am I perhaps overlooking something really obvious? Thanks! (void) move (CCTime)delta toPosition (CGPoint)point OverworldScene parentScene (OverworldScene )self.parent.parent.parent Go over physics node OverworldLayer parentLayer (OverworldLayer )self.parent.parent Go over physics node meewind of tegenwind? float angleWind parentScene.compass.rotation float angleShip self.rotation float difference float windFactor if (angleWind gt angleShip) difference angleWind angleShip else difference angleShip angleWind if (difference gt 180) difference 360 difference Incorporate wind power... if (difference gt 90) Tegenwind windFactor 1 ((((90 (180 difference)) 90)) (parentLayer.windPower 12)) else Meewind windFactor 1 ((((90 difference) 90)) (parentLayer.windPower 12)) if (windFactor lt 0.4) windFactor 0.4 point is the current position of the user's sprite a, b and c are the right triangle sides lengths formed by the caser sprite and the user's sprite positions float a ABS(self.position.y point.y) float b ABS(self.position.x point.x) float c sqrt(pow(a, 2) pow(b, 2)) angle of the hypotenuse float beta rad asin(b c) velocity in pixels per second (used to be 60) c 60 self.velocityFactor windFactor Now accounts for windfactor! parentScene.speedLabel.string NSString stringWithFormat "Speed .1f knots", self.velocityFactor (60 windFactor) 8 x axis velocity component float x c sin(beta rad) y axis velocity component float y c cos(beta rad) adjustments based on position of the this (chaser) sprite and the user's sprite, if chaser is on the right or below the user's sprite it is needed to reverse the velocity vector component x and y if (self.position.x gt point.x) x 1 if (self.position.y gt point.y) y 1 final velocity vector CGPoint velocityVector CGPointMake(x, y) CGPoint newPosition ccpAdd(self.position, ccpMult(velocityVector, delta)) NSLog( "Updating position ", NSStringFromCGPoint(newPosition)) Only update in case new position is in bounds if (newPosition.x lt 0 newPosition.x gt parentLayer.contentSize.width) newPosition CGPointMake(self.position.x, newPosition.y) if (newPosition.y lt 0 newPosition.y gt parentLayer.contentSize.height) newPosition CGPointMake(newPosition.x, self.position.y) self.position newPosition


How can i get a value from object in tmx file in Cocos2d x 3.x? I want to set my sprite in x coordinate based on an object in TMX map file, this is my code tileMap cocos2d TMXTiledMap create("ground.tmx") ground tileMap gt layerNamed("ground") this gt addChild(tileMap) TMXObjectGroup objects tileMap gt objectGroupNamed("objects") Dictionary sign (Dictionary )objects gt objectNamed("sign") How can i get a value of object in tmx file in Cocos2d x ?


How to make and correctly use progress bar in cocos2d iphone? I have a game that uses a progress bar to inform player of level of certain stats of the player. For example hunger, when it starts at zero and slowly adds up to maximum bar. When he eats the hunger reduces. I tried implementing as progressBar, but it works wrong, as the bar expands both ways, and I need it to grow one side only. Also I had hard time setting the bar, since it uses actions. Is there an easy way to do it?


Game over pop up like Flappy Bird How can I make a game over pop up like Flappy Bird in cocos2d iphone 3? I tried to add a new Scene, but it adds a new screen on the game, I just want a rectangle with some buttons inside it. I also search how to add multiple scene, but didn't find an example doing it.


How can I load a large tile map with cocos2d? I am try to design a cocos2d game with a big world. The world's tile map is very big, maybe 20 iPad screen sizes worth of tiles. I want to know how to load this using a CCTMXTiledMap? If I directly add it to screen, will it use too much memory? If so, is there a solution to solve this problem?


OOP in cocos2d for ios I have been pulling my hair out trying to make an object in cocos 2d that is a CCSprite (with an image) and a CCLabelBMFont. I tried making a CCNode object and I tried making a custom CCSprite object but none of it worked! Can someone show me how to do this? Thanks.


How to create array with unique sprites? in cocos2d iphone I write the code like this. This displays only one sprite (red colour bubble) with number of times and moving down, but actually I want to display different sprites (different colour bubble) every time and moving down. I also add no of .png images in resource folder of my project. Here I used only 3.png, but I need to display all .png images (different colour bubbles) in my project but I don't know how to get this. Please help me Thank you. Here is the code (void)addTarget CCSprite target CCSprite spriteWithFile "3.png" rect CGRectMake(0, 0, 256, 256) CGSize winSize CCDirector sharedDirector winSize int minY target.contentSize.height 2 int maxY winSize.height target.contentSize.height 2 int rangeY maxY minY int actualY (arc4random() rangeY) minY Create the target slightly off screen along the right edge, and along a random position along the Y axis as calculated above target.position ccp(winSize.width (target.contentSize.width 2), actualY) self addChild target Determine speed of the target int minDuration 4.0 int maxDuration 12.0 int rangeDuration maxDuration minDuration int actualDuration (arc4random() rangeDuration) minDuration Create the actions id actionMove CCMoveTo actionWithDuration actualDuration position ccp( target.contentSize.width 2,actualY) id actionMoveDone CCCallFuncN actionWithTarget self selector selector(spriteMoveFinished ) target runAction CCSequence actions actionMove, actionMoveDone, nil Add to targets array target.tag 2 targets addObject target (void)gameLogic (ccTime)dt self addTarget (id) init if( (self super initWithColor ccc4(255,255,255,255) )) Enable touch events self.isTouchEnabled YES Initialize arrays targets NSMutableArray alloc init projectiles NSMutableArray alloc init Get the dimensions of the window for calculation purposes CGSize winSize CCDirector sharedDirector winSize self schedule selector(gameLogic ) interval 1.0 self schedule selector(update ) return self (void)update (ccTime)dt NSMutableArray projectilesToDelete NSMutableArray alloc init for (CCSprite projectile in projectiles) CGRect projectileRect CGRectMake(projectile.position.x (projectile.contentSize.width 2), projectile.position.y (projectile.contentSize.height 2), projectile.contentSize.width, projectile.contentSize.height) NSMutableArray targetsToDelete NSMutableArray alloc init for (CCSprite target in targets) CGRect targetRect CGRectMake(target.position.x (target.contentSize.width 2), target.position.y (target.contentSize.height 2), target.contentSize.width, target.contentSize.height) if (CGRectIntersectsRect(projectileRect, targetRect)) targetsToDelete addObject target for (CCSprite target in targetsToDelete) targets removeObject target self removeChild target cleanup YES projectilesDestroyed if ( projectilesDestroyed gt 30) GameOverScene gameOverScene GameOverScene node gameOverScene.layer.label setString "You Win!" CCDirector sharedDirector replaceScene gameOverScene if (targetsToDelete.count gt 0) projectilesToDelete addObject projectile targetsToDelete release for (CCSprite projectile in projectilesToDelete) projectiles removeObject projectile self removeChild projectile cleanup YES projectilesToDelete release


how to improve sprite animations to reduce FPS My game has different, and detailed animations throughout the game. For example, the main character has an idle stance, so its not just painted still, giving him some life. Death animation, hurt animation, etc... even the background scenario has animations(which I don't think I went with the best approach here, but, it's working for now, this will be in another thread if not answered here) Anyways, the thing is, while the main character had these animations only that character was in the game at that time, so everything ran smoothly. After adding another character, the enemy, the burden of animations seems to overcharge the FPS and just slows the game down. The most obvious of this problems was that the spritesheet I was using was 1 per character, I figured how to use spritebatchnode efficiently and now 1 spritebatchnode covers the 2 characters animation set. The FPS tried to get back to normal, but its still laggy at times. This worries me because my game design has more enemies to the game, meaning that it will have this issue in a bigger scale. So I believe that its because of my animation approach, its poor, and inefficient making my game run slow. I have been trying to find the answer online with no luck, and I don't my approach is the best. I tried working some solutions by my own, but they end up in the same thing. THE ONLY, the only way I find how to reduce this problem is to make my sprites smaller, its not a big deal, but I wouldn't like this solution.


What is the best way to learn Cocos2D? I've messed around with iPhone development for a couple years now. I've done some contract work. I want to get into Cocos2D to develop a game idea that I have. I was wondering what might be the best quickest way to get up in running in cocos2d? I've thought about a book, but I wondering if that is needed? I'm the type of guy that just wants to know what everything does and is suppose to be used for. Any ideas?


Best way to prevent UIPanGestureRecognizer from firing when moving sprites in cocos2d Im using UIPanGestureRecognizer in my cocos2d game to do drag and drop of sprites. I have a row of sprites and when I drag a sprite on top of another one, the sprite underneath it and any other sprites between should shift left or right out of the way to allow space to drop the currently selected sprite. This is working ok, however, if I am too quick at dragging the sprite around the screen, this triggers another round of the UIPanGestureRecognizer's callback method, and screws up the logic, as the sprites are in between shifting. I need a way to freeze the callback from firing, whilst the other sprites are shifting, then once they have finished moving, re enable the callback to fire. Whats the best way to do this?


Alternatives to NSMutableArray for storing 2D grid iOS Cocos2d I'm creating a grid based iOS game using Cocos2d. Currently the grid is stored in an NSMutableArray that contains other NSMutableArrays (the latter are rows in the grid). This works ok and performance so far is pretty good. However the syntax feels bulky and the indexing isn't very elegant (using CGPoints, would prefer integer indices). I'm looking for an alternative. What are some alternatives data structures for 2D arrays in this situation? In my game it's very common to add and remove rows from the bottom of the grid. So the grid might start off 10x10, grow to 17x10, shrink to 8x10 and then finally end with 2x10. Note the column count is constant. I've consider using a vector lt vector lt Object gt gt . Also I'm vaguely aware of some type of "fast array" or similar offered by Cocos2d. I'd just like to learn about best practices from other developers!


Timing use individual timer for every task or global timer? I'm writing a game, where a player controls a spaceship. It regenerates energy over time. So I need to make a little timer that adds certain amount of energy to the pool per second. My enemies also shoot at me, activate different abilities. I figured I can use separate timers for these too. But I see how this can quickly go out of hand, since I have different engines with different energy regeneration rates will I need to replace the timer every time? Or if I have different energy I have to manually track all the timers and set them anew. I thought, maybe I can use some global singleton method that can handle all the timing in my game? It can update everything in the game, and when something new happens (like new enemy spawning) I can just send my singleton information about that object and it will handle all the timing for it? Is this a good approach? Can I read up something about this somewhere? Maybe you have some experience with this?


Cocosdenshion and Android not working I'm trying to play sounds and music with cocos2d. When I run on iPhone and .caf files the audio is perfect, but on Android it is not playing the background music and is only playing 2 sounds of 10 files. I don't know what I'm doing wrong. include lt SimpleAudioEngine.h gt bool HelloWorld init() const char sound if CC TARGET PLATFORM CC PLATFORM IOS sound "Fun.caf" else sound "Fun.wav" endif auto audio CocosDenshion SimpleAudioEngine getInstance() audio gt preloadBackgroundMusic(sound) audio gt playBackgroundMusic(sound, true) audio gt setBackgroundMusicVolume(1.0f) void HelloWorld playSound() const char effect if CC TARGET PLATFORM CC PLATFORM IOS effect "Bomb.caf" else effect "Bomb.wav" endif audio gt preloadEffect(effect) audio gt playEffect(effect)


Zoom Layer centered on a Sprite I am in process of developing a small game where a space ship travels through a layer (doh!), in some situations the spaceship comes close to an enemy space ship, and the whole layer is zoomed in on the two with the zoom level being dependent on the distance between the ship and the enemy. All of this works fine. The main question, however, is how do I keep the zoom being centered on the center point between the two space ships and make sure that the two are not off screen? Currently I control the zooming in the GameLayer object through the update method, here is the code (there is no layer repositioning here yet) (void) prepareLayerZoomBetweenSpaceship CGPoint mainSpaceShipPosition mainSpaceShip position CGPoint enemySpaceShipPosition enemySpaceShip position float distance powf(mainSpaceShipPosition.x enemySpaceShipPosition.x, 2) powf(mainSpaceShipPosition.y enemySpaceShipPosition.y,2) distance sqrtf(distance) Distance gt 250 gt no zoom Distance lt 100 gt maximum zoom float myZoomLevel 0.5f if(distance lt 100) maximum zoom in myZoomLevel 1.0f else if(distance gt 250) myZoomLevel 0.5f else myZoomLevel 1.0f (distance 100) 0.0033f self zoomTo myZoomLevel (void) zoomTo (float)zoom if(zoom gt 1) zoom 1 Set the scale. if(self.scale ! zoom) self.scale zoom Basically my question is How do I zoom the layer and center it exactly between the two ships? I guess this is like a pinch zoom with two fingers!


How do I find the rotation point given a touch anchor, new position and new rotation? I've got an Cocos2d layer which anchorPoint, position and rotation (according to http www.qcmat.com understanding anchorpoint in cocos2d ) vary when the pinch zoom gestures. Everything works fine. I've also added smoothness, so the layer will stop gently when it is 'thrown away' by a one finger gesture. The layer will also stop zooming in a gentle way when the 2nd finger is released (if it is released during movement). I've also succeeded with smooth rotation, so the layer continues rotation around touch1 when touch2 is released (if touch2 described an orbit around1). My problem is that the rotation functionality is not generic. For instance, I've problems with the case where touch1 and touch2 is on the opposite side of the center point, and follows a path on a circle circumference. The layer will then rotate around the centre point. That works fine until the fingers are released, but my algorithm is not robust enough to find out that it shall continue the rotation around said center point. Question How do I in a generic way find the point of rotation, and the rotation speed around that point, for a layer using sampled data containing anchorPoint, position and rotation for the last 0.1(?) seconds? The example above is only one use case. You can also think about the case where touch1 follows the arc from (1, 0) to (0, 1) meanwhile touch2 follows the arc from (2, 0) to (0, 2). That will result in a rotation around (0, 0). I want to detect that movement, and continue the rotation around (0, 0) if the touches are released at the same time.


Creating multiple fixtures in one body I want to create this type of fixture in one body. Here square and circle both are different fixtures but attach to one body. How do I do this?


Manually remove inactive CCParticleSystem from scene? When using particle systems that have a lifetime, with CCParticleSystem and its derived classes, should I manually remove the finished systems from their parent nodes once the particle animations are complete? Or this is done automatically? I don't want to leave dead particle systems in my scene, for obvious reasons.


How to get all child with same tag from CCLayer? Actually i am working with cocos2d Game. I am using CCLayer for particular scene. now there are so many buttons means CCMenuitems are available. I want to disable that all menuitems having same tags.


Keeping the CCSprite on the screen In my cocos2d app I have a CCSprite moving on the screen but it moves off the screen. How can I prevent the CCSprite from moving off the screen? Thanks


How to pause and unpause the Particular action of a sprite? My game has a sprite representing a character. When the character picks up an item, the sprite should stop moving for a period of time. I use CCbezier to make the sprite move, like this sprite gt runaction(x) Now I want the sprite to stop its current action (moving) and later resume it. I can make the sprite stop by using sprite gt stopaction(x) but if I do that, I can't resume the movement. How can I do that?


Admob banner not getting remove from superview I am developing one 2d game using cocos2d framework, in this game i am using admob for advertising, in some classes not in all classes but admob banner is visible in every class and after some time game getting crash also. I am not getting how admob banner is comes in every class in fact i have not declare in Rootviewcontroller class. can any one suggest me how to integrate Admob in cocos2d game, i want Admob banner in particular classes not in every class, I am using latest google admob sdk, my code is below Thanks in advance (void)AdMob NSLog( "ADMOB") CGSize winSize CCDirector sharedDirector winSize Create a view of the standard size at the bottom of the screen. if (UI USER INTERFACE IDIOM() UIUserInterfaceIdiomPad) bannerView GADBannerView alloc initWithFrame CGRectMake(size.width 2 364, size.height GAD SIZE 728x90.height, GAD SIZE 728x90.width, GAD SIZE 728x90.height) else It's an iPhone bannerView GADBannerView alloc initWithFrame CGRectMake(size.width 2 160, size.height GAD SIZE 320x50.height, GAD SIZE 320x50.width, GAD SIZE 320x50.height) if (UI USER INTERFACE IDIOM() UIUserInterfaceIdiomPad) bannerView .adUnitID "a15062384653c9e" else bannerView .adUnitID "a15062392a0aa0a" bannerView .rootViewController self CCDirector sharedDirector openGLView addSubview bannerView bannerView loadRequest GADRequest request GADRequest request GADRequest alloc init request.testing NSArray arrayWithObjects GAD SIMULATOR ID, nil Simulator bannerView loadRequest request best practice for removing the barnnerView (void)removeSubviews NSArray subviews CCDirector sharedDirector openGLView .subviews for (id SUB in subviews) (UIView )SUB removeFromSuperview SUB release NSLog( "remove from view") this makes the refreshTimer count (void)targetMethod (NSTimer )theTimer INCREASE OF THE TIMER AND SECONDS elapsedTime seconds INCREASE OF THE MINUTOS EACH 60 SECONDS if (seconds gt 60) seconds 0 minutes self removeSubviews self AdMob NSLog( "TIME 02d 02d", minutes, seconds)


Presenting game center leaderboard I have the following code (void)showLeaderboard GKLeaderboardViewController leaderboardController GKLeaderboardViewController alloc init if (leaderboardController ! NULL) leaderboardController.timeScope GKLeaderboardTimeScopeAllTime leaderboardController.leaderboardDelegate self self presentModalViewController leaderboardController animated YES leaderboardController release Which I am trying to use to make my leader board pop up. The issue is cocos2d will not allow me to use the line self presentModalViewController leaderboardController animated YES How do I fix this? Thanks PS I am using cocos2d


Count number of CCSprite added to a CCLayer Does cocos2d has a method that returns the amount of CCSprites added to a CCLayer? A have SceneControlLayer object, and I added some CCSprites to it. interface SceneControlLayer CCLayer implementation SceneControlLayer (id)init CCSprite spr1 CCSprite spriteWithFile "spr1.png self addChild spr1 z 1 tag 1 CCSprite spr2 CCSprite spriteWithFile "spr2.png self addChild spr2 z 2 tag 2 ... end How do I retrieve an array of sprites added to the layer? Could I retrieve all the objects added through addChild and test its type? Since I'm starting with cocos2d objectivec, please, give some examples how to do it... I also thought that I could create an array, and, besides adding it to the layer, add it to the array also. But I'm not so sure if it's a good option. TIA, Bob


Using pixel art on small high resolution screens I'm making a game and I would like to utilize pixel art as my style. But I faced a problem, modern displays on my target platform (iOS) have extremely high resolution. So if my artist makes me some sprites in 1 to 1 pixel resolution, each character sprite will look like 2x3 millimeters, and that's not what I want. How do I fix this problem? Do i just use 4 pixel blocks as 1 pixel in my art, or there is some other way? Another question, is how do I utilize high crisp display of those devices with pixel art? How do I go with using images on older devices? Do I have to make double assets or downscale upscale some images?


CCsprite.flipX not working! Here is my function, it makes random point on the ground and makes my sprite go there. If the x position of location is less then position of my sprite, I flip my sprite so it looked left (it looks right by default). But this is not working at all. I tried different flip methods but none work! Please help what is wrong? (void) wander CGPoint rand CGPointMake(CCRANDOM 0 1() 270 , CCRANDOM 0 1() 140 ) float distance ccpDistance( currentSprite position , rand) float speed distance 2 ccTime time distance speed CCAction move CCMoveTo actionWithDuration time position rand if (currentSprite.position.x gt rand.x) currentSprite.flipX YES else currentSprite.flipX NO self runAction move There is no problem with this code. Problem was that I was trying to flip sprite that was a child of my Pet object. When I tried flipping sprite everything worked just fine. If anybody could explain that, would be great.


How to extend Tiled and Cocos2d to create an Isometric map that supports elevation I've been looking and looking and looking, and I cannot seem to find a solution out there for making a game that uses cocos2d and Tiled to make an isometric map that supports elevation. I am not looking for anything super complex... Just maybe 2 or 3 levels of elevation. (Think X Com UFO Defense, or Final Fantasy Tactics) I figure that since I've been unable to find a solution, I'll probably have to extend Tiled or something to support this. For now I'll just stick with level of elevation, but I want to extend the game to support elevation eventually. Will you share with me any good resources that you know? Where should I read to better understand how to accomplish such a thing?


How can I cause the latest touch event to interrupt a prior event in Cocos2D? In Cocos2D for iPhone, I want the latest touch event to interrupt another and ignore the last touch. Let me know if I need to elaborate more, but basically my game consists of a lot of finger dragging, and if the player ever switched fingers, there may be some overlap, and for the way things are setup, it may detect it as a new touch. I think I have things almost on the right track, but my third touch does not work correctly. For instance Touch A begins and held Touch B begins and held Touch A let go Touch A begins and held lt This should interrupt Touch B In my delegate I put glView setMultipleTouchEnabled YES because I believe I need multiple touches enabled. In my CCLayer class with my added map and sprite I am using targeted touch delegate (i.e. ccTouchBegan NOT ccTouchesBegan, etc) I am accessing a touch object with touch event allTouches allObjects objectAtIndex 0 , however I don't have much understanding what index is considered the latest touch or even a process to always get the latest touch.


Cocos 2D asteroids style movement (iOS) So I have a CCSprite subclass, well call this Spaceship. Spaceship needs to move on a loop, until I say othersise by calling a method. The method should look something like (void)moveForeverAtVelocity method logic The class Spaceship has two relevant iVars, resetPosition and targetPosition, the target is where we are headed, the reset is where we set to when we've hit our target. If they are both off screen this creates a permanent looping effect. So for the logic, I have tried several things, such as CCMoveTo move CCMoveTo actionWithDuration 2 position ccp(100, 100) CCCallBlockN repeat CCCallBlockN actionWithBlock (CCNode node) self moveForeverAtVelocity self runAction CCSequence actions move, repeat, nil self.position self.resetPosition recursively calling the moveForeverAtVelocity method. This is psuedo code, so its not perfect. I have hard coded some of the values for the sake of simplicity. Enough garble The problem I am having, how can I make a method that loops forever, but can be called and reset at will. I'm running into issues with creating multiple instances of this method. If you can offer any assistance with creating this effect, that would be appreciated.


Rotating a sprite to touch I know this has been asked before and Ive looked through peoples questions and answers all over the internet and I just cant get it to work. Im sure its down to my inexperience. Ive got an arrow attached to a sprite, this sprite appears when touched but I want the arrow to point where the sprite will launch. I have had the arrow moving but it was very erratic and not pointing as it should. Its not moving at the moment but this is what I have. (void)update (ccTime)delta arrow.rotation dialRotation (void) ccTouchMoved (UITouch )touch withEvent (UIEvent )event pt1 self convertTouchToNodeSpace touch CGPoint firstVector ccpSub(pt, arrow.position) CGFloat firstRotateAngle ccpToAngle(firstVector) CGFloat previousTouch CC RADIANS TO DEGREES(firstRotateAngle) CGPoint vector ccpSub(pt1, arrow.position) CGFloat rotateAngle ccpToAngle(vector) CGFloat currentTouch CC RADIANS TO DEGREES(rotateAngle) dialRotation currentTouch previousTouch I have got pt from ccTouchBegan the same way as pt1 Thanks


how to improve sprite animations to reduce FPS My game has different, and detailed animations throughout the game. For example, the main character has an idle stance, so its not just painted still, giving him some life. Death animation, hurt animation, etc... even the background scenario has animations(which I don't think I went with the best approach here, but, it's working for now, this will be in another thread if not answered here) Anyways, the thing is, while the main character had these animations only that character was in the game at that time, so everything ran smoothly. After adding another character, the enemy, the burden of animations seems to overcharge the FPS and just slows the game down. The most obvious of this problems was that the spritesheet I was using was 1 per character, I figured how to use spritebatchnode efficiently and now 1 spritebatchnode covers the 2 characters animation set. The FPS tried to get back to normal, but its still laggy at times. This worries me because my game design has more enemies to the game, meaning that it will have this issue in a bigger scale. So I believe that its because of my animation approach, its poor, and inefficient making my game run slow. I have been trying to find the answer online with no luck, and I don't my approach is the best. I tried working some solutions by my own, but they end up in the same thing. THE ONLY, the only way I find how to reduce this problem is to make my sprites smaller, its not a big deal, but I wouldn't like this solution.


How to make Snake Body in Snake Game? I'm new in cocos2d and game dev. I'm still learning in game dev. My goal is to make one game like Doodle Grub. But problem is snake body. I wrote like following (void)update (ccTime)delta NSLog( " f", GameScence sharedGameScence .playerVelocity.y) CGPoint tmp self.position float tmprotation self.position GameScence sharedGameScence .WormHeadPos GameScence sharedGameScence .WormHeadPos tmp tmprotation self.rotation self setRotation GameScence sharedGameScence .Headrotation GameScence sharedGameScence .Headrotation tmprotation snake is moving but problem is all of the body segments are same position when snake stop. And all of the body segments is so close and can't see segments like Doodle Grub. Any idea or Any suggestion ?


Blending transition in cocos2d In my cocos2d iphone game, I have 2 backgrounds (CCnodes), each containing a quite complex hierarchy of sprites. I would like to make a smooth transition between them Initially, only the first background is visible At the end, only the second one is visible Is there a good way to set the opacity of a full hierarchy of sprites ? I tried to recursively set the opacity of all the contained sprites. It kinda works except that I guess it's not very efficient I would like the opacity of overlapping sprites to be 'merged' (as if the background was one single big sprite)


Unit Testing with Cocos2D How to implement Unit Testing with Cocos2D framework? What are the good practices? Is there any testing framework like JUnit Framework at Eclipse for Android?


Moving camera in large view In my cocos2d app I was wondering how to make a CCSprite move on the screen but have the screen focused on the CCSprite, so when the sprite moves the view moves with the CCSprite. Is there a tutorial to do this? Thanks


GUI device for throwing a ball The hero has a ball, which shall be thrown with accuracy in a court on iPhone iPad. The player is seen from above, in a 2D view. In game play, the player reach is between 1 15 and 1 6 of the height of the iPhone screen. The player will run, and try to outmaneuver his opponent, and then throw the ball at a specific location, which is guarded by the opponent (which is also shown on the screen). The player is controlled by a joystick, and that works ok, but how shall I control the stick? Maybe someone can propose a third control method? I've tried the following two approaches Joystick Hero has a reach of 1 meter, and this reach is marked with a semi opaque circle around the player. The ball can be moved by a joystick. When the joystick is moved south, the ball is moved south within the reach circle. There is a direct coupling with the joystick and the position of the ball. I.e. when the joystick is moved max south, the ball is max south within the player reach. At each touch update the speed is calculated, and the Box2d ball position and ball speed are updated. NB, the ball will never be moved outside the reach as long as the player push the joystick. The ball is thrown by swiping the joystick to make the ball move, and then releasing the joystick. At release, the ball will get a smoothed speed of the joystick. Joystick Problem The throwing accuracy gets bad, because the joystick can not be that big, and a small movement results in quite a large movement of the ball. If the user does not release before the end of the joystick maximum end point, the ball will stop, and when the user releases the joystick the speed of the ball will be zero. Bad... Touch pad A force is applied to the ball by a sweep on a touchpad. The ball is released when the sweep is ended, or when the ball is moved outside the player reach. As there is no one to one mapping between the swipe and the ball position, the precision can be improved. A large swipe can result in a small ball movement. Touch Pad Problem A touchpad is less intuitive. Users do not seem to know what to do with the touch pad. Some tap the touchpad, and then the ball just falls to the ground. As there is no one to one mapping, the ball can be moved outside the reach, and then it will just fall to the ground. It's a bit hard to control the ball, especially if the player also moves.


Getting different x and y coordinates for touched location on a zoomed view I'm using Cocos2d for developing a game. I need to be able to pan and zoom when necessary, so for this reason I've added CCLayerPanZoom extension to my project. Recently I've noticed a problem with zoomed layers. The thing is if I touch on a zoom panable layer before doing zooming or panning I get correct x,y coordinates. But if I zoom the layer, the touched location coordinates are different than the earlier ones. Here's how I get the touch location (void)ccTouchesBegan (NSSet )touches withEvent (UIEvent )event UITouch touch touches anyObject CGPoint touchedLocation touch locationInView touch.view touchedLocation CCDirector sharedDirector convertToGL startPoint You might ask how I determine whether the two points are different before and after zooming. I have a sprite located on a predetermined point in the view. When I touch the sprite I log the position of both the sprite and the touchedLocation. Before zooming these points are almost the same, only a few units of difference in x and y. But after zooming they're totally different points and I guess this difference is directly proportional with the zoom scale. I don't want to ask how to have the touched location the same before and after zooming, I rather want to ask what I should do in this case.


Why the AnchorPoint doesn't affect the CCLayer Positioning? I think there is a difference between the CCLayer and CCNode behavior when I change their AnchorPoint. I will describe what I mean and please somebody explain it. Scenario I start with CCNode CCNode node ... node.setContentSize(ccp(W,H)) 1. node.setAnchorPoint(ccp(0,0)) node.setPosition(ccp(X,Y) This line will move the node in a way that its (0,0) point will be placed at (X,Y). 2. node.setAnchorPoint(ccp(1,1)) node.setPosition(ccp(X,Y) This line will move the node in a way that its (0,0) point will be placeed at (X W,Y H). In other word, this line will move the (W,H) point of the node to (X,Y) In addition to the Positioning, all actions (like Rotating, Scaling) are based on this anchor point. This policy is fair enough and you won't get confused when moving a scaled node (setScale(X)) to some position because the node's position ( and not node's contents!) will not change in the screen after any actions. ( PS We knew that rotating scaling a node will rotate scale internal node contents) Let's continue with CCLayer CCLayer layer ... layer.setContentSize(ccp(W,H)) 1. layer.setAnchorPoint(ccp(0,0)) layer.setPosition(ccp(X,Y) This line will move the layer in a way that its (0,0) point will be placed at (X,Y) 2. layer.setAnchorPoint(ccp(1,1)) layer.setPosition(ccp(X,Y) Unfortunately, This line will move the layer in a way that its (0,0) point will be placeed at (X,Y). Although CCLayer also use the anchor point for scaling, rotating and ... purposes, It does NOT use its anchor point for positioning!!! Question WHY? and How can I have the same CCNode like setPosition() behaviour for CCLayer? PS I've also tried gt ignoreAnchorPointForPosition(true) but it didn't help. ( cocos2d x version is 2.2.3)


Sprite Body can not stop Hey i have issue regarding jump sprite body. In my code i am using moveLeft and moveRight Button and when i am press moveRight Button using following code if (moveRight.active YES) b2Vec2 force b2Vec2(4,0) ballBody gt SetLinearVelocity(force) Its move perfectly and When i release this Button than sprite body stop using following code else b2Vec2 force b2Vec2(0,0) ballBody gt SetLinearVelocity(force) But when i put this else part then jump can not done. My jump code is following if (jumpSprite.active YES) NSLog( "Jump Sprite") b2Vec2 locationWorld locationWorld b2Vec2(0.0f,4.0f) double force ballBody gt GetMass() ballBody gt ApplyLinearImpulse(force locationWorld, ballBody gt GetWorldCenter()) If i remove else part then jump will perform complete but sprite body can not stop after release button. So what to do?? Thanks in advance


How can I load a large tile map with cocos2d? I am try to design a cocos2d game with a big world. The world's tile map is very big, maybe 20 iPad screen sizes worth of tiles. I want to know how to load this using a CCTMXTiledMap? If I directly add it to screen, will it use too much memory? If so, is there a solution to solve this problem?


How to create array with unique sprites? in cocos2d iphone I write the code like this. This displays only one sprite (red colour bubble) with number of times and moving down, but actually I want to display different sprites (different colour bubble) every time and moving down. I also add no of .png images in resource folder of my project. Here I used only 3.png, but I need to display all .png images (different colour bubbles) in my project but I don't know how to get this. Please help me Thank you. Here is the code (void)addTarget CCSprite target CCSprite spriteWithFile "3.png" rect CGRectMake(0, 0, 256, 256) CGSize winSize CCDirector sharedDirector winSize int minY target.contentSize.height 2 int maxY winSize.height target.contentSize.height 2 int rangeY maxY minY int actualY (arc4random() rangeY) minY Create the target slightly off screen along the right edge, and along a random position along the Y axis as calculated above target.position ccp(winSize.width (target.contentSize.width 2), actualY) self addChild target Determine speed of the target int minDuration 4.0 int maxDuration 12.0 int rangeDuration maxDuration minDuration int actualDuration (arc4random() rangeDuration) minDuration Create the actions id actionMove CCMoveTo actionWithDuration actualDuration position ccp( target.contentSize.width 2,actualY) id actionMoveDone CCCallFuncN actionWithTarget self selector selector(spriteMoveFinished ) target runAction CCSequence actions actionMove, actionMoveDone, nil Add to targets array target.tag 2 targets addObject target (void)gameLogic (ccTime)dt self addTarget (id) init if( (self super initWithColor ccc4(255,255,255,255) )) Enable touch events self.isTouchEnabled YES Initialize arrays targets NSMutableArray alloc init projectiles NSMutableArray alloc init Get the dimensions of the window for calculation purposes CGSize winSize CCDirector sharedDirector winSize self schedule selector(gameLogic ) interval 1.0 self schedule selector(update ) return self (void)update (ccTime)dt NSMutableArray projectilesToDelete NSMutableArray alloc init for (CCSprite projectile in projectiles) CGRect projectileRect CGRectMake(projectile.position.x (projectile.contentSize.width 2), projectile.position.y (projectile.contentSize.height 2), projectile.contentSize.width, projectile.contentSize.height) NSMutableArray targetsToDelete NSMutableArray alloc init for (CCSprite target in targets) CGRect targetRect CGRectMake(target.position.x (target.contentSize.width 2), target.position.y (target.contentSize.height 2), target.contentSize.width, target.contentSize.height) if (CGRectIntersectsRect(projectileRect, targetRect)) targetsToDelete addObject target for (CCSprite target in targetsToDelete) targets removeObject target self removeChild target cleanup YES projectilesDestroyed if ( projectilesDestroyed gt 30) GameOverScene gameOverScene GameOverScene node gameOverScene.layer.label setString "You Win!" CCDirector sharedDirector replaceScene gameOverScene if (targetsToDelete.count gt 0) projectilesToDelete addObject projectile targetsToDelete release for (CCSprite projectile in projectilesToDelete) projectiles removeObject projectile self removeChild projectile cleanup YES projectilesToDelete release


Is it better to preserve scenes in memory or recreate them every time I need them? I am using Cocos Builder to create scenes using sceneWithNodeGraphFromFile owner . Now I have doubts about whether it's better, on iOS, to save some memory or CPU cycles. In other words I have two options First, I could do lazy initialization of scenes without removing them from memory, like this (CCScene ) myScene if(! myScene) myScene CCBReader sceneWithNodeGraphFromFile "MyFile.ccbi" return myScene Then I always call self.myScene and I possibly set myScene to nil if the app receives a memory warning. I never remove a scene from the director, I just push without cleaning. Or, I could initialize a new scene every time. I'd call sceneWithNodeGraphFromFile owner every time that I need to push a scene, popping and cleaning it from the director and creating it again if I need it. Which should I prefer and why?


Using pixel art on small high resolution screens I'm making a game and I would like to utilize pixel art as my style. But I faced a problem, modern displays on my target platform (iOS) have extremely high resolution. So if my artist makes me some sprites in 1 to 1 pixel resolution, each character sprite will look like 2x3 millimeters, and that's not what I want. How do I fix this problem? Do i just use 4 pixel blocks as 1 pixel in my art, or there is some other way? Another question, is how do I utilize high crisp display of those devices with pixel art? How do I go with using images on older devices? Do I have to make double assets or downscale upscale some images?


Tweaking and Settings Runtime variable modification and persistence Most companies have an editor, or a variable control system for tweaking stuff in games, but are there any middleware solutions to this problem? I've written two such systems in the past myself, and worked with five, maybe six different ones, but none of them were off the shelf. Each of these home grown solutions had problems, ranging from having to keep looking up values, to not being able to save the current state of the variables. Are there any mature Config Runtime variable control libraries apps? I generally code in C , but I would think that a mature settings variables editor would probably be socket based (and therefore language agnostic to some extent) as all current development hardware apart from Nintendo stuff provides a mechanism to talk to servers. The code implementation would also need to be quite simple (I do like the hot var TweakableConstants article shared by Oskar, but it's not a package)


How is console game development done? I'm curious what the process is for development for a game console such as Wii, Playstation, or Xbox. Do I need to use some game engine and compile for each platform? What IDE is used? Any C IDE? Are all console games built in C ?


How can I unpack a sprite sheet into multiple images? I need to take a sprite sheet and convert it into multiple images, one for each frame of the sprite sheet. How should I go about this? I would prefer an offline method or a tool to do so I found Alferd SpriteSheet Unpacker, but it is really slow on Windows 7 and does not seem to respond well at all.


Is there a command line ATI texture compression tool? Is there a command line tool that can convert PNG and JPG files to ATITC compressed textures? I have my own export pipeline that converts all textures to PVRTC, ATITC, and DXT, so I have no use for a GUI based tool like the Compressonator. Also, I'm running on Linux (although Wine might be able to handle simple conversion tools).


What can I use to generate 2d vector graphics as a list of coordinates? I am working on a game that uses simple 2d vector graphics. I want a tool that will let me visually draw things like arbitrary polygons by placing points. A perfect tool would present a grid that I could scale larger or smaller (ie the window is 10 units across or the window is 20 units across). It would let me draw a polygon on this grid, and will tell me, simply, the coordinates of each point. It would be great if this tool could then export a file format that was something like 0, 5 3, 2 0, 0 3, 2 For bonus points, it would be great to be able to assign other attributes to each point. In the end, this will get passed to OpenGL, so things like color and opacity could possibly be used.


How do "game maker" tools like Blitz3D create .exe files? There are several applications like Blitz3D or other kinds of game construction tools that compile scripts or other game data to a single executable file. How do they do that?


Platform for DS Gameboy Dev Managed Memory, Tools, and Unit Testing I'm interested in dabbling in Nintendo DS, 3DS, or GBA development. I would like to know what my (legal) options for development tools and IDEs are. In particular, I would not consider moving in this direction unless I can find A programming language that has managed memory (garbage collection) A unit testing tool akin to JUnit, NUnit, etc. for unit tests I would also prefer if other tools exist, like code coverage, etc. for that platform. But the main thing is managed memory and unit testing. What options are out there?


Which programming language to use for tools? I use C as my language as choice. However, I generally use Python to write helper utilities and tools. My worry is that as my game engine continues to grow it's getting tedious to reimplement some of its features in Python. There has got to be a better way. Here are the options as I seem them Keep on keeping on. That is often the answer in a cooperate environment. Maybe it has some merit. Build bindings for Python (yuck) and have it use pieces of the engine directly. Start building the tools using C instead. I already use QT in the Python tools to provide a GUI when needed. It doesn't seem like it'd be that much harder to use QT in C instead. However I'm worried my tool productivity will go down. I generally strive to apply much less rigidity in tool code than I would in shipping code. So what is common practice, use the same language for tools, or use a more RAD friendly one? What if you use a language that differs from the language of the game which do you use? How do tools interact with the game engine link to it directly or fake it?


Tool to create a bitmap font from a true type font What tool do you use to convert ttf fonts to bitmap fonts? Following is a list of features I'm looking for. I'd be happy with any tool really, but one that had these features would be better. outputs power of 2 texture atlas parsible config file (so I don't have to use their rendering library) output kerning information cross platform a rendering library would be great if it lets me make the actual OpenGL calls. So what tool have you used? Were you happy with it?


Good ways to edit arbitrary collision shapes for 2D physics engine? Assume you have several 1024x1024 textures which contain an arbitrarily shaped and relatively complex cave system whose walls need to have collision polygons defined. The polygons need to be convex to work with the physics engine. What kind of process and tools can you think of that would make editing the vertices of these walls as efficient and painless as possible? Especially considering that the polygons need to be convex, and the designer needs to see when that is not the case.


IDE Debugging of Official SDK for wii and ps3? I remember hearing that wii and the ds uses CodeWarrior as their IDE. I know xbox uses visual studios but i have no idea what ps3 uses. What IDE do ps3 developers use and how do they debug? How do wii programmers debug? I always heard they use GDB but is that built into CodeWarrior or is that a separate application?


Great realtime shader tool? I often develop 2D games. I would like to know if there's a program like EvalDraw out there, that makes it easy to quickly make (for example) a square, out of a black quad, and then write some shader code, and see how that shader code modifies the square in realtime. That would be really great for my future development processes. Edit The shader tool must work with HLSL.


3D Paint tool in Maya Hey everyone, could someone help me out on this question? When I am trying to texture objects in maya (for example a barrel) I want to texture it with a brush. When I try to use the 3D painting tool it al gets black even when I have a image file selected. Also the resolution is very very low of the models and textures in maya, though the texture image is very high quality. Can someone please help me? Thanks so much for helping.


Image drawing tools (that aren't Photoshop) that work in the sRGB colorspace I'm looking for a way to create sRGB raster images. Now, I could use Inkscape and just have it render to a raster format, but are there any image drawing tools other than Photoshop that work in sRGB? Here's what I want to be able to do more specifically. Let's say the image is all one color. I want to be able to pick color 0x808080, which is in the sRGB colorspace. I want the file to write an image where every pixel is 0x808080. And then, when I read it, I can tell OpenGL that it's sRGB color data, so it will treat the 0x808080 color has being from the sRGB colorspace. The important part is that, when I'm selecting colors in the tool, the colors I'm selecting are from the sRGB colorspace.


What language and tools are good to start with for Linux game development? I would like to start learning about game development and I would like to do it using Linux. My main experience has been with Java and a bit of C , but that was for applications and not games. Now that I want to try with gaming, I'm wondering which IDE language should I use in Linux, whether I should go with C and compiling files manually at the beginning, or maybe continue with Java Eclipse, also I think I can use Eclipse with C , I have also started reading about Python... I was thinking in starting with the typical "Tetris" just to understand how a game works internally, and I think I can achieve that with all the previous options, but what do you recommend me or how have you started game developming under Linux?


SFXR Like Tool for Speech Sfxr (and also Bfxr) is a great tool for generating sound effects for games. Is there something like this for speech synthesis? Not every game development tool and platform has a speech synthesis engine, and it would be great to at least get some decent sounding placeholders in place to see how the usability experience plays out. Even better if the results are tweakable, like sfxr. I'm looking for something I can at least run on windows, though preferably (like Bfxr) I would like a web application that I can just run out of my browser.


Sprites saved in INA and AN format? I'm not sure if this is a suitable question but I found a game that had all it is sprites and stuff saved in INA and AN format and I got curious to know which program is it. Or is it some sort of compressing or alike and how it is usually done? Anyone know? Here is the content of one of the files http pastebin.com EzUsFvdG Here is a hex dump of the above file http pastebin.com CTErFBcS The above one is the AN file and the bellow one INA. Hex dump of a INA file which seems to be some sort of map or data file (I believe because of the layers info, etc?) http pastebin.com 2fWn8izR


Tools for non programmers to add new tasks to games Since graphic designers end users are not programmers, what are the technique to allow them to add new tasks or change application logic in a game? what are the end user tools? I want some popular examples.


Blender For Game Development, Pros And Cons Blender is one of those applications that you either love or hate. I know it is great for 3D modeling and and animations and there is a lot said about the UI and its steep learning curve. I am more interested in how Blender stands out as far as Game Development goes. So my question is, what would be the Pros and Cons of choosing to use Blender to develop a high performance 3D game?


How do I simulate color blindness for accessibility testing? Is there an application I can download (or some configuration of Windows, or something) that will let me see how my game will appear to users with different color blindnesses? There are already good questions about how to avoid badly designing your game for colour blindness. There's also a Photoshop filter from VisCheck is a nice idea, except their image processing upload service is down. Is there, therefore, a tool I can use to simulate colour blindness and see how things look? Ideally, I would like to try different types (red green, blue yellow, mild severe). If not, how do other game developers test avoid this problem, other than ignoring it, or having access to a color blind person (which I don't)?


Using model tools as map editor I want to make a game which would require a 3D map editor. Of course, I would like to avoid creating such an editor. My idea is now to use modeling tools (3DS Max, Maya, Blender) to create the map, and to give game specific objects specified names. This way I'd just need to write an COLLADA native map format converter. But I'm not sure if this is possible the way I imagine it, that's why I'd like to hear your thoughts on the matter. Are modeling tools suitable to create big open world maps? Can this "naming convention" idea for game specific objects work? Are the modeling tools able to export a scene in chunks in a way that occlusion culling and collision detection can be properly done? If not Is there a way to build a suitable data structure from the exported data?


Speech synthesis book? When I was a kid, everything had a speech synthesizer in it, more or less. A couple years back I started to wonder where the technology is going after all these years, and after some research found that it's going nowhere. Storage has increased, making concatenative synthesis more life like, but little else has improved. Text to speech seems to be the primary research field. Most books I've found of the subject of speech synthesis skim on the actual voice generation and then spend hundreds of pages on text to speech. I'm not interested in text to speech as such, but more on the voice generation. Yet, I haven't found a single book with good, practical explanation of this. Concatenative synthesis is simple to grasp, but formant is the one I'd like more information about. (The third method, physical modelling, would be a plus, but not all that interesting). What makes this game specific is that I'd love to make a tool that lets low budget downloadable games have speech, without having to go out to get actual voice actors and having to store hundreds of megs of oggs with the game. Since the author is in complete control of the voice editing before release, text to speech is less important what's more important is the voice synthesis. So, anyone know any good books about this?


What are the tools, programming languages and development processes of AAA games? Only thing I am able to find about "big" games like ac, hl, bf, cod is engine used to run the game. But I am interested in what software development methodology, programming and scripting languages were used. As well as tools for creating models, music, animations and other media. Further, were the team team organisations and so on for a certain game (or game series). Is this information even available to the public?


What is a good tool for producing animated sprites? Has anyone come across a software package that allows you to build animations in a similar way to how you can in Flash (i.e. using techniques such as tweens amp bones amp easings, etc) and then have the result exported as a sprite sheet?


Most efficient way to generate 2D portraits I am not sure if this is a fitting question for gamedev, or if it is too art related. I am currently trying, to create 2D character protraits for my game. At first I tried to draw them and even though it helped polishing my drawing skills the end result either required way too much time or it simply looked like it was created by a grade school kid. So I am currently looking into some tools which from which people like me who are not out of the art world might benefit. Especially tools which can create a 3D head hair, so that I can render them. I have tried several 3D generation tools such as makehead and makehuman to create the basic head shape. But I have to admit I am not well versed in what other options are available what has the best quality etc.


tile based 2d level editor Possible Duplicate Tools for creating 2d tile based maps I am Indie Game developer and I am looking for a tile based 2d level editor. I also would like to know the free ones as well as paid ones, which you feel as the best.


Very easy game builders? Possible Duplicate What are some good game development programs for kids? I want very easy game builder for a kid somebody who knows nothing about programming games (how they work inside) and just wants to build some (I could teach him but I am not available all the time). She tried Adventure Maker and got confused. It has to be something very straightforward. Do You know about any? Thanks. )


IDE Debugging of Official SDK for wii and ps3? I remember hearing that wii and the ds uses CodeWarrior as their IDE. I know xbox uses visual studios but i have no idea what ps3 uses. What IDE do ps3 developers use and how do they debug? How do wii programmers debug? I always heard they use GDB but is that built into CodeWarrior or is that a separate application?


Interesting Innovative Open Source tools for indie games Just out of curiosity, I want to know opensource tools or projects that can add some interesting features to indie games, preferably those that could only be found on big budget games. EDIT As suggested by The Communist Duck and Joe Wreschnig, I'm putting the examples as answers. EDIT 2 Please do not post tools like PyGame, Inkscape, Gimp, Audacity, Slick2D, Phys2D, Blender (except for interesting plugins) and the like. I know they are great tools libraries and some would argue essential to develop good games, but I'm looking for more rare projects. Could be something really specific or niche, like generating realistic trees and plants, or realistic AI for animals.


How to version control game balance data stored in spreadsheets Is there any good workflow tooling for having good version control on spreadsheets for game data? Ideally something that supports branching or merging. Google spreadsheets allow people to edit data live so it makes "merging" easy, but it gets really hard to link the data that's live in a spreadsheet with the current version of the game in source control (ie. your git repo or other) Conversely, with a local tool like Excel you at least have actual files that can be stored in the repo, but there doesn't seem to be good tooling for merging different versions of them. With all that in mind, how can we ensure that a specific branch in a game repo can be linked to a specific version of the game data, and how can we allow people to work on different "branches" of game data in parallel while still keeping the ability to source control?


Use of solid brushes and CSG in level building Since Quake 1 (I think it was the first), level design tools for FPS games have used solid brushes and CSG operations to define level geometry instead of more conventional poly modeling tools you see in general purpose 3d applications like 3DS MAX. Why is this? Is it More productive for the level designer? More likely to lead to closed geometry that won't screw up potentially visible set pre calc? Results in lower poly count (more cumbersome tools dissuade designers from adding too much detail)? ...


Are bounding volumes created by artists? I'm interested in where in the tool chain bounding boxes are created. Are they made by the artists? In the modeling tool? How are they exported? Can Maya 3DS Max Blender ... mark geometry as bounding box? How does that work in Collada FBX?) Or is there a tool which calculates them? Are they calculated at run time? I basically know how bounding volumes work, but I'm a little bit confused on where to get them from.


Game treatment collaboration tools Other than using a wiki, what good (or purpose built) tools allow for collaborative work on a game treatment? I have a couple ideas I'd like to get fleshed out and built, and have a small team who will work me on the project(s). How can we best iterate over and define the game play, graphical styles, etc?


Image drawing tools (that aren't Photoshop) that work in the sRGB colorspace I'm looking for a way to create sRGB raster images. Now, I could use Inkscape and just have it render to a raster format, but are there any image drawing tools other than Photoshop that work in sRGB? Here's what I want to be able to do more specifically. Let's say the image is all one color. I want to be able to pick color 0x808080, which is in the sRGB colorspace. I want the file to write an image where every pixel is 0x808080. And then, when I read it, I can tell OpenGL that it's sRGB color data, so it will treat the 0x808080 color has being from the sRGB colorspace. The important part is that, when I'm selecting colors in the tool, the colors I'm selecting are from the sRGB colorspace.


Is there a command line ATI texture compression tool? Is there a command line tool that can convert PNG and JPG files to ATITC compressed textures? I have my own export pipeline that converts all textures to PVRTC, ATITC, and DXT, so I have no use for a GUI based tool like the Compressonator. Also, I'm running on Linux (although Wine might be able to handle simple conversion tools).


'Binary XML' for game data? I'm working on a level editing tool that saves its data as XML. This is ideal during development, as it's painless to make small changes to the data format, and it works nicely with tree like data. The downside, though, is that the XML files are rather bloated, mostly due to duplication of tag and attribute names. Also due to numeric data taking significantly more space than using native datatypes. A small level could easily end up as 1Mb . I want to get these sizes down significantly, especially if the system is to be used for a game on the iPhone or other devices with relatively limited memory. The optimal solution, for memory and performance, would be to convert the XML to a binary level format. But I don't want to do this. I want to keep the format fairly flexible. XML makes it very easy to add new attributes to objects, and give them a default value if an old version of the data is loaded. So I want to keep with the hierarchy of nodes, with attributes as name value pairs. But I need to store this in a more compact format to remove the massive duplication of tag attribute names. Maybe also to give attributes native types, so, for example floating point data is stored as 4 bytes per float, not as a text string. Google Wikipedia reveal that 'binary XML' is hardly a new problem it's been solved a number of times already. Has anyone here got experience with any of the existing systems standards? are any ideal for games use with a free, lightweight and cross platform parser loader library (C C ) available? Or should I reinvent this wheel myself? Or am I better off forgetting the ideal, and just compressing my raw .xml data (it should pack well with zip like compression), and just taking the memory performance hit on load?


Tools for developing C64 Games Just wondering what people nowadays use for developing Commodore 64 Games? I've got the Programmer's Reference Guide which goes into all the details, but in the modern Age I assume I won't have to do development on an actual C64 itself? Are there tools that run on Windows or Mac OS X that are a bit like an IDE that offers some help and some debugging facilities (e.g., by hooking into an Emulator) or easy packaging into .d64 disk images? Is 6502 Assembler the one chosen language, or is C development feasible? (Ignoring BASIC here)


What tools are available for creating 3D collision and pathfinding data? What is the process of creating geometry data to assist on NPCs movements and such on a 3D world to avoiding having them from going through the ground, etc? Are there specific modelling programs that can create the world and the collision geometry to be used? The map I made has caves, lakes with deep water, varying terrains heights, mountains, etc.


Is there an existing algorithm to find suitable locations to place a town on a heightmap? I've been experimenting with random generation of a "map" with the intention of building a basic sort of procedural map generator. Generating a reasonable heightmap using libnoise hasn't been that much of an issue. I am considering using A or similar to plot two main "roads" across the terrain from top to bottom and left to right, intersecting in the middle of a town in some relatively flat section of the terrain. I am unsure of the best way to go about locating the optimal point to place the town though. I created a "steepness" map as another map which looks at the points surrounding each point on the heightmap to determine the steepness and then sets 1 if steep and 0 if not to create a "mask" of steep and flat areas. How then could I determine the largest rectangle area that will fit within those flat areas? Or perhaps I need to re look at this a different way and place the "town" first then build the terrain around it rather than trying to place it into an existing terrain.


Use heightmaps or direct vertex manipulation for runtime terrain editing in UE4? I am creating a terrain editor and creator for in our game, in which we should be able to create hills and dales, create different shapes(forms) in the terrain etc. I came up with 2 approaches on achieving what we want, 1. modify 2d heightmaps by darkening lightening colours update terrain vertices based thereon. 2. Create a plane and modify the vertices of the plane to shape what we want. So my question is, which way would be faster better for a ingame terrain editor? And why would you recommend that? Or, if you know of a better way, I would love to hear. Thanks


Level editing using a 2D map for a 3D game We're trying to make a level editor for a 3D game that involves walking around outdoor environments. In many ways a heightmap satisfies the game's needs, but it also falls short in several ways, so we're considering various enhancements to the heightmap concept, but it's proving difficult to find a simple solution to this problem. For a start, a heightmap has great difficulty with sharp edges. As long as everything is smooth a heightmap looks wonderful, but it becomes jagged around vertical cliffs, along the edges of roads, and anywhere the resolution of the heightmap becomes relevant. The obvious solution to these issues is to add a layer of vector drawing on top of the heightmap, so we can preciously define the curves of vertical cliffs and roads, and use this to insert specialized polygons into the terrain's mesh. A vertical cliff can even be a simple gap in the terrain mesh that can be filled by another mesh which allows us to render the cliff face however we like, bypassing the limitations that heighmaps usually have. Another issue with heightmaps is the difficulty of drawing smooth slopes by hand. For the purposes of the game, terrain should either by a gentle slope or a vertical cliff, so there is no ambiguity over whether the player can traverse through it. We could scan the heightmap to detect overly steep slopes and show an error message, but what we really want to do is give the user drawing tools that will only draw acceptable slopes. But how can this be done? Perhaps the traditional raster heightmap is causing more problems than it is solving, so an entirely different kind of heightmap is called for. Perhaps instead of adding a vector drawing layer, the whole heightmap was done as a vector image and represented as a set of polygons with each polygon having a certain elevation. This way we get smooth curves automatically, and creating meshes for vertical cliffs and flat land is trivial, but representing slopes in the editor and rendering them becomes a challenge. We've considered a blending tool that would draw polygons on a second layer, and wherever these blend polygons appear the underlying terrain polygons would smoothly merge together. Polygons that have shared edges would from a slope perpendicular to those edges at an angle that makes the slope walkable. Unfortunately working out the geometry of the resulting mesh is difficult, and it means that cliffs are the default for every change in elevation. Since it seems more natural for the user to draw lines to block the player's passage rather than drawing the places where the player can traverse, another approach is to have the user draw the cliff lines in another layer just as with the raster heightmap, but now those cliff lines would act to stop the terrain from smoothing itself into pure rolling hills. Imagine each polygon of the heightmap as a pillar of sand with vertical sides, and when a mesh is formed from the map the sand flows out of its pillars, forming smooth slopes in every direction except where it encounters a cliff line and is forced to flow around. Everywhere except the cliffs need to be a gentle enough slope to walk up, so when there is a gap in a cliff the sand needs to flow through and spread out on the other side. We have some ideas about how this might be done, but it's still a major challenge to implement. Finally, we could just use a grid with sloped blocks to represent slopes. Editing would be easy, generating the mesh would be easy, all the problems would be solved, but being confined to a grid would surely sacrifice the freedom we'd hoped to have. We don't want to be constrained to being axis aligned unless no other solution is practical. Ultimately the question is are there practical ways to implement any of the approaches we're considering, or are we coming at this from entirely the wrong direction?


Large Scale GIS in a AAA Quality Game Engine? (Unreal, Cryengine, Unity, Etc.) I am working on a new simulation project that requires large scale, real world terrain and imagery (GIS). By large scale, I mean that I would like to support databases that cover something on the order of 10,000 square miles that include at least height data and satellite imagery. Using data of this size also means that the engine must be capable of managing the coordinate systems projections such that some reasonable precision can be maintained. To my knowledge OpenSceneGraph is the only graphics engine out there that makes this easy (via paged terrain support, osgEarth, etc.) However, it would be nice to be able to leverage many of the other great features AAA quality game engines bring to the table. (OSG is just a graphics engine, really. I've been using it for over a decade, but I don't want to be fixed only to what I know.) I've seen many tutorials online for importing small postage stamp sized bits of terrain into Unreal. I haven't seen anything on this scale. Asked here "Very large terrains in Unreal 4" there is a link to Unreal's "World Composition" feature. This seems to shift coordinates around and also doesn't seem geared towards using real world data. How can I represent real world terrain data on these scales in a mainstream game engine?


3rd party terrain editor I am looking for a good application for generating 3d terrains (really allowing generation and then some user editing) . After a google search, I found many, but I need one that can export the entire terrain as a mesh. This, I was unable to find. (I need either a .obj .fbx or .3ds output) The size of the file that is written and the price of the program are not major factors in my decision.


Merging tesselated terrain with manually modelled In my flighsim visual system I am rendering large scale terrain using fixed grid mesh which is tesselated and displaced using height map. But for some relative small area (usually airports) we have much more detailed models including terrain, runways and so on. And here is a problem how can I merge tesselated terrain with modelled one? On the picture bellow grey is a tesselated terrain, and blue is modelled with 3dsmax.


anisotropic fog of war Here I am not talking about how to render fog of war, but how to model exploring of terrain in a more sophisticated way. In a straight forward approach, terrain explored by a game unit is simply represented by a circle whose radius is how far this unit can see. And visible area is just union of isometric circles. But I can tell that it is not the case in popular games. Please take a look at the following screenshot from League of Legends, for example. The sight of view is anisotropic. The shape of surrounding terrain is also taken in to account. Any idea how this can be done?


Dealing with edges on spherical heightmapped terrain This is the problem I'm having where the height has been applied to the vertex, the edge of each face has been pushed apart. I was wondering how I can best deal with this issue? I read elsewhere that calculating the mean between the two adjacent edge vertices and applying to both will seal the gap, but wouldn't that cause some UV stretching? Any advice would be great, Caius.


How do I simplify terrain with tunnels or overhangs? I'm attempting to store vertex data in a quadtree with C , such that far away vertices can be combined to simplify the object and speed up rendering. This works well with a reasonably flat mesh, but what about terrain with overhangs or tunnels? How should I represent such a mesh in a quadtree? After the initial generation, each mesh is roughly 130,000 polygons and about 300 of these meshes are lined up to create the surface of a planetary body. A fully generated planet is upwards of 10,000,000 polygons before applying any culling to the individual meshes. Therefore, this second optimization is vital for the project. The rest of my confusion focuses around my inexperience with vertex data How do I properly loop through the vertex data to group them into specific quads? How do I conclude from vertex data what a quad's maximum size should be? How many quads should the quadtree include?


Dirt compression from vehicle tires So I kinda have this working but its not correct because it just averages, so I wanted to know if anyone here has any ideas. I'm trying to simulate loose dirt compression under the tires of a vehicle to reduce the potential bumpiness of 'chunky' terrain. Currently how I do this is that I have a bounding box shape around my tires, set a little lower so they intersect with the terrain. Each frame, I (currently) average all of the heights of each point in the terrain that are within the box bounds of that tire, and then set them all to that average. Clearly this won't work in most cases because, for example, if i'm on a hill, the terrain will deform way too much. One way I thought was to have a max and min amount the points could raise and lower but that still doesn't seem to work properly and sometimes looks more like steps than smooth dirt. I wanna say that there is probably a bit more to this that what i'm currently doing but I am not sure where to look. Could anyone here shed some light on this subject? Would I benefit any by maybe looking up some smoothing algorith or something similar?


How to determine character's foot contact point on a uniform triangle mesh terrain? For a terrain that is modelled by a heightmap with a uniform triangle mesh, what are some techniques I could use to determine the contact point of the foot of a character standing on the terrain? Since the terrain's Y values are altered by the heightmap, they won't be flat any more. As the character moves on the terrain, it has to know at which values of Y value its foot should be. Conceptually, what are some methods and techniques to determine the contact point of the character's foot standing on the terrain?


Mapping noise to sphere surface I'm attempting to create a sphere with terrain (aka planet). I managed to procedurally create an icosahedron, and I am able to subdivide it (yay), but now I'm stuck on terrain. My current idea was to create a Perlin like "3D Noise Field" and sample density where each of the spheres vertices fall (as a height map value). this way i should be able to tweak the noise (add octaves, etc) to roughen the "NoiseField" and thus the spheres surface. pseudo example and result public void Terrain(float Scale) if (Scale lt 0.01) return List lt Vector3 gt terrain new List lt Vector3 gt () for ( int i 0 i lt surface.vertices.Count i ) Vector3 vert sphere.verts i Vector3 direction vert.normalized Vector3 newpoint vert Sample3DNoise(direction, Scale) terrain.Add(newpoint) this line replaces the original shape! surface.vertices terrain Debug.Log("terrain Update") public float Sample3DNoise(Vector3 point, float scale) Vector3 direction point.normalized float u point.normalized.x scale float v point.normalized.y scale float w point.normalized.z scale poor attempt at 3d noise field PerlinNoise(float, float ) float x Mathf.PerlinNoise(u , 0f) float y Mathf.PerlinNoise(0f, v) float z Mathf.PerlinNoise(u , v) the average of the coords, returns "density at this point" return (x y z) 3 edit so while it appears i was able to achieve this, it's is clearly not the "terrain on surface of sphere" look I was aiming for. Any suggestions on how can I change the "noise field" so my surface is more planet like? or how else can i achieve this?


What is "terrain mesh generation" exactly? I'm new to computer graphics and need to know and understand what the "terrain mesh generation" is? I read about "terrain", "mesh", "terrain generation" but can't find an article named "terrain mesh generation". So is there anyone can explain "terrain mesh generation" ?


How do we generate overhangs with simplex noise 3d? Now I use a simplex noise 2d function with x( voxel's x location ) and y(voxel's y location) to generate heightmap. How do we use simplex noise 3d to generate overhangs? What should the x y z inputs be? Pseudo code would help a lot.


Real world terrain import into UE4 I am trying to create a basic game in Unreal Engine 4.8.1 and I wish to have it set in the Dubai, UAE but i cannot find a way that will successfully use terrain data i have obtained (NASA Shuttle RADAR 90m) to create a 1 1 scale map in unreal without creating huge world spikes. Does anyone know a method that can import the data without creating terrain spikes?


How can I store and load large 3D environments (terrains or cities)? I am interested in how a large area 3D environment in games like Grand Theft Auto V or Far Cry can be stored (on disk, in what file format) and how that data can be retrieved when it is used in a game. By "the environment" I mean only static objects like terrain with vegetation, city areas with buildings, et cetera. I'm not referring to temporary or moving objects like people or cars. I am not interested in scene rendering. I guess it may be convenient to shard (horizontally partition) the data by location creating something like "tiles" because it is usually accessed by location and such tiling will help to keep data that is related together (and reads will be faster). Also I guess the data for sure is stored in some (compressed?) 3D format with the respect to tiling. There probably have to be mechanisms that will split one object to two (or more) parts if it does not fit into a single tile. I have found a somewhat related question (How a 3D game map is stored and handled) but it only briefly answers small part of my question.


Mining cubes out of marching cubes I originally built the start of my game world with a fully minecraft style structure chunks, only visible faces rendered, noise, etc. Too blocky. I implement marching cubes. Looks great, horrible to work with The problem is when you try to add or remove blocks to the marching cubes as... exactly as they are supposed to... everything gets smoothed. It becomes difficult to raycast on a neighbor and if you do all the blocks around him get changed. Obviously. I see a lot of marching cubes metaball looking games that implement area based organic molding. You don't place "blocks" you shape an area or deshape it like Landmark mining etc. On the otherhand Blockscape and Landmark seem to be a blend of the two? The land starts out marching but you can cut clear square chunks out of it and place square cubes onto it. How can you make straight corners with marching cubes? Or is it a combination of two entirely different systems? (UPDATE) There is probably more than one answer to this, does anyone have any experience trying to do this though? I can think of a couple of possible approaches Separate player built objects into a separate mesh object per chunk keeping terrain as terrain. Run smoothing (marching cubes or others) algorithms and normal calculations only on terrain. Would probably need some sort of a half transparent cube highlighter showing what the cursor is currently selecting. I can see a number of benefits to this system, though feel as if there are some downsides I'm just not thinking of immediately that would crop up if I started coding it...? Define a "smooth" bool per cube, only assigned at initial calculation of the mesh on any surfaces (floor ceiling etc). Any built added removed blocks are not re labelled as "smooth" when generating the mesh use different math for smooth cubes than for blocky cubes. This is what I'm currently working with and it works, but it's still only about a third as smooth as a full marching cube approach would be. Basically I'm average each vertices y value with its surrounding four cubes height(noise) values while never letting it go beneath 0 or above 1 (to stay within the cube). I also had to re write the raycast click detection to use the surface normals. Re code the marching cubes algorithms to work only on the cells I want them to do what I want them to. This seems like the most difficult but possibly most visually rewarding approach. or ??


What do sandbox games usually do when generating new terrains? I am trying to make a minecraft. In my game, when the player moves to the boundary, new chunks will be generated. What I do is creating new chunks in my main thread and generating a new VBO to store them. But I find that it's quite inefficient and you can obviously feel the FPS is decreasing. What do these kinds of games usually do when generating new terrains? Do they use multi threads or some specific efficient algorithms or compute shaders (I still don't know much about OpenGL)? I once tried to generate my new terrains in another thread. But I found I can't use GL operation to generate VBO in another thread. I am thinking about pre generated some VBOs in my main thread. Is that the right way? I want to know what most people do in this situation.