instruction
stringlengths
33
29.4k
I have begun creating a very simple game engine and I am trying to work out how to create a time scale for the game. By time scale I mean some way of increasing and decreasing the speed of the game (not the fps) like creating a slow motion effect. I have no idea how this could be accomplished so any help would be appre...
The essence of this question is basically this: consider a strategy, RTS or a tower defence game, where you have the choice to build a new unit or to upgrade an existing one. The upgraded unit is definitely worth more than a non-upgraded one, but by how much? In designing a upgrade path, how do I design it such that U...
I want to develop a 3D multiplayer game for android , what is the best game engine , what is the best software to create 3d objects to import them to android ? Thank you .
In all of the code samples that I have looked at, the game loop looks something like this: while(true) { InputAndUpdate(); Draw(); SwapBuffers(); } However doesn't this destroy parallelism between the CPU and the GPU? After the swap buffers call, the GPU will be sitting there idly while the CPU is handling i...
I've got a camera that places the character about a 1/4 way into the screen. The problem I'm having is that when the character moves left the character stays in place now placing the character 3/4 the way into the screen. I tried rectifying the issue with the following code. public Vector2 Position = Vector2.Zero; ...
When I am working with cocos2d I can add CCSprites to the layer or 'stage' and manipulate them. Now, to do my ongoing calculations for movement AI and such, things that will always run, should I: subclass CCSprites and add methods to manipulate themselves and run schedules? -OR- create a controller class that 'owns' al...
I'm looking for book or a guide that will direct me to 3D modelling/animation for gaming. Most tutorials will go for lengths about things I don't really need for games and I want to get to the chops of making assets for my games -- like many developers have said: the best way to get experience is finish a game! So ...
In the past, I've used Visual Studio with the DirectX XNA math library. Now, I'm using the GNU compiler collection. Can anyone advise a SIMD math library with a good documentation?
I can wrap my head around using a 2d perlin noise function to generate the height value but I don't understand why a 3d perlin noise function would be used. In Notch's blog, http://notch.tumblr.com/post/3746989361/terrain-generation-part-1, he mentioned using a 3d perlin noise function for the terrain generation on Min...
I'm currently building a small 2D game in Processing (and it has to be Processing) for a school project. The basic makeup of the game is 4 different cells (objects, all are circles): An avatar, controlled by the player, a number of cowardly cells fleeing from all other cells, huntercells hunting and attempting to eat e...
When building a game server intended to accomodate large numbers of simultanous games (e.g. table card games), where the server manages lots of tables and each table has up to a small handful of users, what metrics are most useful to collect and why?
I have a scene with lots of houses and other objects. These objects will be bombarded from the sky. How to handle these kind of settings having in mind that you want the physics to be as realistic as possible. In Unity3D, if I set all the objects with isKinematic=true and on collision I set it to false, then the physic...
I would like to create some level of abstraction above math in my code. I mean I don't want to be dependant on the implementation of math operations or even on class names, which are provided by some math library. I will show you a simple example. Let's assume that we have 2 math libraries. Let's consider 3D-vector cla...
I am making a tower defense game in Flash and I have a slow tower that is built directly on the path. I have it setup to use a hitTestObject function. The tower is in its own class and the enemies are in their own class. In the update function for the tower, it has if (this.hitTestObject(enemy)) { enemy.slow = tru...
The Android documentation says: There are situations where the EGL rendering context will be lost. This typically happens when device wakes up after going to sleep. When the EGL context is lost, all OpenGL resources (such as textures) that are associated with that context will be automatically deleted. I...
I'm currently a (happily employed) automated software tester that's curious about game testing/QA. Do game companies hire dedicated testers for pay? If yes, then what are the job prospects like? If no, then how does becoming a game tester work (volunteers? mixed roles? crowdsourcing?). Obviously game companies have ful...
I am currently working on a 2d puzzle game in the unity engine. One of the aspect of this game is the possibility to rotate the level of 90°. It also rotate the gravity. The main character is not directly controlled by the player, but instead falls when the level is rotated. When the main character hits a wall, he shou...
I am currently contributing to a particle system for our game and developing some emitter shapes. My uniform random distribution along a line or along a rectangular area works fine - no problem. But now I would like to have something like a 1 dimensional gradient in this distribution. This would mean for example lower ...
I want to make a plane shape (surface) that have a gaussian blur applied to it and this plane is transperant, so all objects behind it looks like they are having a gaussian blur effect.
Sorry for the strange topic name, couldn´t think of a good way to describe it. I´m basically trying to achieve the following: I'm placing items randomly on the screen, but these items shouldn't be placed near eachother at a given distance. This is the process I have in my head right now: generate a random location ch...
I was designing games in unity with some friends but none of us have a mac so none of us can download the apple sdk. To use the sdk, we will have to run a virtual machine with osx on it. Virtualization is disabled on most PCs by default and I was wondering if there was any way to change that without rebooting into th...
I'm making an online game, and I had been using a blank square as the character until recently. Now I want to add a real, animated character. I downloaded a free sprite sheet which has 12 (3x4) character sprites. What is the general method to animate the character? I see why having all the character animations in one f...
I'm working on a 2D platformer side scroller game. I am giving high impulse to player, the player starts moving and if it hits a slope on terrain, it gets a vertical movement and starts to fly over (Box2D physics). What I need is that the player should always be on the terrain and move along the ground. I would like t...
I have been attempting to make a game engine in C++ and have come across the dilemma of game state management. I have done a lot of research and found numerous ways of accomplishing from game engine with derived classes to using enums and I would like to know the most effective/efficient way of managing game states. ED...
Edit: To sum the question up, I have a voxel based world (Minecraft style (Thanks Communist Duck)) which is suffering from poor performance. I am not positive on the source but would like any possible advice on how to get rid of it. I am working on a project where a world consists of a large quantity of cubes (I would ...
In my tower defense game and every tile has its own mouse event listener. I am wondering, would it be better to use one event listener (MouseEvent.CLICK) and then when it runs the function, should I just use evt.target to determine what was clicked, and then run an appropriate function? I am programming the game for we...
I draw some text on screen using ID3DXFont::DrawText. This text should be displayed the same regardless of screen resolution. For example, if screen resolution is low, text wrapped and when it is higher text is not wrapped. How can I avoid such situation? I want text size to be connected to screen resolution so if res...
I'm wondering if there is a simple way to convert 3D coordinates to 2D coordinates. Also, if it's possible, to convert in the reverse direction. I'm using OpenGL(GLUT) in my C++ project. I am also using SFML for the 2D information (sprites text etc.) I found out that I can use gluProject(), but I have no idea how to us...
This is related to MMO Performance except that question is about bandwidth. This is about cpu load. I put together a simple FPS using node.js and webGL. It's extremely simple, a lot like the BuddyMaze clone of MIDI Maze. There's very little going on, everyone moves in two dimensions (no height), shoots simple projectil...
i have fair experience with java game programming, i already made a simple mario game (side-Scrolling) i'm wondering how can i make a "Java" Game like that http://www.youtube.com/watch?v=utwtXEYW1L0 or that http://www.youtube.com/watch?v=uqz4dunlhX4 the main problem is that i don't know how to make a 2D game looks l...
What contributed to the decline of sales of 3D platformers over the past decade? (Other than Microsoft's acquisition of Rareware.) Would it be a mistake for a developer other than Nintendo (or indie developer) to start working on one in 2011?
I'm not really a graphics programmer, but I used to toy around with Truevision3D 6.5 a few years ago. It wasn't too bad, but TV3D was just going nowhere so my foray into 3d game dev ended there. I know nothing of XNA. I think it's time to get up to date. My goal is to be able to render chunks of terrain from heightmaps...
Getting started on a 2d platforming project in java. I've decided on using LWJGL and OpenGL, but I don't quite know where to start. What is typically the first thing one would work on with a platforming game? I've never done any game development before, but I'm hoping this will be good practice and hopefully fun to imp...
I'm just wondering what XNA is missing, to be considered as a game engine. It does all the things a game engine should do (except the physics part); it also has support for every aspect defined in the Wikipedia article on game engines. Why is XNA not considered a game engine?
I'm going to write browser online game, not MMO, but something like a lot of Flash game. But with OpenGL rendering, because Flash is using CPU for rendering. What are advantages of pure Java or c++ with Java that only create window. My requirements are: good performance - low overhead when calling OpenGL functions sho...
I have a 2D side scroller whose levels are stored as vectors (that is, a bunch of lines) which looks like this: How would I detect that I'm colliding with one of these lines, and react accordingly (say, slide down the slope, or stand still on a flat platform)? We can assume the player uses an AABB.
There are many optimization tricks that you can apply to your C++ code that can help speed up your program, and there are more game-related tweaks poping out every day. For example, I've just heard where you are trying to draw some meshes with same texture it's faster to draw them all in one call (or something like tha...
When working with any mesh, you get an XYZ point somewhere on it. If you just want to move the mesh in any direction, it doesn't matter where this point is located. However, I want to rotate a door. This requires the point of rotation to be very specific. I can't find anywhere how to change the location of the point. C...
I'm currently working on a c# online multiplayer game in real-time. The aim is to have client/server based connection using the UDP protocol. So far I've used UDP for players' movements and TCP for events (a player shooting, a player losing life) because I need to be sure such data will arrive to all players connected ...
For a psychology research project we're looking for short (ca. 5 minute) single-player games to observe people's basic motivation. We would like to ask people to list games that provide the closest possible (even if not perfect) fit to each description. We need 2-3 promising candidates for each of the following 3 categ...
I have an almost unmodified copy of the bloom sample in my project. I pass it a texture to apply the bloom post process on. The only modification is that, instead of calling BeginDraw() (to set a render target) in the bloom sample and then doing all of my drawing, I simply do all of my drawing to a rendertarget outside...
I am not sure if I will be able to provide enough information for someone to answer this question, but any ideas might help. I am creating a tower defense game in Flash and I eventually want to make it run on Android. Just for testing purposes, I have been running it on Android's browser and different Android .swf play...
Setting the Perspective projection matrix in Open GL (including OpenGL ES 2.0) has the following general format: glm::mat4 perspective(float fovy, float aspect, float zNear, float zFar); Notice the last two parameters; First one specifies zNear plane, which is the plane closer to the camera. The second one specifies z...
Does it makes sense to apply perspective projection, in a 2D game? What will be the cost for doing so, and does it overweigh the benefits gained from the 3rd dimension? Perspective projection has features that could be used in 2D games. Two very beneficial characteristics that come to my mind are: Using perspective ...
Are there frameworks and processes for HTMl5 that can be used for the rapid prototyping of 2D games?
I've been wondering about this issue for a while. How to find the bottleneck of the graphical pipeline. Recently I've been using a program to draw massive amount of polygons in a simple scene with alpha blending (AKA grass scene). I've used two programs, one uses static coordinates and another uses rotation and transla...
I am using Java with JOGL to create OpenGL enhanced 2D graphics. The graphics operations I use are nothing fancy, and should be supported by almost any recent graphics card. For example, my game runs great on a Netbook. I was hoping the game would run on most computers. It runs fine on my own computers. However, I ...
I'm creating a game which uses 320x160 sized isometric tiles. I've got an editor that allows me to take loaded in tiles and plot them. The map size is 8x8, and instead of placing down 64 movieclips, and then moving them around, I thought I'd use the bitmapData.draw function to plot these mc's directly to a bitmap (as I...
I'm trying to find useful information on creating game levels in a reasonably efficient way. Additionally, information in setting up a fairly painless way to edit this information would be handy (the closest I've come is some monstrosity in Flash; I would place the parts onto the stage, and run a script reading all the...
What is the best pattern to create a system that all the objects positions to be interpolated between two update states? The update will always run at the same frequency, but I want to be able to render at any FPS. So the rendering will be as smooth as possible no matter the frames per second, whether its lower, or hig...
The following is the OpenGL ES 2.0 simple GLSL Fragment Shader, I use to place textures on polygons, to render 2D sprites. varying mediump vec2 TextureCoordOut; uniform sampler2D Sampler; void main() { gl_FragColor = texture2D(Sampler, TextureCoordOut); //gl_FragColor = vec4(texture2D(Sampler, TextureCoordOut).xyz, Te...
Been having a difficult time transforming 2D screen coordinates to 3D isometric space. This is the situation where I am working in 3D but I have an orthographic camera. Then my camera is positioned at (100, 200, 100), Where the xz plane is flat and y is up and down. I've been able to get a sort of working solution, but...
What is the actual term for the 'top-down' style of the Super Nintendo games such as Final Fantasy 6, Chrono Trigger, et cetera. I'm looking for the equivalent term of: 'isometric' - (Jaggered Alliance, Final Fantasy Tactics, Fallout), 'first person' - (Half Life, Doom, Quake), 'birds eye' - (Grand Theft Auto) ? ins...
I am working on a terrain in XNA/C#. My intention is to be able to render multiple textures on the ground across the terrain. However, all tutorials like this are only capable of doing it with about 3-4 textures. My idea is currently that I create a texture map in TGA that has different colors (RGBA) where each color r...
I have a little problem in my solution, i'm trying to make a pretty big map for the players to walk around in. I decided to use a tile-engine, but when I move my character it moves faster than my tile-engine draws the ground so I end up catching up to the edge. It's quite hard to explain so I've added the solution at t...
I am building a gaming system where many players can play together some sort of table game. There could be hundreds of game tables at the same time. The system consists of several components where main components are gaming servers and DBworker and in between there is rabbitMQ. DBWorker is something that takes care abo...
I'm currently working on a 2D game engine in XNA, and I am very interested in architecture, and how best to let my game objects communicate. I know a lot of people use a Singleton design but I believe that this is more of a "counter-architecture" way of doing things, as every class will have access to the Singleton. I ...
When designing a networked multiplayer-game where one player hosts and others connect, there are two strategies I'm aware of: Have the host-player's game be the authority, with all other players as dumb-clients trying to catch up with the current game-state. In the code, there will have to be lots of special cases, d...
Foreword: I am posting this on answers.onstartups and gamedev.stackexchange because the expertise from each area will likely contribute useful information. Also, I saw similar questions to this, but I still want advice. So I'll change this question to: where should I go from here? What's the next step? So this morning ...
In Cocos2D for iPhone, I want the latest touch event to interrupt another and ignore the last touch. Let me know if I need to elaborate more, but basically my game consists of a lot of finger dragging, and if the player ever switched fingers, there may be some overlap, and for the way things are setup, it may detect it...
I'm working on a little game that uses Irrlicht. I'm pretty new to Irrlicht and I was wondering how I could enable multisampling. The device driver is EDT_OPENGL initiated as such: IrrlichtDevice *device = createDevice(video::EDT_OPENGL, core::dimension2d<u32>(800, 700), ...
At this point the platform and programming language don't matter I would just like to know if something out there exists for this. Any help is appreciated.
Alright so i'm making a vertical side scroller where you are an '8' character traveling downward while avoiding my randomly generated walls (the "generation" function) on the left and right sides of the screen, and made of 'X's. you can collide with this wall 4 times before losing. When you collide with the wall you c...
I've just about started with a project I've had in mind for ages. I don't quite know how to start such big projects (bigger than Pong, anyway), so I thought I would get started by making a basic organization. Now, in games like Freelancer and X feature large, open spaces. I ma aware that these have to be organised, to ...
I know this isn't a "Is this legal" website, but because Marching Cubes is definitely a large subject in game development, and isn't really about a specific graphic/item, it would pass... To the point! Does anyone know whether Marching Cubes is allowed in a commercial game? If so is there anything i must do? Credit to ...
I'm having some problems porting my D3D code to OpenGL ES. I have a Graphics Device class that encapsulates all rendering commands. The code below is in an ObjC++ file. The problem code is the called to get the render buffer width and height. It doesn't actually return any value in the w or h GLints. It should be noted...
What do you suggest would be the best algorithm for a tower-defense game? It's a 2D based tile game, where there is walls and towers blocking the way, between spawnpoints and their destination points. Constantly, as the player places a new tower to block the way, or to help shoot spawning units before they reach their ...
I am looking for a simple casual game (open source) done in openGL. I need it to implement communication component i build this is not for learning opengl and to implement some other stuff into it. Where can I find one? (I am using C++) Thanks
What is the fastest way to get all adjacent tiles in a two-dimensional array of tiles, converted into a single-dimensional array? If you don't know the answer, then the fastest way to do it in a two-dimensional array would be fine as well. I tried the following, but it does 9 calculations, which is 1 too much when it c...
I am looking for a starting place to develop a crossplatform OpenGL game that runs on Mac, PC and potentially Linux. The difficulty is that I don't want to use an existing graphics library. I've done a lot of work with OpenGL in C++ for Windows. I have never developed anything for Mac. I plan to develop most of the ...
I'm trying to write some collision detection code. ATM i have the code properly resolving Ellipsoid v. Ellipsoid collisions, and Box v. Box collisions, but Ellipsoid v. Box collisions doesnt work. In general how do you test for interesection between these two. What i've been doing is: Finding the closest point on the ...
I've been developing a first person shooter/massive multiplayer online roleplaying game for my small business, and was wondering if it would be feasible to use peer-to-peer technology to communicate between players, without the use of an intermediary server (as our company does not have enough funds for a high-speed co...
Where's a good place to post to find a decent game artist to create a small number of 32-bit sprites? This is for an internal code war framework so it's minimal work - maybe a couple of hours. Any suggestions where I should post to find someone to do this?
I am writing a 2D game engine for fun. I am able to perform animation using the engine. However, if I change the frame rate (frames per second) the speed of the animation changes. I have never used any game engine. I want to know whether other game engines handle this issue or not. If not, what is the ideal frame rate ...
In XNA I am building my own textbox, and listbox. For the textbox, I want it to render all text it can, and then cut off at the end of the textbox. But I don't want it to cut whole letters. I want it to cut exactly where the pixel limit is, so that if I write "SPAAAAAAAACE", and the size is 50 for instance, then it wil...
When making an npc combatant, it's easy obvious what to do to get a robot deathmachine by optimizing combat tactics, timing and attack types, but harder (and more interesting in a fight) to get an idiosyncratic, inpredictable enemy. What behaviors (algorithms?) are useful for creating a more organic, unconventional en...
I've been working on a tile based game with a 2d array as fundamental ground for my tiles. Now my next step is to have the wall tiles be impenetrable, so that the player can walk ontop of them and collide against their sides/bottom. So as this is loosely based on tonyPa tutorial, it uses the corners of the player chara...
Did the first generation Pokemon games for gameboy poll for the d-pad state or was the input state done based on events? I'm currently trying to implement a similar control and I'm interested in comparing my input with that of the gameboy and Pokemon. I'm using SneakyInput and cocos2d.
I've been using the skinned sample from XNA tutorials to understand and play FBX files animation. While the animation in all my tests runs correctly, I fail to understand the technic to calculate time versus keyframes. Most of the models I found so far for free and testing purpose on google store all animations into on...
I need to know how to get the closest point on the surface of an ellipsoid to another point. I had an idea, but apparently i was wrong, and oversimplfying. What i did was squash the ellipsoid and point into local space, so the ellispoid is a unit circle vector3 pointLocalCoord = ( pointOriginal - ellipsoid.origin ) / e...
Short Version: I am trying to move a player around on a tilemap, keeping it centered on its tile, while smoothly controlling it with SneakyInput virtual Joystick. My movement is jumpy and hard to control. What's a good way to implement this? Long Version: I'm trying to get a tilemap based RPG "layer" working on top o...
I have a 3d moving box and a stationary box. I can detect collisions ok but now I would like to slide the moving box against the stationary box as a collision response. For this I need the normal of the face that collides with the moving box. Does anyone know how I figure this out? It doesn't seem like the collisio...
How can I check/inspect the performance of some network application via observing the port it used, I want to test the performance of my network game. If my game is using port 1009, how can I check the different parameters, like data outflow, inflow and other metrics on this port?
So I'm starting work on a multi-player space shooter. And I've run into some issues. As I type this, my system is currently: //Main While Loop Gather Input Update Own Sprites Based on Input Send Position Information to Server. [Owner,Obj#,Image,X,Y,Theta] (TCP) Receive All Position Information for All Objects From Serv...
I am fairly new to openGL( 3 months ) and am asking for assistance in understanding the fundamentals behind gluLookAt(). Currently I have spent most of my time with openGL modeling scenes with fixed views, and I wanted to begin using gluLookAt combined with keyboard and mouse callbacks to "explore" my scenes. I create...
I'm looking for how to make 3D gauge on Windows Phone 7, that's mean a 3D object (a watch for example) with a basic 2D texture (= Numbers of my watch) and a rotating 2D texture (=neddle of my watch). The shaders can't be used for this (WP7 !!). I did not find anything on this (books or internet). There are 2 big proble...
I've seen people who've written in code where the graphics of a scene are rendered in response to WM_PAINT. I only ever rendered the scene once all Windows messages were done translating, and then rendered the scene. Is this the wrong way to go about it, or should I only use DirectX rendering in response to WM_PAINT?
I am having an issue with XNA, where I want to execute some code in my Update method, but only at a given interval, and only once. I would like to avoid booleans to check if I've already called it once, if possible. My code is here: if ((gameTime.TotalGameTime.TotalMilliseconds % 500) == 0) { Caret.Visi...
I'm working on my first simple game for release. I'm going to have it to a point of being playable, interface complete, but very few if any graphics, and no overall style aside from the basic Android white text on black. Should I go ahead and release this game, with a graphics upgrade to come in the next week or two, o...
In my game, does my player object control the movement, or does the map object control it? (Or some other object?) The player doesn't know about the map's contents to stop at solids, interact with objects etc. Am I doing it wrong? I'm currently dispatching data from a virtual joypad. EDIT: What if I dispatched movemen...
I've got a Windows API Window. I've managed to make it windowed, and "fullscreen windowed". But I can't seem to make the window just full-screen- for example, even if I specify WS_POPUP, I can still freely move the cursor to my second screen. However, if I launch full-screen games, they don't permit it, and exist only ...
I want to test my Client/Server game for which, currently, I am using localhost for both Client and Server. Obviously I'm not getting any fluctuation in data and measure idea of performance, and in other parameters, what I wanted to ask how I would test a real world scenario: if i create a little network with two compu...
Right now im working on my c++ game, and im having alot of trouble using GLM and Bullet Physics to create my world correctly. The main problem is that when i export my physics with Blenderv2.57, and export my models for GLM, the models never line up with the physics correctly... Im wondering if there are any model load...
Got a very simple existing project, that basically contains a lot of cubes. Now I am wanting to add a physics system to it and JiglibX seemed like the simplest one with some tutorials out there. My main problem is that the physics don't seem to be working how I imagined, I expected my tower of cubes to come crashing do...
I found Minecraft's marvelous large worlds extremely slow to navigate, even with a quad core and meaty graphics card. I assume Minecraft's slowness comes from: Java, as spatial partitioning and memory management are faster in native C++. Weak world partitioning. I could be wrong on both assumptions. However, this got...
I've recently started reading about VBOs. If, for example, I want to draw a cube using VBOs, can I use one VBO to hold the coordinates for the 8 vertices, and another one as an index array, to specify the order in which the vertices are drawn? If it's possible I'd appreciate some help on the matter, or a link to good ...
I've been working on a 2d RPG for awhile now, and I've come to realize I've made some bad design decisions. Theres a few things in particular that are causing me problems, so I was wondering what sort of designs other people used to overcome them, or would use. For a little background, I started working on it in my fr...
Let's say I have a large number of conceptual objects of some kind, each of which occupies a pre-known set of points in a Cartesian 3-space. 1) What is the best combination of data structure (for modeling these objects, their occupied points, and/or the enclosing space) and algorithm for the purpose of being able to re...
In my Maxscript exporter I have the ability to flip the Z/Y axis by simply swapping the Z and Y co-ordinates. When swapping the axis this way, what is the correct thing to do to the UV coordinates? (e.g. do I need to swap the U or V, or invert one or both?) Thanks!
I'm making hack&slash game and I want my characters move like for example in Torchlight, Diablo, etc. Currently I generate set of nodes for all walkable areas of a floor. When I click somewhere player goes there through interpolated path of nodes. This doesn't look very natural. Player moves like a robot. Enemies also ...