instruction
stringlengths
33
29.4k
Do you know any gamedev related magazines ? I only know http://www.gdmag.com/ and http://www.gamasutra.com/ . I also know http://ffdmag.com/ ,there's texts about flash (sometimes related to games)
Is there a good way to represent variable terrain using heightfields (or heightmaps) in an ASCII game such as a Roguelike?
Just starting out with blender. Did something and now I can't work out how to get the basic File Open screen to appear. Have been trying for a while. Anyone able to tell me what to do to get back to the basic File Open screen, i.e. the one at http://wiki.blender.org/index.php/Doc:2.6/Manual/Data_System/Files/Open Her...
What is the procedure followed by game programmers for saving and resuming game state? like files/mappings. I want to save it for tower defense game and I am using unity3D game engine.
Hi I am looking for suggestions on how to write a collision response for game programming purpose (so not a scientific simulation). I am dealing with 2D polygons that are rotating, and I want them to be able to stack. I also want friction and gravity. I have a detection mechanism that returns the separating axis, how l...
I simply want to pick a few spheres in my scene using the mouse-ray. I have implemented(copied most of it but with little understanding) a ray-sphere collision code. Also I have implemented the code for converting the mouse window coords to OpenGL coords. And constructed the mouse function. I have a ray class. In other...
Is this just a billboard quad with a bloom shader?
This project "Locomotion Skills for Simulated Quadrupeds" creates an animation for the dog model in the program. However if you go into the project's files the dog's skeleton is made of individual obj files for each bone. How were the bones loaded into the program to make the complete animation? It's as if the position...
Usually, resource manager is needed for desktop/mobile games. But is it needed for HTML5 (browser) games? Resource manager's main responsibility is to make sure there is no clone of a resource in memory. But in browser, when you request something, the request is usually cached. So when you make another request to the s...
I have a Screen class that encapsulates the updating and rendering of several distinct states, such as the menu, gameplay, and credits. A stack of screens exists on which the screens themselves need to be able to push new, and pop screens (imagine selecting "Start game" from the main menu, pushing the gameplay screen a...
I've finished programming my game engine, and now that I've been testing it, I've been noticing some graphics problems. The big one is that when a player tries to push against a wall, their character will "jiggle" against it as it constantly tries to enter the wall's space and the collision detection constantly pushes ...
I have a simple requirement: I want to put some ships (I have some mesh models) on a body of water, with islands, and play with various collision avoidance and command and control algorithms. So I need a environment where I can modify object behaviour but where the world and its mechanics are already coded. I was ex...
I'm making a 3D game, and I'm stuck on a little experiment. I currently have a flat plane with a free camera running around, and a sphere (really, a light approximated as a sphere) that rests above the surface of the plane at, say, 50 units up. I'm trying to move the sphere, and I can do this easily by simply adding t...
I'm in need of some assistance, as I've been at this for 2 days now and have gotten almost nowhere. I'm trying to use the XNA Bloom sample's component to apply bloom only to my UI text. (The only way I know of to achieve a nice glow around the text) (No need to look up the sample, I'll post all the relevant code for ...
Hello I am developing a Pool game, and I've been scratching my head about what formula is needed to implement an animation for the cue stick. The animation of the cue stick should look as if it's being pulled back, as the user starts to change the amount of power that he/she would like to apply to the ball.
The crafting system in Minecraft uses a 2x2 or 3x3 grid. You place ingredients on the grid, and if you put the right ingredients in the right pattern, it will activate the recipe. Some interesting points about the design: Some recipes can exchange certain ingredients for others. For example, a pick uses sticks for th...
I have a thin-walled hollow object that I made by extruding a closed path that formed an outline. So the objecft is like a hollow pipe with a 1mm-thick wall (but the cross-section isn't a simple oval). Now I'd like to fit a cap for it. Since my objectt is hollow, I can't just boolean-intersect the shape with a bloc...
I am developing a multi-player on-line game. I just started coding the server but I have no idea how to do it. Do I have to use threads ? And if i do, do I need one thread for every client? Knowing that I am using UDP, can I use multiple sockets in different threads to send packets on the same port? edit: server does: ...
What public animation file formats are there available for 2D games? I'd like to know about both formats for procedural/skeletal animation, as well as traditional animation.
On the faq for the current preview release, http://unity3d.com/unity/preview/faq it says that while networking is not currently supported for flash compilation, we can write our own in AS3 using the Flash API. I can't seem to find the docs for this API or figure out the right way to work in both AS3 and Unity. Can anyo...
I am setting an HLSL effect variable in the following way in a number of places. extern ID3D10EffectVectorVariable* pColour; pColour = pEffect->GetVariableByName("Colour")->AsVector(); pColour->SetFloatVector(temporaryLines[i].colour); In one of the places it is set in a loop, each line in the vector temporaryLines ...
I am looking for documentation that explains the different kinds of (well the major ones anyway) 2D space partitioning algorithms & data structures. Any pointers besides 'Google it and sift through hundreds of papers'. A book perhaps?
I'm getting into basic 3D modelling and am attempting to texture my model. I'm aware of UV mapping and some similar texturing tools, but I'm not sure how the majority of CG artists obtain their 3D models. When creating realistic models, do they take photos of what they're making a model of and then use those, create mu...
When A computer is to draw a 3d model, does it use maths similar to vector projection? Like when a 3d model is drawn and rotated, does it use vectors/and maybe some other math to know where to draw each of the edges? If so, is this calculation made everytime the screen is refreshed? Just want to see if I can create a b...
I'd like to use skeletal animations in my 2D game, and since I already use Box2D as the physics engine, I'd like to enable (but not enforce) ragdoll animations as well. I need some help in figuring out how the Animation and Physics entity components relate to each other. How should data be represented on disk? Should t...
I've got a live wallpaper out on the market which uses OpenGL to render some basic shapes and a flat plane. The simple lighting creates a gradient effect across the plane, which looks fine on most devices. The Samsung Galaxy S2 series seems to have some trouble rendering the gradient, though, as you can see in this s...
I m in need of some UX guidance if there is any for a game in mobile. for example for pausing the game (assume I m not using iOS) say you want to pause the game and you dont want to loose part of the screen on having a button that will pause. I was thinking of using some sort of gesture ( double tap?, slide up?) is th...
Is it possible to somehow extrude a single polygon into creating a solid object (ex: converting square polygon to cube)?
My team and I are currently developing a 2D platformer with SDL/OpenGL and we want to add support to the Xbox360 Gamepad with the XInput library from Microsoft, but we are currently having a problem. First of all, the method for reading the key states it's this one: bool InputMapping::Gamepad::checkKeyState(WORD button...
I'm stumped. I have been fighting this for about 2 hours now. Here are the interesting parts of my code: protected override void Update(GameTime gameTime) { // Allows the game to exit if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed) this.Exit(); var time = gameTime.Total...
How to create solid human characters in MAYA, so that their hands do not cut into bodies while signaling hand signs? Or can I make the characters solid in Unity? I create animations in MAYA and import it into Unity for further development. Thanks for your help!
I'm new to the game dev world. I have a rather large project in mind (I learn by setting myself challenges :P ) and I'm wondering what the best engine/framework/language is for a 2D game with thousands of sprites/actors on screen at a time. Bare metal type stuff. I need to still be able to zoom in and out with that man...
I am trying to learn pygame. In order to do that, I have downloaded one of their examples : http://rpg-world.googlecode.com/files/rpg-world-src-0.93.tar.gz And started to run it in debug mode. However, I have discovered quite quickly that unlike a classic program, it is hard to debug a computer game, because of the f...
currently I am working on my own take of a tile-based game (think Terraria, but less fantastical (I think that's a word? Sorry if it isn't)). Anyway, I currently have collision detection working (for corner cases even!) which was a big step for me. There is something extremely gratifying about seeing a sprite not run ...
I am currently doing this Cocos2d tutorial: http://www.raywenderlich.com/1271/how-to-use-animations-and-sprite-sheets-in-cocos2d ...and get the following error messages: 2011-12-30 16:36:28.536 AnimBear[11273:10a03] cocos2d: CCTexture2D. Can't create Texture. UIImage is nil 2011-12-30 16:36:28.537 AnimBear[11273:10a03]...
I am in the early stages of developing a game. I don't have an artist or graphics person on board yet. How can I create simple images for animation to work through the early stages of game development? Should I create stick figure images in Photoshop/Pixelmator or are there other ways of using sample artwork or some ot...
This isn't so much a "give me teh codez" as it is a request for the "right" steps to go through. I want to implement FXAA in XNA, but I'm a relative newb to the graphics side of game dev, so I'm not sure what the most efficient way to do this would be. My first hunch is to render the scene into a texture, and then rend...
I'm trying to understand the exact meaning of RenderTargetUsage.DiscardContents. The documentation says: Determines how render target data is used once a new render target is set. DiscardContents - Always clears the render target data. Does calling GraphicsDevice.SetRenderTarget(null) to return to the back buffer co...
Has anyone successfully used the CAT bone system in 3ds Max and exported the file into XNA? If so, what was your method of doing so? There are a number of methods of doing this, apparently, but the ones I've tried have not worked. I used the Panda Exporter which creates an .X file. This seems to be the latest way of...
I'm creating application in XNA 4.0 and am trying to create a specialized background. I'm familiar with the creation of a parallax scrolling background but I'd like to create a background image that appears to be draining into a hole. The issue is that I'd like the drain/black hole to exist in a variable location on t...
I am looking for a way to import my 3D models (including materials and shaders) from 3D Studio Max to XNA. For example, if I have a model with diffuse, bump, reflection textures and values (through Max's basic shader), I want to be able to present it in real-time using the XNA framework. I thought about doing it like t...
I'm creating a game in XNA similar to Minecraft - Minecraft 2D It looks like this Here's how it works: All blocks are generated once with fixed x,y coordinates and just re-drawn. //generate world for (int i = 0; i < 25; i++) { blocks.Add(new Block("top", i * 32, 32 * 7, Color.White)); for ...
I am using a 2D camera, which does rotations and zoom. Currently, I am using the following to get my MinX, MinY, MaxX and MaxY... public float MinX { get { return pos.X - gameEngine.screenWidth / 2; } } public float MaxX { get { return ...
I am working on a very basic 3D program, my first one using OpenGL. What I am trying to do is trace a ray from the mouse's location on click which works, but only when the camera is not rotated. When the camera is rotated, the unproject treats it as if it was not. What am I doing wrong? The code for unproject: Coord3<...
I have a series of hidden object and puzzle games mapped out that I want to develop for the iPad and although I have written programs before, it's been a while. I've been trying to find the best platform to use and can't seem to find any helpful suggestions although HTML 5 seems to be the most mentioned. I will be usin...
Possible Duplicate: What should a game engine do? What are the usual responsibilities of a game engine, and which of these things especially need to be efficient (performance-wise)? Can I get a break-down of the purposes that a game engine is used to serve, and how it differs from a game itself? I'm a newb, so some ...
I'm currently intergrating pygame and pyBox2D, and am wondering which side is best to try to keep to in terms of game units of size. Box2D is Meters PyGame is Pixels At the moment I am thinking I will keep everything on the box2D side where it makes sense, and then just use a scaling method to turn those numbers into p...
I am making a tile based game. Recently I moved to drawing tiles as primitives to speed up things and also allow for easier lighting (Vertex Shader). I then took it a step further and made some calculations to "merge" together tiles into the same primitive to gain even more performance, and to get around UV texture pro...
what I'm trying to do is make the paddle follow the mouse position(red dot). I know how to rotate the paddle relatively to the center of the screen, but I'm not sure how to determinate the coordinates. thanks.
I looked up some R G B values for certain colours, such as "Indian red" for example, which has the RGB values (238, 64, 4). If I use those values into a D3DXCOLOR structure like this: D3DXCOLOR(238, 64, 4, 255), the colours display oddly - as white! This displays as yellow: D3DXCOLOR(238, 64, 0, 255). Why is this?
I'm currently selecting a C++ math library to use for a project. There are several questions here and on SO concerning the 'best' library available and many answers with different suggestions, but I would like to run some tests on each of them before I make a decision. I would like to select a library that will cater f...
In my games update loop, which happens on a fixed timestep of 30 times per second, I am checking the current state of several keys to determine how to move the player. For example: if(Keyboard.down(KEY_LEFT) { /* move character left */ } This works fine in situations where I expect the player to hold the key down for ...
I'm in the process of choosing technologies to build the level editor of a Flash RPG game. On one side I can use AIR and build a ingame level editor that's probably going to give the best result. The problem is, I think it will be very hard, I don't have good memories using the UI libraries of AS3. I think that would t...
I want to create a map for my level, and to make it look realistic from topographical pont of view. Is there anything that you can recommend? Edit: I want to create a 3D map of islands, sea, volcanoes, shores, that will look natural. Suppose that I want to write the map generator by myself. Are there any resources on...
I am attempting to create a Pool of Fixtures, in order to reduce memory consumption. My problem is that when I attempt to return a Fixture to the Pool and re-assign its position on the Parent Body, once it is repositioned the Fixture no longer provides any collision response with other world objects. It seems that if ...
I'm having issues with my character in terms of gravity and the character bouncing up and down. You can find more information about it in the link below. Character bouncing off ground due to gravity I thought the answer below fixed it unfortunately it didn't after doing some more digging through the original platformer...
Can somebody recomend a free site for distributing and advertising my freeware (but not open source) Asteroids game in BINARY format?
I see that OpenGL versions 3 and up eliminate the use of client-side rendering. Immediate mode has been eliminated, and vertex arrays seem to be deprecated. Instead, if I understand correctly, VBOs are the main way of rendering vertices. While I see the logic behind having a uniform way of rendering everything, is it t...
I'm kind of new to XNA (and games in general). I'm trying to make a young relative of mine (10yo) a simple fun game where he is the main character. I'm down to the wire (I have to get it to him by tomorrow and wont have time to work on it at all tomorrow, which means I have to finish it tonight). Everything was tigh...
I'm experimenting a bit with pathfinding. I'm using Javascript. I have a map array as follows: mapArray = [ [0, 0, 0, 1, 1, 0], [1, 0, 0, 1, 0, 0], [0, 1, 0, 1, 1, 0], ]; The map is fairly excessive in size and I would like to take out a portion of it to pass to the pa...
I'm having some issue changing a basic lighting shader to take a normal texture and a diffuse texture for a model and then using the normal texture for lighting. The code is very simple and i can't see where i have gone wrong at all, am i not allowed to sample two textures with the same sampler? This is the output i am...
I have a very large number of entities (units). On each step, each unit needs to know the positions of all units near it (distance is less then given constant R). All units move continuously. This is in 3D. On average, there will be 1% of the total unit count near any other given unit with the given constraints. How c...
For my newest project, a Pokemon fan-edition, I need to collect much information on the game mechanics. So I need to know a few things about the A.I. implemented in the games. For the sake if simplicity here are my questions: Do today's Pokemon games (Diamond, Pearl, Platinum, HeartGold, SoulSilver, Black, White) incl...
What is an example of efficient sprite batching in XNA? I don't know when (if ever) I would do something like this: spriteBatch.Begin() DrawSprite1(); spriteBatch.End(); spriteBatch.Begin(); DrawSprite2(); spriteBatch.End(); Is there any time within a draw method that I would separate drawing calls like this? Thanks...
Is there a known 'most efficient' version of the A* search algorithm? I know some people write papers on the most efficient way to compute common operations, has this been done for A*?
I have a top down 3D camera: view = Matrix.CreateLookAt(new Vector3(0,0,20), Vector3.Zero, Vector3.Up); Now I want to achieve the effect like when I zoom in the scene and only show a section at the middle of my actual scene. When I now move an object via CreateTranslation it looks more like moving an object in 2D. Wha...
I can't really find anything at all on this topic. There's a bunch of YouTube videos that show people doing it, but there aren't any articles that I can find explaining the mechanics of it. In my game, terrain is loaded from a .RAW heightmap, and saved to a .RAW heightmap. But the player will be able to modify the terr...
Ive been reteaching myself opengl so I can make a game on android. However Ive been struggling with how to build objects and scenes in opengl using c/c++ and passing them through the jni to the virtual machine where android can use them. Can some one point me towards some tutorials that actually show the use of nativel...
I managed to create a sphere (calculating all the vertices etc etc). Now I want to apply a texture on it. I have no idea how. I googled some "OpenGL 3 texture tutorials" but I can't seem to find anything simple. I am using shaders btw. Is there anywhere a very basic step by step tutorial on how to implement a texture? ...
I'm attempting to program an offline puzzle game in C++. I'm trying to figure out the best way (particularly during the alpha) to report back to me Whether people finish the level Where people died How long they took on the level The current version that they are playing I don't currently have a public database serve...
I'm pretty new to programming, and even newer to C# and XNA. I currently call a method that looks for keyboard input in my Update method. This method has if statements for doing what needs to be done when a key has been pressed. The problem is, since it's being called constantly, it's impossible to press a key quickly ...
In my game, every tile is a 32x32 texture. All the slopes are a 0 - 45 degree angle. I would like to determine, at the time I load the tile, if the is sloped by examining its texture/bitmap data. How can I do this?
I've been an android developer for a while and am thinking about getting into gaming. While looking for a game dev framework, I thought libgdx provides very friendly documentation and functionality. So I would like to use it if there is no big obstacle. But when I tried to see how many developers employ this library, I...
I am doing tutorials to learn Cocos2d and have a question. here is the .m code: #import "SceneManager.h" @interface SceneManager () +(void) go: (CCLayer *) layer; +(CCScene *) wrap: (CCLayer *) layer; @end @implementation SceneManager +(void) goPlay { CCLayer *layer = [PlayLayer node]; [Sc...
Suppose I have an array of models, each having it’s own “position” in the world space (scale*translation matrix). And I have an orthogonal camera. How can I test if model is “visible”, i.e. is in the range of the camera? Like this: +--------------+ | | xxxxxxxx|xxxxxxxxxxxxxx|xxxxxxxxx ...
Here's my dilemma : I want to have light sources placeable by the player, in terms of lanterns. I know the best way to do this is to use pixel shaders, which I have done a lot of research and use on, but it seems so far that the lights are static. So what would be the best method to create a dynamically lit scene? I ...
Can somebody recommend a free C++ open source library which I will use to build a networked game using UDP. Must be available for Windows/Linux/Mac. As lightweight as possible please.
So, for a game project I'm going to be working on I need to make a fully working 3D fluid simulator in Unity3D using C#, that can work in real time. The only problem is, I've never done anything like fluid simulation. I've been doing tons of research on it, and I think a Eulerian based fluid simulator would fit my need...
I'm creating a game (or app, depending on how you would define it...) where I'm moving objects (with sprites) on the screen. I've got this to half-work in both scenarios, but I can't seem to get it to work completely using only one... My problem is, I don't know where the touches should be handled for the objects. I ha...
I am building a MMO game server for a 2D game and am currently implementing the collision detection, and I am would like to know what I should do. Lets say I have 1000 players playing and 10,000 objects, should I just iterate over them all to determine if colliding? This seems a bit pricey. I could separating the world...
I'm making a multiplayer game, and I want to setup a p2p network. I'm coding a server in python to make the matches and send each player it's adversary ip and port, but I'm having trouble to make udp hole punching to work. On the client side I'm using ENET library that works over UDP. Is there any library specific for ...
I am new to Android COCOS2D and developing a simple game to start with. I am developing a game for kids in which the kids shall spell out the names of the fruits they select. I have developed the sprite sheet consisting of pictures of several fruits. Kindly tell me how will the fruit on which the kid taps will get sele...
I'm trying to get a 2 pass post-processing system going in OpenGL in a cross-platform manor using FBOs. I'm starting the dev on mac OSX (since in the past I've found it the most finicky to get working of windows/linux/osx), I have a toggle to toggle between using the FBO(post-processing) and not. The shaders are workin...
I saw a lot of picking code opengl-es, but nothing worked. Can someone give me what am I missing? My code is (from tutorials/forums) Vec3 far = Camera.getPosition(); Vec3 near = Shared.opengl().getPickingRay(ev.getX(), ev.getY(), 0); Vec3 direction = far.sub(near); direction.normalize(); Log.e("direction", directio...
Looking to make my first basic game (maybe some platformer) but haven't got across the "which language" barrier yet and hoping to get a few tips. I have basic knowledge of C++ and classes and can pass by with PHP. Did a tad bit with Java but not much past basic stuff that's shared in C and made a few goodies in Visual...
I am currently working on an iPhone project, but most of my work has been in Flash. Flash has a feature where you can place a bitmap into a MovieClip, set its registration point with the mouse and it's automatically adopted. It's one of the lovelier Flash features. Now I'm doing iPhone stuff, using TexturePacker for im...
Currently I am writing on my thesis for university, the theme I am working on is 3D Visualization of hierarchical structures using cone trees. I want to do is to draw a cone and arrange a number of spheres at the bottom of the cone. The spheres should be arranged according to the radius and the number of spheres correc...
I have been getting started making some small games in Java, and I am considering learning C# for a bigger project. I would very much like to make a moddable game, but someone told me that I need to stick with Java if I want the game to be moddable, though I don't understand why. So, what programming language character...
I have a class which "collects" line mesh transformations throughout the update and then draws them in one place by drawing one line over and over again. I'll post the code below. I'm just wondering if this is instanced or if the idea is to join them all into one mega-mesh and send that through? Or if I'm missing some ...
I'm using component based design and am at the stage or re-factoring simple player input to be data driven. Currently i have a PlayerControlComponent, which an entity has if it should be player controlled. Currently only a single entity has this. I have an InputSystem that acts on entities with PlayerControlComponent, ...
Lately I was thinking of visiting a Game Developer Conference and so I search the Internet, but I didn't find a thorough list of available Conferences. Now I know some of them, like the GDC in San Francisco but I was wondering, what other Game Developer Conferences are out there. So my question is: What Game Dev Confer...
I posted this question two weeks ago: 2D platformer corner collision and I implemented NoobsArePeople2's solution. Problem is, when player intersects two rectangles that are inside each other, he starts jittering. I don't know how to describe it so I made a video: http://www.youtube.com/watch?v=2AYUGeuxM0c In the firs...
I have seen games like latest "2'5D" sonics that handle collision detection at platform corners pretty well. The problem I'm having is that my game uses an ellipsoid as my player's body to let it move on slopes, etc... But when it gets close to the end of a platform (which has a rectangular collider) the collision is n...
I'm developing a 2D game for the iOS platform. I have seen a lot of packages on asset store that makes 2D asset creation for unity easier. I have narrowed my selection to just 2, 2d toolkit and ex2d. I have to test them and see with fits my workflow better (if anyone has an useful opinion I'm all ears). But my main con...
Is the software design process for a game similar to a non-game? Do developers create UML diagrams? I ask because of the iterative nature of game development, I wonder if creating a UML diagram would just be a waste.
I've been embracing Test-Driven Development (TDD) recently and it's had wonderful impacts on my development output and the resiliency of my codebase. I would like to extend this approach to some of the rendering work that I do in OpenGL, but I've been unable to find any good approaches to this. I'll start with a concre...
I want to shoot a piece of tnt from the players face and then let it explode when it hits the target block. if (cmd.getName().equalsIgnoreCase("cannon")) { if(!perrmissionCheck(sender, "Needs.cannon", "cannon")){ return true; } if (!(sender instanceof Player)){ se...
While I am slowly learning how to build an android game, I would like to build images for a game, especially texture atlas. But the only image handling system I am familiar with is Photoshop. And I am not sure it is a good tool to organize images and to get coordinates for game dev. Is there any good tool for this pu...
I have written some code to preform 3D picking that for some reason dosn't work entirely correct! (Im using LWJGL just so you know.) I posted this at stackoverflow at first but after researching some more in to my problem i found this neat site and tought that you guys might be more qualified to answer this question. T...
I want to build a sprite based game using cocos2d. I will be mostly drawing everything in code. I also want to incorporate iPhone UI widgets such as buttons and such. Can these be created to appear on top of the cocos2d canvas? Will this affect the performance of what is drawn/animated?