instruction
stringlengths
33
29.4k
I have a 2D platformer that currently can handle chunks with 100 by 100 tiles, with the chunk coordinates are stored as longs, so this is the only limit of maps (maxlong*maxlong). All entity positions etc etc are chunk relevant and so there is no limit there. The problem I'm having is how to store and access these chun...
I'm coding a little casual game in Java using Slick2D. This game use a lot of different "objects", managed in a composite way. So, firearms, furniture in the map, NPC and player character will be composites objects using components to define their behaviors. Since I'm going to need a lot of, for instance, "shotgun" ob...
Is there any list of game names anywhere, so i can choose a name for my game and avoid (legal) conflicts with other games as much as possible?
I'm working on a simple 3D game. In the game, sometimes the players have to roll die (a D8 to be exact). I wish to represent the rolling die with a 3D model, and I'd like to animate it in 3D space as if it was really rolled. Can anyone help me describe the way the die spins around in real life? PS: I'm working on this ...
I've got one little question: Is there any code or sample which shows how the simplex noise works? I cannot find anything about it... How should I implement it, without the knowledge how the algorithm works?... The other question is: Is the simplex noise a good algorithm for island generation? I need huge islands (real...
I have read a lot of interesting questions asking about XNA vs. OpenTK vs. SlimDX vs. OpenGL vs. DX, and while it is really useful to get others general impressions from 100s of hours using these various APIs/Frameworks, I haven't seen any answer which clearly defines what the scope of each is. It's understood what the...
So my environment is all set up and now I'm working on the movement physics of my character. I used blitting to copy over my tiles from a tilesheet. But since they are static, they are only copied over once. And with the Hero (main player character), I figured that I might blit him into his continuously changing positi...
So I've been toying around with creating a game in the XNA framework. A great place to start is simply being able to move and walk around. I kinda have looking around... I start off with the camera position/direction as follows: cameraDirection = Matrix.CreateLookAt(new Vector3(0, 0, 1.5f), new Vector3(0, 1, -1), Vecto...
I want to build a system based on the idea of Monster Rancher's monster generation system. First, is it legal per se? Obviously, I don't know how they built theirs and I will be generating my own "generator". But the idea itself of being able to randomly create a character or monster based on something..is it copyright...
I am trying to render some elements in my game. First, I render the textures (the textures of the textboxes themselves etc). Then I render the primitives (borders around controls etc). Then I render the text. However, by doing so, this gives a weird result in my user-interface when showing tooltips (by hovering over a ...
I am trying to use .X files (whoa.. huh? lol), but I found no good software for importing .X files then editing them then exporting them.. all this with animations, all this in text format (optional, but would be great), all this with having multiple meshes in one .X file. Found some good software to do the half of the...
i want to be able to loop through a hole bunch of textures, and render them on an object. I then want the rendered image to be placed onto a texture2D. The point? well hopefully i will end up with an array of Texture2D's containing a model with multiple skins. Here's my code: for (byte i = 1; i < allBlockIso.Co...
As a casual flash gamer, I see lots of "games" released that are ... terrible. And that's an overstatement. But I'm wondering, are these developers onto something? Is this a comparatively good source of income, considering how much time a quality game takes to make? I'd like to consider it from a developer's perspecti...
I'm pretty new to 3D development of any kind, nonetheless games. As I read through tutorials and examples, I find that the X/Y/Z coordinates seem a bit backwards than my first guess. I had imagined that if a person were walking around a field, their X/Y position would be changing and if they were to jump or walk up or ...
How can I rotate my view around a model? My model has a rotation. If this rotation changed, my view should also change. The camera should be behind the model everytime. Thank you very much!
Has anyone tried to develop, or know of an algorithm such as used in a typical turn based game like Advance Wars, where the number of objects and the number of moves per object may be too large to search through up to a reasonable depth like one would do in a game with a smaller search base like chess? There is some pa...
I'm developing a (scroll) game and i'm getting weird messages in LogCat: lock_layer() timed out but didn't appear to need to be locked and we recovered(..) lock_layer timed out (is the CPU pegged?)... executeScheduledBrodcasts() skipped, contention on the client. We'll try again later. it looks like the rendering tak...
How can i check/inspect the performance of my network game via Wireshark and specifically the Graphs available in Wireshark,i want to test the performance of my network game. which kind of graphs can be helpful and relevant and give me the idea of network performance of my game? i m really newbie to networking so i m ...
In lots of multiplayer games there is the option for LAN play. My question though is how does a client know where a server is on the LAN? The only ways I can think of Send out broadcasts over the broadcast address. This has the disadvantage of being filtered sometimes by routers or switches in different network enviro...
I created a button class which draw a button on the screen. When I click on it, I want to see something happening. In WinForm, I would simply use the event OnClick of the button. What about XNA? Should I add an OnClick event to my button class? Is that a good practice? Otherwise, how do you handle events in your game ...
I have created an object movement path in a 3D authoring application. Then, I exported the path (100 frames) into my custom text file in the form of Euler Angles. The next point was loading the animation into my game. To make it smoother, I performed linear interpolation between all the animation frames. Because of the...
I've been looking everywhere and all I can find are tutorials on writing the shaders. None of them showed me how to incorporate them into my scene. So essentially: Given an hlsl shader, if I were to have a function called drawTexturedQuad() and I wanted the shader to be applied to the result, how exactly could I do thi...
I hope you know GL Mathematics (GLM) because I've got a problem, I can not break: I have a set of Euler Angles and I need to perform smooth interpolation between them. The best way is converting them to Quaternions and applying SLERP alrogirthm. The issue I have is how to initialize glm::quaternion with Euler Angles, p...
UPDATE I think I solved this one, though any thoughts or suggestions are always welcome! This one is truly bizarre... I'm developing using both an iPhone 3GS and an iPad 2. This symptom is repeatable on the older iPhone hardware much more readily than on the iPad 2. Here's what happens: I start the game and the FPS ...
I am looking for articles on level design and particularly for techniques to imply a direction the player to go in, instead of another. Like which game mechanics can be used, how graphics, sound, etc. can influence the player to go where you want. For example in Donkey Kong Country bananas were used to show other paths...
Last night I showed my game to my friends and they said it was a bit jumpy. The example he gave was in the pokemon games when a battle starts music plays, the screen flashes then pixels out then the pokemon slide on from the side and the battle menu appears. In my game you are walking along and the all of a sudden you...
I wish to interpolate two quaternion values. As I still can not get working results, can I kindly ask you to verify my function calls? The code below supports GLM (OpenGL Mathemathics) library, so this questions might be for those, who know it. Firstly, I perform Quaternion intialization from Euler Angles: glm::quat my...
This is going to be a rather vague question xD In XNA is there a way of working out if a point or rectangle is colliding with a 3D .x object? It is a big model, and would take a long time to map out all the rectangles for collision detection so I was wondering if there was a easier way of doing it :)
I'm looking for a tutorial that starts at square 1 for game development and moves up through intermediate/expert levels of 3D game development. I really want to get into 3D game dev and I've been trying to for awhile in my free time, but I know so little at times that I'm not even sure what terminology to use in order ...
I'm making a 2D game with OpenGL. In order to avoid changing the state machine and binding at runtime, I want to make consolidate my textures into bigger textures, for example, taking 4 128x128 textures and making 1 big 512x512. I could then just render part of the texture rather than binding a new one. Is this a good ...
I'm looking into scripting languages to embed in my game. I've always assumed Lua was the best choice, but I've read some recent news about embedding V8 as was considering using it instead. My question is two fold: Does anyone with experience embedding v8 (or another javascript engine) recommend it? How does it com...
I've heard that UML is a great modelling language for software design. However, for software, such as game, that will certainly encounter major changes during the development, I doubt that UML will work effectively. What are the common ways or models that the game programmers used? and is there any recommended tools f...
I'm building a physics engine in OpenGL, and I'm a little bit confused on how framerate independence is achieved. At the moment I'm using glutTimerFunc to cap the framerate at 30 FPS. Is there a way to do this without capping it but not have my objects running around like crazy when I run the application at a higher fr...
I'm making a 2D street fighter-like game that is not tile based. Usually people recommend that entities be given to a renderer that render them, not them render themselves, but it seems the inverse is better, Why is one better over the other? Thanks
Right now I'm working on input for my game. The only controller I own is an XBOX 360 one. From what I can see, if a controller's stick has a Z axis, these are actually triggers. Essentially I'm wondering if from one controller to the next, will this be consistent?
My friend and I would like to program a 2D game. We were discussing about tools needed, so while I am working on the tools, he will work on game logic and stuff. Probably I will put our tools into the open source circuit once finished, so in your experience what kinds of tools are really needed, but don't already exist...
This is about a personal project I've been longing to do for some time now. Since a while now I have stopped playing WoW, but as I'm quite experienced in C++ I thought I'd try the following: Write a minimalistic server for vanilla WoW for experimental, personal purposes All it would feature is being able to login wit...
I am making a simple shooter game for Android where the player is a human and is being attacked by aliens. How would I make a laser beam, so that when the user touches the screen or presses the trackball the laser just fires in a straight line?
Background: I'm having a problem getting the jump curve correct for a retro platformer remake project of mine. The original game is for the NES, and the player's velocity is stored in two separate parts: one byte for the whole number and another for the fractional part. Gravity is added to the player's Y speed at a rat...
I am starting out learning XNA and its going smoothly. However I wonder if I am shooting myself in the foot by learning 3.1 not 4.0? I am also aware Microsoft obviously has a conflict on interest in the matter: the more times we update the more copies of Visual Studio they sell (I know express is free but some will go ...
Where in XNA 4.0 one can go: myVertexBuffer.VertexCount; What is the best way to count the number of vertices in 3.1 for a dynamic buffer (i.e. where I do not know the number of elements that could be therein). I have come up with: myVertexBuffer.SizeInBytes / VertexPositionNormalTexture.SizeInBytes Where my vertice...
Possible Duplicate: How to get PS3/Xbox 360 experience without having access to Dev kits? Is there a way to achieve programming experience with PS3 or Xbox360 systems without the development kit that only are selling to great videogame companies ? There are a lot of game companies that request experience with these ...
I'm using DirectX 9 and attempting to write a simple terrain generation object. I'm running into trouble with the rendering - I'm hoping that this is a common problem, and someone could spot the problem by the output: I've generated vertices, indices and I'm attempting to render a triangle strip (as it's supposed to b...
I'm looking at developing a puzzle game, it might be like tetris or something similar, perhaps more like bejewelled in that the player will select objects with the mouse to manipulate them. I've been studying java part-time in college for the past year, really beginner stuff, but I've decided to build a game over the ...
I'm wondering if it is possible to generate a dynamic spherical environment map using a single frame render using a pincushion curvilinear perspective projection matrix (phew, that's a mouthful)? I've been researching this for a few days now and the closest thing I can find is a curvilinear perspective but it isn't a c...
i just started programming a couple days ago. ive picked up on it pretty easy enough, but i still have a lot to learn. i was wondering if someone could help me out with making a system for random enemy encounters. with how many monsters appear and their stats.drop rates,enemy commands, etc. i have a program with a char...
My game will be made up of objects. Essentially the level editor will give me a bunch of objects to choose from and I can drag them in and thus a level is made. The objects could have animation in which case they are responsible for knowing which frame and layer they are on. So then I can have these: Animated non-mova...
I don't have any budget to buy commercial licenses but the libraries I use offer non-commercial free licenses. How far can I go in regard to monetizing my game without it being considered commercial ? Donations? Do ads count? Optional items purchase? For example, fmod states in their free license: This license cannot...
I come from a .NET background and I've done a few simple things in Silverlight. I'd love to adopt that and make my site and games Silverlight only; but I hear it has a fairly low install base. I know Flash has a much higher install base. I also know that everyone seems to say that HTML5 is the way things should be h...
I have a simple Tower Defense game using a tiled world. Creep and towers are on a tile at all times. How should I represent the position of creeps in code? (Do creeps know their current tile and position on said tile or are they aware of their absolute world position?) I'm basically looking for best practices, desig...
Possible Duplicate: How should I sort images in an isometric game so that they appear in the correct order? I'm starting work on a simple isometric engine. Everything thing is going great at the moment, but I think I've hit an issue everyone hits. I'm having difficulty getting sorting the depth of a cube. This image...
OK been googling nonstop for ages... My problem is, i need transparent models in my game. After a lot of annoying fiddling around with my code, i changed the blendstate to alphablend. This allowed me to start having transparency in my models. However now i face another problem. Any other part of the same model that is...
In cocos2d environment and box2D when an spherical object falls on a blunt slant obstacle, it moves really slowly, that's nauseating, if you have coded to not to have any interaction with world while object is in motion. Is there any way to get rid of this slow motion of object?
What is wrong with my vertex declaration below? I am using it with instancing. After adding TextureInformation to it, it renders weird and has an epileptical seizure. public struct VertexInstance : IVertexType { public Matrix World; public Color Color; public Vector3 TextureInformation; ...
I am attempting to create a server-centric RTS (as opposed to usual parallel synchronised simulation route of most RTS games today) - however I am still leveraging the discreet N-turns-ahead paradigm discussed by one of the AOE developers on Gamasutra. I have [possibly questionably?] decided that the path finding shoul...
for a first iteration of my sim, I need a very basic physics model for ship/submarine movement. I'd guess it might be a good approach to use vectors here (ship heading but also considering sea states etc.). Basic acceleration and that stuff should be taken into account I do not need any 3D stuff...the 'client' for that...
Recently I tried to compile and run the source code of Quake 3 engine. I basically followed this article. However it doesn't work for me. I am using Visual Studio 2010 on Windows 7, with June 2010 DirectX SDK (I doubt if it is necessary). Here is how I did: Install the original version of Quake 3 Arena to "D:\Quake II...
(Sorry about the bad title, it's the best I could come up with) I've been planning a gladiator manager game for a while now. Something similar to Blood Bowl (or Football Manager, only with fighting rather than kicking a ball), only with a much larger focus on the actual managerial aspects of running a team. I'm still f...
I want to know if it would be worth executing pathfinding on the GPU (using nVidia's CUDA, or an equivalent) in certain situations, or whether it would be a wasted effort. The situation I imagine would be a headless multiplayer server responsible for finding paths for bots. I'm specifically interested in A* pathfinding...
I just install Flash Player 11 and SDK 4.5 (hero), and test it with a small program. But I find it is still using "software" to simulate 3D API, and trace("driver info: " + _context3D.driverInfo); output driver info: Software I'm using windows 7, directX works properly, and option "-swf-version 13 -use-gpu" is alrea...
I'm starting up on OpenGL, and want to write a well structured and expandable, yet relatively simple 3D graphics engine for fun and personal knowledge. I'm looking for information concerning the best practices and design patterns related to this sort of code. Specifically, I'm having issues deciding how classes should ...
I've read a lot of forums about making 3D games in Java but I was unable to build a full picture of how it performs in video games. I know that it works smoothly for small and average size games, but what would happen if one tried to write Crysis 3 scale game on Java? What would become the bottleneck of rendering perfo...
We currently have a simple slot machine in our online virtual world game. You set the amount you want to bet (in virtual money) and pull the lever, and depending on the 3 figures (there's only one line) you get a reward, a free round, lose some more money, or most of the time, get nothing at all. You can instantly pull...
I'm looking for some ideas/algorithm name for alternative to distance fog. I'm playing around an "infinite" terrain engine. I can't draw the whole map because there are no borders and I don't like the idea of hiding the terrain at a distance with fog.
I want to build simple OpenGL application that mustily are GUI based to collect from user input and to the user can push buttons . now i saw allot of GUI frameworks that offer GUI to openGL . but none of then offer GUI that is seams to be part of the 3d/2d game the closed example i can think of is the old dos games...
How do you vibrate or cause a shake effect to a body of type static or dynamic or kinematic. I tried applying forces to a dynamic body in the timeStep, which did not work, as well I tried ApplyLinearImpulse many times a sec within the timeStep, which again did not give me the result. So right now Iam experimenting with...
i am learning 3d game development on android , i was wondering is it possible to add text areas or any thing that allows a user to enter a text in a 3d world ? and how ?
When I read about how to get the direction vector in raycasting, for example on this site: http://www.daimi.au.dk/~trier/?page_id=98 They first render the mesh with front face culling and then with back face culling. And then subtract the backface from the front to get at a direction vector for each pixel. But is this ...
Out of every format I know, the only one that works accross all applications perfectly is OBJ. I think it is an excellent format and I would use it for everything - except it does not support skinning. I am wondering, why the spec has never been extended to include support for skinning. It wouldn't require overhauling...
There are two slightly different scenarios I am interested in and I'l give you examples of each. The first is like the tournament system in Super Smash Brothers Melee, when there can be dozens of cpu vs cpu battles and it has to choose a winner. This could be done with a random number generator but I feel there is some...
I want to be able to create addons for any game, the example I will use is League of Legends. With addons I mean, for example when my level integer changes I want to play a sound in the background. The programming language I want to use is C#. What I want to know is how I'm able to read my level integer inside C#, fro...
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.
One of the struggles I've always had in game development is deciding how to implement experience points attributed to gaining a level. There doesn't seem to be a pattern to gaining a level in many of the games I've played, so I assume they have a static dictionary table which contains experience points vs. the level. ...
Is there any way that I can control in which order elements are drawn with instancing? Do all elements get drawn in the same order they are added to the instance buffer? Edit: What about the Z coordinate! Since I am drawing my GUI through this, I should be able to just put elements in front of others, right? I am not a...
I have been playing games like MW2 recently and, as a programmer, I tend to ask myself how do they make the game so immersive. For example, how to they simulate bullet speed. When an NPC fires a bullet from his gun, does the bullet really travel from his gun to the given target or do they they completely ignore this ...
Which kinds of culling and clipping does XNA do for me as default, and which kinds does it not? Z-culling? Backface culling? etc.
If I create pixel art files that need to be scaled up on the screen later, so that a single pixel becomes a box of 4 pixels. Should I create my pixel art with 2x2 pixels or should I create it with 1x1 pixels so that I can I 1:2 scale it later in XNA to 2x2 pixels? I tend to believe that 1:1 would result in too much det...
This was my original question: Populating Sprites I used the following code to spawn Enemy Sprites in my game. I have 2 types that I was using and it would display one then remove it and display the other. It did this repeatedly(Imagine someone playing with a light switch and you have what is happening with the NPCs. E...
This is something which has been bugging me. If I create a SoundEffectInstance via SoundEffect.CreateInstance() I'm meant to dispose of it when I'm finished with it. SoundEffect.CreateInstance() does not use ContentManager as far as i can tell. So does it load from file or does it keep a copy in memory? Loading from f...
I have game situation as shown in picture: Red dot: player Brown dot: obstacle ( rock, tree, etc) Grey: non visible area ( under fog of war) My question is: how can I draw that kind of shape, changed dynamically, with XNA 4.0. I can calculate each point of this shadow polygon. I would avoid drawing it pixel by pixel...
I play a lot of "Call of Duty", and can see tracers for gunfire, missiles, care packages falling from helicopters etc. There is a lot of activity. I am curious to know the algorithm one would use, at a high level, to manage all this action when you have 20 people on a map shooting each other to death. This question tou...
I have a ball that you can make jump, I have a sneaking suspicion I'm doing this wrong. It works now, to the extend that gravity pulls the object down toward the ground, but I'm having trouble manipulating the speed of the object. What this is, is a ball jumping and falling towards the ground. I have another function c...
I have a missile that is shot from a ship at an angle, the missile then turns towards the target in an arc with a given turn radius. How do I determine the point on the arc when I need to start turning so the missile is heading straight for the target? EDIT What I need to do before I launch the missiles is calculate an...
I'm working on my own quadtree for use in games for physics (collision detection to be exact) but am unable to move an object from one node to another node. What I'm doing is if some object is to be moved, I'm deleting it from its old position and adding a new object (with same property, such as width and height) to th...
I am looking to create a game. Starting with something simple, the "hello world" of gaming if you will. I think OpenGL will fit my goals. I want to start on a PC because its readily available to me. Eventually I would like to develop on the iPhone and since it uses openGL I feel this is a good translatable skillset. I ...
I'm writing a tool in C# that needs to open FBX files (and the XNA content pipeline isn't a suitable solution). I note that Autodesk only provides it's FBX SDK as a C++ class library. Before I write it myself I thought I'd ask if anyone knows of existing .NET bindings for this SDK?
Ludum Dare is great, except it's only 48-72 hours (depending on your flavour). Is there any particular (good) competition that gives you 1-2 weeks to develop? I don't usually get enough time to put significant effort in 2-3 days. Edit: I'm using .NET. It must be open to .NET (Silverlight, preferably) games.
Component-based entity systems are all the rage these days; everyone seems to agree they are the way to go, but no one really has a definitive implementation of such a system. I was wondering, what role do entity states (walking-left, standing, jumping, etc) have in a CBS? Do they act like controllers (i.e. they handle...
Alright, formulated this way I'm sure it sounds obscure, but I'll do my best to describe my problem. First, let me explain what's wrong with my real source code. I'm making a platformer, and here are the current components of my game: a Level, which is holding its own grid of tiles and also the tile sheets and a Tile, ...
I worked on a personal game project (learning) for about the last year or so off and on in Ogre3D. Now that I am starting a new project, I want to avoid the Class Heirarchy for objects and having all of my libraries stuffed into one project file. After a massive amount of reading, I am going to start implementing a Obj...
Disclaimer: I know that client-side is always to be held with suspicion, but I'm trying to conceive of a way to verify the success or failure of javascript-based mini-games. Mini-games to add fun to client-side game Here is an example scenario: I implement a javascript-dependent picture-sliding game for various picture...
I have been reading about BDD - Behavior Driven Development for a while, and I find it really easy and usefull to convert features into code. BDD users often call it TDD done right. BDD is a tool for software design, from outside to inside, from the bussiness value (or gameplay value) to code. Dan North introducing BDD...
I'm creating a six player HTML 5 game designed to be played locally (Red Ice). I've previous set up handling 7 Wiimotes using something along the lines of Joy2Key to map each input for each player to a separate keyboard key, but Wiimotes are pretty hard on the hands for these types of games and not very ergonomic so I...
I would like to any tips/articles/tutorials on how to write collision detection using OpenGL and C++ in 3D mainly just simple box collisions etc but also if there are any advanced resources that would be great to. i also don't wont to use any external library`s if possible. thanks
I downloaded a 3d model of a car. By judging by the skins and images available model treats wheels and car body as separate nodes. I want to access its child nodes (wheels) to specify animation. But I don't know the names of its child nodes. Is it possible to figure out names of its child nodes by looking at the file c...
Possible Duplicate: What math should all game programmers know? Obviously a good knowledge of maths is essential for good programming, my maths isn’t the best ( I didn’t pay attention in school all those years ago) so, in order to get one step closer to being the best I need some advice. What maths should I learn fo...
XNA seems to be ignoring my Z coordinate. There is no form of Z-culling at all it seems. How come? I am doing an orthographic projection, and clearing the depth stencil buffer for every draw-call. My elements rendered are quads with textures, through instancing. These elements have 1 difference in the Z-coordinate in o...
I'm currently using Box2D and my character is a bunch of fixtures in Box2D. I was wondering if, to determine if a player is falling, detecting a change in Y position would be appropriate? Are there maybe other ways that I'm not thinking of? How is this sort of thing usually detected?
I have a procedural approach to the game loop that runs various classes. it looks like this: continue any in progress animations check for used input apply AI move things resolve events such as collisions draw it all to screen I have seen a lot of posts about how drawing should be running separately as fast as it...
I have this "Breakeout style" game. I have a cannon at the center, blocks around the cannon and pads around the blocks. This is how the game looks like: I've managed to get the collision per pixel and my ball "reflects" on contact with the blocks with the following math: Ball.Direction = 2 * (Block.Direction - Ball.Di...