instruction
stringlengths
33
29.4k
I've done my moving actions which consists of sequences of CCBezierBy. However I would like the sprite to rotate by following the direction of the movement (like an airplane). How sould I do this with cocos2d? I've done the following to test this out. CCSprite *green = [CCSprite spriteWithFile:@"enemy_green.png"]; ...
I am considering using the DTLS protocol for my online multiplayer game. For those who don't know, it is essentially a port of TLS to UDP datagrams. According to this paper, the main overhead of the protocol is in the handshake phase, which took 950 ms in their tests. However, this study (broken link; see copy on archi...
I imagine that I should be able to pair my computer to my PS3 via bluetooth and use my computer as a controller for the menus and for typing. Are there any open source projects that have done this? If not, where should I start to write my own? Maybe just look at the drivers people have written to pair their computer to...
I've seen a lot of nice 2d games recently, like Geometry wars that have really nice computer generated graphics. I would like to know how is it done so game looks really nice even if it is composed only from really primitive graphic objects. All those lights, glowing particles, transformations etc. Do you have any tips...
For my data structures course, we were asked to create Tic Tac Toe(3x3)that: 1) Has two player - dumb and smart(computer plays both sides) 2) Dumb player - "X" , always makes first move, and all of his moves are random. 3) Smart player - "O" relies on reinforced learning. Basically, he looks through the hash table(tr...
I'm looking into designing and implementing an online RPG (or more accurately, redesigning an existing piece of server software). One of the problems is that of managing visibility. Update data for other players should only be sent to a game client if their player is near the other players (i.e. you shouldn't get healt...
I'd recently asked a question for getting started in game development from where I was suggested for the book "Killer Game Programming-Java". On the page there is a java 3d program which needs to be installed. I'd downloaded and installed java3d file from here and also from the sun/oracle's site. But the program give...
Context of the question : When developing a game using Game State Management I came across a problematic when it came to handling user input : I want my game to retrieve user input a single way, but to handle it in a completely different way, depending on the context. For example, the [Up] key will always mean "Menu Up...
I've been putting together, albeit slowly, a traditional style game engine in flash/AS3 along the lines of Alundra/Final Fantasy 3/etc etc.. Everything so far is working smoothly (maps from XML data, collision, animation, etc) but I am having trouble gaining height/jumping. See the image from Alundra to understand the...
Here's the basic idea: I've got a Rogue-ish, perhaps Dwarf Fortress-ish game, with a randomly generated overworld and several dungeon entrances scattered around it. I already have the dungeons basically covered, but I'm stuck on an aspect of the overworld. Said overworld, considered as a 2D map of screens, should have ...
I am trying to make DirectX display a sprite from a sprite sheet I found on the internet but it doesn't seem to be displaying the texture in the correct position as I am specifying it. D3DXVECTOR2 scaling = D3DXVECTOR2(1.0,1.0); D3DXVECTOR2 center = D3DXVECTOR2(64,64); D3DXMatrixTransformation2D(&mat,NULL,0.0,&scaling,...
I'm working on implementing the physics surrounding a player walking on a heightmap. A heightmap is a grid of points which are evenly spaced on the x and z axes, with varying heights. The physical representation of my player (what is exposed to my physics engine/manager) is simply a point-mass where his feet are, rathe...
How do you bridge the gap between the library's low-level event system and your engine's high-level event system? (I'm not necessarily talking about key events, but also about quit events.) At the top level of my event system, I send out KeyPressedEvents, KeyRelesedEvents and others of this kind. These high-level event...
I have my isometric world represented by isometric tiles. If I were to allow the player to place buildings on any of the tiles how would I get this funcitonality to work? I was thinking if I could add a MouseListener to the images?
I'm having a hard time modeling weather. Modeling a single aspect is trivial - some sinusoidal pattern + random noise. However more than 1 is blowing my mind. I cannot have wind, falling leaves, rain, and snow all to be random. Simple collisions like rain and snow should never happen. On top of this I'd like an "intens...
I'd like to build an engine in XNA, primarily for a 2D RPG. At first, I began abstracting out some classes and built a Sprite class which wrapped a Vector2 and a Texture2D, and tried loading in content from the Sprite class' constructor. However, this didn't work. Now, it appears that I have to load all of the sprites ...
Declarative programming language QML allows to connect the elements, their properties with universal variables in shader programs description. For these purposes there is such elements as ShaderEffectItem, for instance. Here, for example, we define a certain image image.jpg. And in the source property we set just that ...
I am at a competition at work for who can make the best canvas game. Theme is a top down shooter... Winner gets dinner for free. Anyways I have been looking around looking for some good resources on game deving on the canvas. Any body got any good ones?
I have 50 little images. All are connected each other, as in a line, sort of like a cord. I want to move one of the node images and have the rest follow along like a cord, so they become a curve.
As the title. If so, how? As well as wiring it up correctly, how should I manage syncing GPU resources and update/draw steps?
I have made some research and found that bullet, ode, newton and some others are open source physics engines that should be portable enough (but I have never tried to comile/use anyone of them on phones). I am writing my games for mobile platforms in C++, so the engine should be C or C++. I need a fast engine, since mo...
I'm looking for a good 2d engine or library (that supports physics) for Android. I have a restriction - language should be C#. It's not a requirement to use Mono Droid, but it seems that it is an only way. What can you suggest?
I have custom built as a little personal project a website coded in php that is a MMORPG. It is at the minute just a personal private project but I am stuck as what to do when it comes to users battling each others' accounts! I have four stats for each user which they can train at a gym if they wish too, so the differe...
EDIT I have effectivley re-wrote this question in order to greatly imrpove its quality - see revision logs if you must I have narrowed down my problem to the initialisation phase of my program, when I am trying to create my vertex buffer. The code that I am currently using is... vaoID = new int[1]; gl.glGenVertexArrays...
I'm working on a Worms-styled game and want to generate some terrain procedurally. I've previously done a lot of terrain generation using perlin noise, and this is what I started out using for this game. The only problem with it is that it's too simple and boring, giving me some hills but not the complexity I want. I'd...
I am wondering if its possible to use the XNA Content Pipeline to load C# files? I'm working on a game and am currently writing a FSM. I would like to be able to load states from the content pipeline, but the states would be written in C# and must use my interface. Anyone know how to do this?
1) What is the latest version of DirectX SDK? 2) For my purposes I need DirectX 9.0c SDK and DirectX 11 SDK. Do I need to install these libraries separately or last DirectX SDK package contains both of versions?
What is a better idea for a particle generator (bearing in mind the intention to instance the draws to all the particles in the future)? A particle emitter that maintains its own list of particles and calls their update. A particle emitter that is passed through a global list of all particles in the world, adds the ...
What would be better: An explosion class which gets created when needed, does it's stuff, then is deleted. (one instance per explosion) An explosion class which persists through the whole game, and creates a new explosion in the appropriate place when needed. (one instance per game)
I am developing a motion capture animation system and I want my data to be stored within a BVH file. At the moment I have measured the size of the actor so I can create the hierarchy of the BVH file. I also have points in 3D representing the relative positions and orientations of the middle of certain bones such as the...
I have a Quad Tree implementation that is very useful for what I am trying to do. My problem is that when my viewport has a lot of objects, the Update for the Quad Tree takes a very long time. It is a known fact that Quad Trees are slow for non-static objects. I tried a few methods to try to speed things up, but th...
I made my first 2d platformer game using java + swing. Now I want to achieve the same gameplay adding 1 dimension. I think this will require opengl knowledge. I know the basics but i don't consider myself an expert. This is an idea of how the game should look like. So the question is, what will i need in order to do...
Not sure how many of you have heard of Stencyl as a low-barrier-to-entry game development platform, but for those of you that have worked with it - what is their business model? Nothing is free (unless it is open source and this is not), so what's the catch? How do they make their revenue? EDIT: I have emailed them and...
I need to convert code from OpenGL to OpenGL ES 1.1, I found that the GLUT library is missing in that. Can anyone tell me what do I do to replace glRasterPos3f in OpenGL?
I'm coding my game using a client-server model. When playing on singleplayer, the game starts a local server, and interacts with it just like a remote server (multiplayer). I have done this to avoid coding separate singleplayer and multiplayer code. I have just started coding and have encountered a major problem. Curr...
I have searched various tutorials for 3ds max. They only show simple house apartment and that too not compelete. Is there any online company which have tutorial set for complete building design from start to finih so that i can get idea how to model complete bulding
What are the concepts that need to be implemented in order to achieve the effect of a wide angle lens of varying extremities? Pseudocode and specific explanation referring to the various stages of the content pipeline, as well as what information needs to be passed in from the source code to HLSL would be very useful. ...
source http://answers.yahoo.com/question/index?qid=20111205162848AAb1sl9 64 Players on P.C ( 32vs32) & bigger maps with more vehicles & buildings. 24 on Consoles ( 12vs12) ( It was planned to have a 32 player limit, but was later reduced to 24). Why does the console version have a maximum of 24 players? Is it har...
I'm trying to understand how to create z-order system like you can see in http://www.realmofthemadgod.com/ Character is above the tree when he is in front of it and vice versa. Also, I'm planning to use sprite batching and all the sprites will not fit in one texture (2048*2048 for cocos2d-iphone). So I need to use seve...
Are there any repositories of free motion capture footage? Or maybe just libraries of animations.
I'm trying to do a score that is based on the time taken and number of manipulators used. The faster you do it, with the fewest manipulators, the higher the score. I've managed to get it working with you get the lowest score but not the highest and i can't think how to do it. Any help would be appreciated. I have a pla...
I have a DirectX10 texture (ID3D10Texture2D) that I load from disk with the following code: CComPtr<ID3D10Device> spD3D; // Initialized correctly elsewhere hr = D3DX10CreateTextureFromFile( spD3D.p, wsFilename.c_str(), NULL, NULL, &spTextureResource, NULL ); if( FAI...
i am soon gonna start with developing my own game for the iOS, i have the plan and idea of the game ready. BUT i have 1 question. How do people make such a smooth animation? Lets take for example: Angry Birds, if you pull on the rope to shoot the bird everything looks so smootthh or take Tiny Wings for example.., how d...
I've built a couple of 2D games that are roughly MVC; that is, the main game data and logic are separated into the model (and possibly controllers), and I have a bunch of screens/states that just pull stuff from the model class and draw that on screen. This is not a complete separation, because things like size, collis...
In an iOS app I am writing I am now culling all the GL 1 crap from my GL 2 code. Can I safely remove glEnable?
Honestly I have never taken a trigonometry class, but I am trying to create a dual stick shooter in XNA, can someone please look at my code and look to see if there are things that can be fixed, The image facing is off? Why? using System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framewor...
I'm specifically referring to the types of animations that are typical in 2D hand held games on the Nintendo platform, where menus slide in, bounce, squish, etc. I'm looking for something that is somewhat canned but allows for tweaks. Does something like this exist in any form (don't really care what language or for wh...
Currently I've got a little 2.5D platformer with the camera tracking the player. Now when I go to insert a GUITexture or GUIText game object into the scene, it comes up absolutely fine in the Editor view, but when I go to play it there's absolutely nothing to be seen! At first I thought it may have been a script I was ...
After onPause is called for the GLSurfaceView the rendering surface is destroyed, along with all the textures, shaders and the like. On onResume() should the surface not be recreated and GLRenderer onSurfaceCreated called? However that is never called. I am using render when dirty.
I have a projectile that is moving around the world (in a ballistics trajectory right now). I am currently keeping track of its position and velocity. I want to draw it oriented to its velocity, so that it is facing the direction it is going. This seemed like as good of a time as any to try to understand quaternions so...
As we all know, the game is not only about gameplay, sound effects add a lot to the production value. The more unique, the better the result. What are the steps to get a decent quality sound from reality into a game environment? And some tips probably, as whether I should cover multiple cases of the "sound": normal, ec...
Sound and it's quality is something like religion. Never ending story. People will say, that MP3 320kbps is lossless, while experts will say that any MP3 is crap, but in the end, no one will hear a difference in the result... unless they're in the music industry for 20 years+. What would be the best format for video ga...
I'm currently working on a 2D soft-body physics engine (since none exist right now -_-), but I'm worried that there's no point to spending what will most likely be years on it. Although I love working on it, I doubt such an engine would get any income considering anyone willing to pay money for the library will likely...
Is there any way to have the texture of a model loaded from a Png ? I have a simple prism to test it on, but i just want to be able to edit an image and have the model's texture change. Thanks!
I calculates the score in game project using android cocos2d, in that game after finishing the first level it goes to the next level, so i want to store that first level score and also add next level scores. how can i store that scores in android-cocos2d.
I'm thinking about clients spoofing IP addresses, tricking other clients that they are the server; that sort of stuff. (I don't know much about this, so if this is completely wrong, please correct me.) What should I do to prevent this? Because it is a real-time game, if I were to use encryption, I would use something f...
I have rewritten some code to allow to load bitmaps to be loaded as textures and if a pixel has a max green color component it is marked transparent. What is odd is that I cannot use the value from a ByteBuffer that holds transparency without keeping the green intact, I can however replace it with a different color com...
I'm working on a college project using the educational Java framework Greenfoot, and as stated above we're making an r-type clone. I've been looking at using an array of strings to populate the levels. The array contains 60 strings, filling the Y axis, each element in the array represents a y co-ordinate += 10. I use ...
If I have an object space described by transformation matrix that should be applied to object to transform it to world space, what I have to do to transform point (world space) to that object space. I guess it's more of a math question, but I believe gamedevs are more familiar with terminology.
I can see this has been asked before in various ways. I am struggling to work it out though hence asking again. 2d sprite that moves and rotates. I'm looking to contain it in a bounding box as it appears that is the most efficient way to do collision detection. I had no problems getting it to work without rotation but ...
I'm completely new to computer graphics, and even more so, to game development. I am searching for information to learn the basics, quickly. I have one question in my head; how do engines like the Crytek Engine or the Unreal Engine relate to OpenGL or DirectX? I'm very interested in game physics, but I can't figure out...
I'm completely new to this graphics and game development. I have read about Rendering (drawing a 3D graphic on a display 2D) and there are many ways of rendering, Rasterization, Ray tracing, radiosity, ray casting. And my doubt is if OpenGl implements one of these. I mean with OpenGL I can draw lines, circles and so on...
I am trying to program Fantasy Flights boardgame "Descent - Journeys in the Dark", but I have hit a wall when dealing with implementing abilities, which are a crucial part of the game. Abilities are used alot of different places, but are similar most of the time. For a hero an ability could be: At the start of his tur...
I am brand new to Xcode, and I am also brand new Objective-C programmer. I was wondering if it is possible to create simple Mac games with Xcode. If it's not possible, could you recommend me some good, cheap game engines?
I am looking to make a program that will allow me to test units for balance when in combat. The idea is that there will be two teams of so many units of different types. I would loop through a battle system that would pick units, have them attack, etc, and then see which team won and do this many many times for an aver...
I am quite confused over how networking works in XNA. I'm currently developing a game for Xbox. I want to create a multiplayer environment and read some tutorials about it. But I'm confused over how packets are transmitted over the network - E.g.; what is the difference between a LocalNetworkGamer, a NetworkGamer and a...
I have a hexagon tiled map in which I need to check when a hexagon is clicked. The hexagons aren't actually touching, rather they have a slight gap in between each of them. Does anyone know how could I go about checking whether a hexagon is clicked without over complicating the whole thing?
I have developed a full match 3 game without the ability of making another move until all cascading is finished. I was stuck trying to figure out how to do it with the ability of making moves even if the previous moves have not finished yet. I can't figure out the programing logic behind it, I tried different approache...
I'm thinking of trying to make a game, and I heard Facebook is good place to make it popular, but I don't want to make a sprite-based Flash game, I want to use OpenGL for rendering to get nice graphics and good performance with it. I know there is Java which supports OpenGL (I think), but I would like to make my game c...
I'm adding 3 sprites (layers) to CCParallaxNode: BGLayer = [CCSprite spriteWithFile:@"Layer.png"]; [_backgroundNode addChild:BGLayer z:2 parallaxRatio:layer1Speed positionOffset:ccp(screenSize.width/2,screenSize.height/2) ]; How can I create the scroll when swiping?
I am using Xcode and I am new to Objective-C and Cocoa programming. I want to create a very simple sprite game in Xcode, but I do not know what code I should type or where/how to get started. It's a simple game where you play as a ball (I was thinking of using an NSButton with a picture) and you jump around until you t...
I'm drawing a scene where the camera freely moves about the universe. The camera class keeps track of the view (or look at) point, the position of the camera, and the up vector. These vectors/points are then passed into gluLookAt. Pan and zoom are nearly trivial to implement. However, I'm finding rotation about th...
I have just started looking into XNA for WP7 - and I am definitely the sort of person who likes to find answers to my questions without begging for help! I searched here to find an answer but I found it hard to word my question, so apologies if it has been asked. Basically I have a sprite, which I am moving to and from...
This may be a long shot, but is there a small framework out there anywhere for testing custom bounding classes and other collision objects? (for example between rays, spheres and AABB's)
For my simple MMO, the MySQL database stores things like user experience, user level, user coins, health points, etc. We wanna have an analytics system that can show me trends through daily averages, medians, totals of different stats and actions of the game's user base. Some answers that need to be answered by this a...
I'm working on a "Game Maker"-type of application for Windows where the user imports his own assets to be used in the game. I need to be able to load this content at runtime on the engine side. However I don't want the user to have to install anything more than the XNA runtime, so calling the content pipeline at runtim...
I've heard many people saying that it makes games more successfull if you can just play them on your browser without downloading a file at all. Has there been any research about this? Because i find it hard to believe that the people are so lazy they cant click one download button and just unzip the game. I find it har...
I have been requested to make a port of an iOS game for Facebook. The game itself is fairly simple, it is a puzzle game using a 2d array for a grid with XML passed from a server for loading objects onto the the grid, to create levels. The game will ask questions at stages which will be passed to my server and stored fo...
What would be the easiest way to make a bump map of the dimples on a citrus fruit such as an orange or lemon in gimp/photoshop without using pictures of it? e.g:
I need your recommendations for a good study source about videogame orientated C++, algorithms and vectorial algebra. I will be applying to a videogame programmer course in January so I need to start getting ready asap. Cheers!
A Texture2D in XNA can only hold so much. Depending on which profile I use that limit is either 2048 or 4096 pixels wide. As far as I could tell from my research (someone correct me if I'm wrong) GDI Images do not have any limitation other than not exceeding the user's memory. I'm looking for the most efficient way to ...
I'm making a 2D platformer on Android using libGDX. One thing I've had a problem with recently is gravity and jumping. I found a few tutorials on the internet and was able to come up with this... public static final int JUMP_HEIGHT = 64; public static final float JUMP_GRAVITY= -6.0f; public static final float MAX_GRAVI...
Say I have a 2D Rectangle. By offsetting its position by x y and rendering a shadow by an offset, it gives the illusion of a shadow. If I rotate the rectangle Z degrees and try it with the same offset, it appears as though the light source has moved. How can I compensate for the angle so it appears as though the shadow...
HLSL Code: //Lights struct Light { float3 pos; float3 dir; int type; } m_aLights[3]; How can I get/set an effectvariable to m_aLights with Direct3D10? Thanks
Hey guys I have experimented in making games in java. So far I have created A text game in JOptionPane that is kind of like Zork but with yes and no buttons (that were changed to "left" and "right"). I have also made a small game where a ball bounces around a screen but with was with heavy help from a website tutori...
How can I get a 2d sprite to move to a position clicked on the screen, without bumping into other objects? I'm programming in java using the android API library I have created a surface view and loaded my sprites as a bitmap object.
Exactly how much more expensive, and while we're at it, difficult, is it to have non-axis aligned bounding boxes in your framework? I realise that it very much depends on what you're trying to do, so here's a little bit of detail; My small demo framework has a number of bots running around shooting each other. when the...
I would like to be able to add the following feature to my tech demo: at the moment bullets hit the walls, little pieces fly out of them, as well as decals appearing on the walls. Computing power is good enough, now, so that many games have destructible environments. I would like bullets to shatter small surface segme...
I need some info about importing game objects from Maya to Unity. I am making 2D Tower Defense game, I have made some basic functionality using dummy objects (cubes and spheres). Now I want to replace these dummies with objects made in Maya. The basic objects for gameplay would include walk of enemy and tower rotation ...
Is there a known 'most efficient' algorithm for Sphere vs Ray collision detection? I recently stumbled accross Arvo's AABB vs Sphere collision algorithm, and I am wondering if there is a similarly noteworthy algorithm for this. One must have condition for this algorithms is that I need to have the option of querying th...
I'm making a game in objective-c using cocos2d. I have the following: @interface Player : CCNode { CCSprite *mySprite; CCSpriteBatchNode *sceneSpriteBatchNode; //... } @property (nonatomic,retain) CCSprite *mySprite; - (id)initWithSpriteBatch:(CCSpriteBatchNode *)_spn; -(void)updateStateWithDeltaTime:(ccTim...
I have a polygonal mesh, defined by vertices $V$, edges $E$ and face $F$. One can view this as a real life 3D terrain. I want to obtain cut sections of this terrain, defined by vertical cut planes. What are the algorithms I can use to determine the cut sections of the terrain in an efficient manner? The cut section her...
I am interested in learning about the new movement about cloud gaming services such as Gaikai and onLive which offer remote rendering on clouds for games. I want to know which is the most popular option out there to develop a game upon. I want to develop a small game, without paying anything(open source is what i prefe...
In a component based system, how should change the rendering/visual state of an entity such that I know what animation to use, without breaking encapsulation? My guess is that it would have to be message-based system, not a query-based one, because having a few ifs checked every frame to determine the right animation b...
Any suggestions for creating ocean waves / ripples as seen in the pictures here: http://www.pocket-lint.com/news-gallery/42042/crimson-steam-pirates-ipad-review/10#image and video here: http://www.youtube.com/watch?v=AtrZX3e4AL8 I was thinking of setting a background repeating tile. Then making some kind of noise tile ...
This could probably belong on Stackoverflow but I'm not sure. I want to change some variables that are in my game loop from different classes, this is probably a simple question with something i'm overlooking but I can't think how to do it easily. The only way I can think to do is pass a pointer to whatever class I wan...
I just had a pretty good idea for a mobile game and I'm having a little trouble selecting what tools or languages to use for the job. I have experience with flash and AS3 and I know I can put that onto mobile devices via Adobe Air. What I found kind of frustrating was that I have 5 games on my Samsung galaxy tablet and...
Question When you have a 2D game that uses really large images (larger than your hardware can support), what do you do? Maybe there's some interesting solution to this problem that never occured to me before. I'm basically working on a sort of graphic adventure game maker. My target audience are people with little to n...
I am using this formula to rotate around a point. X := originX + sin(angle)*Size; Y := originY + cos(angle)*Size; In cartesian cordinates how would I keep the objects orientation in relation to the origin object as it moves around the origin. Any one know where I could look for answer to that?
Consider the following demo: http://www.ashereinhorn.com/post/11140243390/short-capture-from-the-last-xna-version-direct3d (It has now almost been converted to C++ and DirecX10, and so the code is not important here, it's the substance I'm interested in) Basically the little agents move around killing each other, their...