instruction
stringlengths
33
29.4k
I'm learning C++, and I'm writing my first OpenGL program. Unfortunately, it seems to be defaulting to Software Rendering (CPU uses bounces, GPU uses stays at 1%). I'm using SDL as the Windowing system. I've got no idea why, but when there is significant scaling, the program grinds to a halt. My PC should be able to ha...
I am investigating Google App Engine for use in a browser based MMO. The player will make a server request when ever they build, buy or do any other action that the server needs to process. Therefore I am estimating a server request no faster than once per 10 seconds. I want to store all my player data in one data str...
Because SDL 1.3 is still a long way coming, I implemented native force feedback (rumble) support for Aquaria However, I could not find a way to find the corresponding event device (force feedback device) for any given joystick (gamepad) device. I looked in the SDL 1.3 source and I thought this might be how it is done: ...
Hey guys I am creating a game using Corona SDK and so coding it in Lua. So there are 2 separate functions, To translate the hit objects and change their color when they are tapped The link below is the code I am using to for the first function http://developer.anscamobile.com/sample-code/fishies Spawn objects that ...
I'm working on creating a multiplayer game, with the client in ActionScript and the server written in Java. I'm using XMLSocket in the client to connect to the server. The server code looks something like: ServerSocket server = new ServerSocket(port); while(true) { Socket client = server.accept(); ClientHandli...
I made simple puzzle game. I want to add a "Resume" option to it, so when user opens the game, he can pick up where he left off last time.
I just posted this question over at the the OGRE 3D forums, and I wanted to post it here as well. I'm a newbie here, just found that OGRE is an amazing engine for 3d programming. Using the Entity class it's easy to load a static model which was exported via some kind of 3ds max plugin. But I did't read the source-cod...
I am creating a kaleidoscopic effect on an android tablet. I am using the code below to rotate a slice of an image, but as you can see in the image when rotating a bitmap 60 degrees it distorts it quite a lot (red rectangles) – it is smudging the image! I have set dither and anti-alias flags but it does not help much. ...
See this paper: ftp://download.nvidia.com/developer/Papers/Mipmapping_Normal_Maps.pdf They describe the very simple implementation of an algorithm for antialiasing normal maps. I don't understand exactly how to look up an appropriate value in the lookup table they describe. A value is accessed with (N_a . N_a, N_a . H)...
I have started to design a game. I have weighed up the options of XNA, Unity, and Silverlight. I am going with Silverlight... Is there anything I important that I am missing that I need to know? EDIT I sketched the structural design yesterday: http://carnotaurus.tumblr.com/post/4921541502/old-school-game-to-be-written-...
I am getting error code GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT when creating framebuffer on Mac (using glCheckFramebufferStatus). I am using same code for rendering on Mac and iOS both. Maybe problem is in the buffers initialization. On iOS I am doing it this way: CAEAGLLayer* eaglLayer = (CAEAGLLayer*) super.layer; ...
I'm making a tile based game, and I'm working for support of tilesets. I'm trying to make it so that a Texture2D is set as a chosen PNG file. I can do this with no problem f I load the image into the content pipeline, but the level editor will be used by people without access to the content pipeline. How do I go about ...
I would like to split a large texture into a one dimensional array of smaller textures. How should I do this?
I have a Matrix of a player & I want to create a second location a set distance away from the first location but I want the second matrix to be set a set distance based on the rotation of the first matrix e.g. A player looking in a certain direction fires a gun, I want the bullet to start it's existence out side of the...
I am using the flash flixel engine, and have a sprite sheet of a spaceship from top-down view. The sprite sheet includes a bunch of different states and animation frames. Problem is that I have drawn them all facing upwards (north), and my maths is all done assuming the sprites face to the right (east). In flixel v2.5 ...
I’ve always wanted to create an old-fashionned 2D Role-Playing Game like Star Ocean, Final Fantasy, Sword of Mana and even the “Tales of” series, and I guess a lot of people do. But before even writing a single line of code I did a lot of research, drawing and tryouts. I've found almost all the answers to my questions ...
We are making a multipler first person shooter. The client sends it's position to the server at a fixed rate (currently at 10Hz). The server sends a single message contatining all player's positions to all players at the same rate (10Hz). As expected, the movement is pretty choppy since the 60fps game is only recieving...
I'm trying to implement pausing by following this tutorial. The tutorial recommends essentially this as the implementation: if (!paused) { Simulate(gameTime); } How does this work? What does Simulate mean here?
I've got an object in HLSL and I'm using hardware instancing to render multiple copies. But I've come a bit of a cropper when it comes to the vertex normals. Currently I am not using normal mapping (although planning to implement it soon), I'm just putting the normals inside the vertex structure. I can put the world ma...
I am trying to put 3Dish audio in a game I'm developing, and I'm unsure how to do positional sound. I want to be able to adjust the volume of the audio's channels depending on how far it is and the orientation.
I'm currently in a group that researches network optimizations and various distributed applications, I'm much more interested in games but more from a research side.Is there a resource that focuses on research topics specific to game development and what are some common areas of research? Note:I understand game develo...
I'm studying AI. My teacher gave us source code of a chess-like game and asked us to enhance it. My exercise is to improve the alpha/beta algorithm implementing in that game. The programmer already uses transposition tables, MTD(f) with alpha/beta+memory (MTD(f) is the best algorithm I know by far). So is there any bet...
In the next few weeks I will start a game for iOS, most of the action will happen in 2D but a 2D engine is not enough for our idea, therefore I'm doing a small research on available 3D engines for iOS written in Objective-C (we already looked on some engines written in C++). Do you know 3D engines written in Objectiv...
Right now, I'm planning a new FPS single-player Half-Life 2/Call of Duty: Black Ops/Crysis 2-like, and I'm trying to determine what game engine should I use. Right now, my team is me, as a programmer, and only one models/textures artist, so each model takes us a lot of time. I thought about: Source Engine - because i...
I was wondering if someone has read both the: iPhone 3D Programming And OpenGL ES 2.0 books and have an opinion if one is better than the other? I'm basically wanting to get into doing 3D graphics on iOS including shaders.
It seems that some games have managed to implement downsampled transparency, and presumably gained a significant performance boost. (Examples: Uncharted 2, Crysis 2) A while back I attempted to implement a form of this based off of an article in GPU Gems 3, but we found that it wasn't quite fast enough to be a win for ...
Does anyone know of a good WP7 accelerometer sample of a ball rolling around on a screen?
My current project, using Java and OpenGL, has a fairly standard overhead tilemap in the style of the Zelda games. I'd really like to add "real" grass to the grass tiles so that there are actually blades that can sway in the wind and maybe, if possible, react to the player's movement as well. I'm figuring that since th...
I'm having a problem with the way I designed my first simple game in C++. I have GameObject (abstract class) and ObjectA which inherits the update() and draw() methods from GameObject. My main loop contains a linked list of GameObject*, and while that list is not empty it cycles through it, calling update on each one. ...
In my previous question I have asked about an effect on how to visualize light spheres. The question resulted in a very nice formulated answer which described pretty well how to achieve this by adding some fog to the scene and using some factor to weight different light samples on the rays from the camera to the scene....
Which data structure should be best used to store a pile of tiles from which a player can pick a random tile?
I am not a 3d developer but i want to lean 3ds max just for simple house building with 2-3 rooms. Actually i don't want to develop from scratch . What i really want to do is get the existing models of homes , rooms , hotels from the internet and add my name there or my photo there , just for fun . SO i want to know tha...
I would like to implement free-running as popularized by Assassin's Creed, albeit in 2D. What are some specific techniques or algorithms that I can use to achieve free-running in 2D without having to reinvent everything? I tried to Google for resources, but couldn't really find any leads (no surprise there). Ideally, I...
General question. My company developed a custom software for simulating combat scenarios using the Unreal 3D Engine (2003). It currently runs on XP-based Dell system. Sometime in the Fall Dell is going to stop supplying XP systems. So we need to port it over to a Windows 7 environment. However, we expect to run into c...
Say I develop a game for mobile platform running OpenGL ES 2.0. I have done 2D part, and now I wish to import some 3D objects. The imported 3D objects must contain the following: Vertices positions Normals UVs Texturing information Animation information Collision mesh Maybe some other things... I am aware, that I cou...
The obvious part is drawing as periodic as possible, but hand-drawing is impossibly so perfect, so what kind of modifications are possible that do not make the textures loose their hand-drawn character?
I'm currently was working on a texture pack for minecraft (but this question is not restricted to that). All terrain textures are squared and stored in one big terrain.png. (FYI that's from Glimmar's Steampunk pack). I'd like to store each texture in an individual file and have same automated process pack them into the...
I am new to Cocos2D and I can't find the way to open the camera from the library. I want to open the camera in the my game, can any one help me with with this? Thank you in advance.
I'm a web developer who is trying to know more about game development. I've started trying to make Pong using canvas, just to see how far I can go (and what I can learn along the way). I have heard a lot about the game loop but being a novice was not sure how it applies to Pong. I figured it would be something like a s...
I'm writing a small 2d isometric engine in C++ and I'm trying to implement real time shadow casting. I followed a simple approach described on this page and here is the result (light is located at the same position than the yellow cube): The result is very nice but there are missing shadows on walls and on the top of ...
I am developing 2D game in java, and I want some basic in-game scripting (spawn enemy, spawn item, change enemies properties). What I don't know is, how to divide the game world, to easily work with it. I need enemies (have health, basic AI) of different types, item classes (can be picked by player), tile map with dif...
I'm trying to implement a basic scene graph in DirectX using C++. I am using a left child-right sibling binary tree to do this. I'm having trouble updating each node's world transformation relative to its parent (and its parent's parent etc.). I'm struggling to get it to work recursively, though I can get it to work l...
A friend and I want to try making an iPhone game, but we don't really have a budget to speak of. From what I've found, I need the iOS SDK, and that costs money. Is there really no way to make an iPhone game on a $0 budget? If not, can I do so for the Android?
The craftyjs javascript game engine is in the process of creating a game builder that will assist the developer in map design, sprites, animations and that kind of stuff. Are there any good resources on how a game builder should be crafted, both from an ease of use point of view(you need these features, and the world s...
I've recently come across GWT (Google Web Toolkit) and have been amazed by it. I was wondering if anyone has ever put it to use making a video game? And if they did, what their experience was, whether it was worth it and whether the game was any good.
I'm seriously thinking of building a space opera game which would share some of Machiavelli The Prince aspects regarding commerce: each player will be able to extract/build/buy/sell/donate a wide range of products (from ore to spaceships roughly). However, I'm struggling with the economy aspect of it. Should the game ...
I am in charge of a game development club at my school and I'd like to work on a project this summer that I could use as a tutorial next semester. I have never done anything quite like this so I was wondering if anyone had any guide lines or ideas. What I want to do basically is make a very simple game. Something like ...
I'm looking for a open-source 3D graphics and physics engine specialized in golf simulation. The preferred engine would be have short learning curve, supports Windows platform and Java or C++ and Lua/Python support for scripting, also prefer something like outdoor golf plane scene with weather system support, I'm new t...
I have a few hundred VBOs, and I want to only draw a subset of the VBOs each frame. Is there anything faster than binding and drawing each VBO? Is there a batched draw command for multiple VBOs? How do I bind multiple VBOs? Is there a version of glMultiDrawElements for sets of VBOs?
Basically, the title says it all. I've seen and worked with Django, Rails and a bit with Cake PHP. I'd like to know if there is a framework that is excellent for supporting casual, 2d, browser based game development. The closest that I've seen is flash, but I'd like to find something open source. Something that could h...
Hi I am developing a game in android just like Farmville by Zinga. In that game we have to place elements in the diamond shaped field so the don't overlap each other. Now I did coding for placing the field inside the farm field but I cannot stop the problem of overlapping of the farm field. I Am attaching the code that...
I'm trying to explore a little as to how I could make a simple 'dots and boxes' game. The problem I'm facing is in what way to store which lines are allocated by who. The problem lies in the fact that all inner lines are shared by neighbour boxes. So I can't just have four variables on each box because the right line o...
I am trying to automatically simulate the game experience in my programming game. I think Expect is the way to do it because it creates its own tty for the process, becoming independent process of the main process but I want that some key sequence is pressed down in some pattern, such as press the key Z down every minu...
I've been looking for a book that takes a bottom-up approach for graphics programming. So something that starts with 2d filtering, maybe moving into normal mapping, then ambient occlusion, etc. I ask because I've been lazy for the last few years in game development and always used an engine that handles this. I want to...
I'm trying to make a multiplayer game but am a newbie to server side programming except that I know a little PHP. I learnt about this technique called long polling where the server can wait for fresh data to be available and then send it. How does one do long polling using PHP? Are there any libraries available. I'm al...
I am playing a game on the 3G network using Android or Iphone. Suppose I am moving from one cell to another; Will the IP Address change? If yes, then how can I continue the same game while changing the base station, as my IP address is already registered in The game server? Is there something DHCP?
I'm having a problem when using ambient lights in my opengl game. When I first started with my program, i had a positioned light, and the code was this: GLfloat AmbientColor[] = {1.0f,1.0f,1.0f,1.0f}; glLightModelfv(GL_LIGHT_MODEL_AMBIENT,AmbientColor); ////////POSITIONED LIGHT GLfloat LightColor0[] = {0.9f...
I am developing a gaming control panel and that uses Rcon.jar to fetch data from gaming server. the code to use it written as below public static String rconExecute(String rcon, String command, int port, String ip) throws SocketTimeoutException{ String response = ""; try { response = Rcon.s...
How can I use an iPhone as a controller for a flash game, as described here?
I have joined a 3ds Max course. What are the diiferent part of 3ds Max which I need to learn? He was saying that he will teach me architecture. What are the divisions of 3ds max, so that I know which things to learn? Also, where do vray, mental ray, particle effects, and character modellings stand in 3ds max? Is archit...
EDIT This is the WebGL code for initializing the tetrahedron points. You may want to skip to the second code block, because you may be able to answer without this. //Making a tetrahedron with equal sides //Using rotation matrices to determine the points //-120 degrees var q = -Math.PI/2.0 * 4.0/3.0; ...
With board games like "Monopoly", "Domino", "Checkers", or "Chess", can game developers make clones and sell them? Also, can I make a clone of ZX Spectrum games? Are there many parts of the game with which can do the same?
Are there any videos on how to make a small game using Max? I mean is it only done in Max or are there other things used? I am a newbie in game programming.
After careful consideration to use middleware, I have decided on creating my own 3d file format format to export meshes from 3D authoring application (Softimage) into my game. I will need to export the following: Vertices Indices Normals UVs Material Information Animation information (no clue, how to import it) Collis...
Is it possible to mix 2D and 3D graphics in a single OpenGL ES 2.0 game, please? I have plenty of 2D graphics in my game. The 2D graphics is represented by two triangular polygons (making up a rectangle) with texture on them. I use orthographic matrix to render the whole scene. However, I need to add some 3D effects in...
I'm not sure if there's a better way to ask that, but I have a hovercraft which hovers by imparting force at each of four corners. I'd like to clamp the maximum variance between the thrusters so if one corner hovers over something higher altitude, the effect is less dramatic. For example, if I had 4-6-8-10, I might wa...
One of the maps I've played, nicknamed SotiS (DoTA in SC2) has the ability to maintain stats, which are sent back to their own server. Does anybody know how this is done?
Possible Duplicate: OpenGL ES 2.0: Mixing 2D with 3D The title probably is not that clear but please help me out here. I am going to write a (mostly) 2D game using OpenGL ES 2.0 so if I have a vertex at (5,10,1) I want it to be drawn at the (5,10) pixel on the screen. But I can't use orthogonal projection because I'...
I'm in the planning stage of a new project. Without going into details, this is a real-time 2D game with some basic construction aspects, combat, and a large procedurally generated world. Because of the design of the game, it really makes most sense for it to run directly in a browser with all of a player's progress st...
I'm developing a application in cocos2d using the Box2D framework, but unfortunately I am having issues. I'm not able to restrict the orange ball in the half screen area, taking the image below as reference, I don't want to allow the ball to go to the opposite part of the screen. I'm using the b2MouseJoint to move the ...
I'm developing a game at the moment and I had an idea where the game's story line would randomly generate as the player progressed and their actions would affect the story. Would this be a bad idea in terms of gameplay or would a storyline that has multiple endings be the best idea?
Hey, I'm creating my second game ever, but this time - using Java. Before I used Pascal and CRT module! =D It's 2D game where you need to drag the ball with mouse from location A to location B. Right now, I have ball on location A and I want to make it "alive". With that I mean that it will move from location A in 135°...
I am doing a very simple scene with a cube sliding on the "ground". Once the cube reach a wall, he is blocked. I want to detect the wall to make the cube go in the other direction. I used OnCollisionEnter but it is triggered at the scene start as my cube touch the ground. I could make a difference between grounds and w...
(apologies if this is phrased vaguely due to my lack of knowledge; I'm happy to change the question entirely if someone can suggest a more realistic query) I'm getting a grip on creating 3D characters in Lightwave, Maya, Blender, etc. My goal is to focus on creating creature & character animations specifically for game...
I want to start writing my game engine from scratch for learning purpose, what is the prerequisites and how to do that, what programming languages and things you recommend me? Also if you have good articles and books on that it will be great. Thanks in advance! My Programming languages and tools are: C/C++ is it good ...
I'm wondering if its possible to setup a fog to a player's coordinates (where there is fog around the player to make it more third-person) the main reason I ask this is because I have my player more towards the top right corner of the screen Here's some code that can give you a guide on what im doing: glEnable(GL_FOG) ...
I want to split a long png from my artist into vertical chunks that I can load into my code for a side scroller. Is there a tool that will help do that or do I have to do it manually?
Are there any good tutorials for someone who wants to create 2D graphical game assets? Drawing classes for absolute beginners, preferably teaching skills that can be as relevant as possible to games - drawing characters sideways/top-down, isometric, drawing textures and such.
Image of the problem: I used Microsoft's BasicEffect tutorial here and the code sample here and got everything to work fine. Next, I changed everything to use vertexPositionNormalTexture, added a few small methods to help with the texture, and was able to render a textured cube just fine. I also made the cube spin a b...
I have recently run into some trouble with my collision detection. My game is composed of a map made out of axis aligned squares. The player has an x and y velocity, and I want to know how I can find out with which side the player is colliding. So if they move left, I want to know that if they collide with a square, an...
The command line PVRTexTool works very well for getting textures into a PVR format, but I need a way of going the opposite directions. Does anyone know of a good command line tool (or GUI with a batch mode) that will convert a PowerVR texture to a more common image format (like JPEG or PNG?)
I would like to use a game engine with Visual Studio 2010 Ultimate. Flat Red Ball only seems to work with Visual Studio 2008 or express edition. You will receive "You can't add a reference to as it was not built against FlatRedBall.dll the silverlight runtime" when you try to add this reference to a Silverlight Naviga...
I am developing a card game in XNA. Is there any OnClick event in XNA for objects? I am trying to make cards move when the player clicks on them. In this project, there is a Sprite class that draws the card, but I am a little stuck because I don't know how to use OnClick events or anything like that.
I'm having some troubles coming up with a subject for my master's degree thesis. I'd like to know what areas of research are valuable at this time (and the near future) so I can narrow my search and idea-creation. Thanks in advance.
There is a square grid in which there are empty and filled blocks. A number of contiguous blocks form an object. My bot can find out the status of it's neighbouring 8 blocks (whether they are filled or not). It can move to a neighbouring position if there is no filled block over there. I have 2 questions First one : ...
Is there a way to shufle a group of sprites created with: pygame.sprite.Group() I have tried using random.shuffle but it apparently doesn't work on sprite groups.
I am a second year, learning C/C++ and Java. In our first year of university we did basic C++, no classes. This year we have been introduced to classes and inheritance. We have not yet done pointers, virtual functions, abstract classes, operator overloading, exception handling, linked lists, stacks, queues, binary tree...
I am just thinking about beginning game development in xna c#. However, I don't know (and no tutorial teaches) how do professional game developers create a 3D Model/Scene. How can we create a realistic looking model and what is the hardware configuration needed in machine for using such a software?
How would I go about creating a menu system with fonts in OpenGL? I want to make a dungeon crawler and will need a menu for inventory and stats for the weapons. I can draw a world made out of blocks ok but I'm not quite sure how to do this. I think I need to use the matrix that glortho applies to the matrix stack. Spec...
I am trying to learn how to use Shaders for a 2D XNA project I am working on. To test them out, I was trying to make a white triangle become colored using a super simple Pixel Shader, and I can't get it to work. This is my Pixel Shader: float4 ThePixelShader(float4 texCoord : TEXCOORD0) : COLOR0 { return(125,15,105...
I am creating a tetris game in C++ & SDL, and I'm trying to do it "good" by making it object-oriented and keeping scopes small. So far I have the following structure: A main with some lowlevel SDL set up and handling input A game class that keeps track of score and provides the interface for main (move block down, etc...
This is long, so the short question is: What's the best/right/standard set of technologies for creating 3D models and incorporating them into a game such that the complexity for the artist is kept to a minimum while also keeping things relatively sane for the game authors? The long story: I am a developer for an open s...
I have a sprite group created with pygame.sprite.Group() (and add sprites to it with the add method) How would I retrieve the nth sprite in this group? Code like this does not work: mygroup = pygame.sprite.Group(mysprite01) print mygroup[n].rect It returns the error: group object does not support indexing. For the mom...
Let's say I want to make a really simple artillery game, something like Gorillas. I don't have any experience in games, just some basic understanding of OpenGL. I want to do this for fun and to learn something. I figured out how to simulate gravity and generate simple terrain and how to do some collision detection. But...
I am learning 3ds max . I was just wodering if need to build a complete small village with small building , hotels , rooms , then do i need more advanced configuration . i mean how much minimum RAM will be required for to make the walk through of whole village I am new bie so i have no idea . i mean do everything has t...
I have two options to choose from: 3DS Max or Maya. I am not going into the commercial line. I need to get advice from users on which thing I should choose provided I am really not going in to character animation. I just want building, landscapes, moving objects, et cetera. I have to start, so I think its better to as...
I saw there are quite a number of articles and sample code regarding ball bouncing within a rectangle. Is there any articles or sample code regarding ball bouncing within a polygon? I try to look into Box2D demo, I can't find one yet.
I want to rotate all my GameObjects by 90 degrees. To do that I need to select all my GameObjects, how can I do so?
I've downloaded Microsoft Advertising SDK for WP7, added reference to Windows Phone Game project, and now when I'm trying to run the game I get this in Output: 'taskhost.exe' (Managed): Loaded 'mscorlib.dll' 'taskhost.exe' (Managed): Loaded 'System.Windows.RuntimeHost.dll' 'taskhost.exe' (Managed): Loaded 'System.dll' ...
I want to create a 2D map composed of small tiles, that should look like voxels (eg. this just from side). I think I can make a structure like Voxel2D, that have int X, Y and some Color, and every Voxel2D is going to be 5x5 pixels (so multiply X and Y by 5 when drawing). But now how should I store the whole map? In a ...