instruction
stringlengths
33
29.4k
I like the sgs/projectdarkstar or now known as reddwarf server for a back end game server. However I am looking for a good front end, preferably 2D. I was thinking of something such as flixel. I know there is an AS3 library available for reddwarf, so I am hoping someone already has connected up flixel or a similar e...
I've been thinking a lot about the best way to store and load assets in your filesystem. By this I mean where in the file system to store them, and how to retrieve them when loading etc., as opposed to how their stored when the program is actually running. I would imagine that this would be a fairly common question, ...
How does one create a Texture2D Array in DirectX11? The texture I am trying to create is not multisampled, and I want only one mip level. I can't find a working example of a Texture2D Array. I have a buffer of 2D images that I want to use as a Texture2DArray in a shader. The following code snippet works when sTexDesc.A...
I'm totally new to OpenGL and I'm working on a Sandbox game called CubeRealm. My problem you see is rotation. I've got it in my head that to rotate the 'camera' I just rotate all the scene by the negative value of the camera's rotational values. However so far it seems to not be working. Here's the code snippets: glPus...
The title is fairly self-explanatory. I have a 2D racing game that utilizes per-pixel collision detection (the track is essentially two bitmaps, one for the graphics, one for collision data). The problem I'm running into is that I can't figure out how to implement the collision response. I can figure this out for situa...
Most of the posts on fixed time steps say something like this: State previous; State current; while ( !quit ) { double newTime = time(); double frameTime = newTime - currentTime; if ( frameTime > 0.25 ) frameTime = 0.25; // note: max frame time to avoid spiral of death currentTime = new...
I started using a RenderTarget2D in my project so I could use shaders more effectively, but when I went full screen I found that my center viewpoint was no longer centered. It still resizes correctly, but for widescreen monitors it should center the viewport to the middle of the screen. And that was working correctly...
i am just starting android app development. I was downloading SDK via the Android Manager. I had to select the SDK versions. I have a phone of android 2.1 So i selected only SDK 2.1 and its samples as to download all it takes too much time. If i download the latest SDK 3.X will it be compatible with my mobile?
I am working on a 2D RTS like game, basic A* works perfectly for moving a unit from point A to point B. But now I facing the continuous path-finding problem, like A attack a moving object B, call A* at each frame once Object B's position changed seems inefficient. so what is the standard method to this problem?
Okay, so in LWJGL, how can I render a 2D object (maybe for like a menu, or meter that shows up on screen during the game), and have control over size and position on screen? So I can tell it what position relative to the screen. It is a 3d game using gluPerspective (as opposed to glOrtho).
We have several quite heavy game clients completely written in AS3 (some also use Flex for UI). Some clients are built with PureMVC, others are a pile of spaghetti code that's grown over the years. We also have several libraries used by our game clients that are written in AS3/Flex. I'm tasked to evaluate the benefits/...
I'm developing a real-time rogue-like game during my spare time, using Python and libtcod, to learn programming (and have some fun). I would like to create some sort of mouse-friendly GUI, just like in Goblin Camp. This game is 90% mouse-driven, with menus, scrollbars, buttons etc. As a total noob with graphical interf...
I'm trying to make a simplified helicopter (for the moment, it's a cube) simulation in 3D and I'm having some problems with rotation. An helicopter can rotate along the three axes : rotate on itself using the rear propeller : y axis rotation tilt left and right to go left or right : z axis rotation tilt up and down to...
Given are a twodimensional space, and 1 friendly spaceship standing still, one foe is moving NOT directly to the friendly ship with known actual position, speed and direction. The friendly ship wants to get itself into firing range to battle the foe. Actually I am setting just a direct vector to the actual position mov...
Sorry for the ackward title, but i don't know what to call it exactly. I'm looking for code or libraries that allow easy creation of commonly used user input devices, and code/libs that make gaming controls easy to set up (i'm using SFML and Box2D at the moment) I don't want to re-invent things like buttons, arrows be...
I have several different music ideas for my game BGMs, but I do not have the musical skills nor the equipment to make them. The most I can do is beat-box them or make a drum beat (had I a drum). Is there a program or some other way to make my music real? For instance, I've recently been trying GarageBand's Musical Key...
What would a realistic poly count target range be for NPC and player models in a 3D MMO that will be released in 2 years? What about poly count target range for the entire camera view (environment, NPC and player meshes)? I read in some places that one should not aim too low if the game will come out in a couple years ...
Decided to try myself at gamedev, which game engine should i start working with? Or how should I develop my gamedev skills? Have C++ experience, I have already started studying OpenGL programming, and I'm using only linux based distributives.
I'm trying to make a camera that follows my character and it seems I've managed. However, I don't know how to limit that my camera don't follow me when my character reachs the boundaries of the windows (it's ugly see black spaces beyond my tile map x_x). So, this is my code: public class Camera { public void updat...
Note: The actual title of my question does not really reflect my problem but is actually one of the possible solutions to my problem. I couldn't find a proper way to express my question so feel free to propose a different title. So I've recently moved to XNA 4.0 and I'm new to this whole content project idea. I made a ...
Background: I'm having a problem conceptualising something which seems to be pretty fundamental. We have, what I believe to be, a traditional 'game loop', which runs at 60 fps and iterates through each entity calling it's update method (and later on its draw method). Although probably irrelevant, we're developing the g...
In Blender and other 3D modeling tools, the coordinate system is right-handed, while in Unity 3D and Orbiter Space Flight Simulator, they are left-handed, why this could happen? Why they don't simply use the right-hand coordinate system all the time to make things easier? Why don't all programs that deal with 3D graphi...
I'm creating an Android game and I want everyone who plays it -- no matter the size or shape of their screen -- to see the same 480x800 playfield but, depending on the actual resolution of their screen, scaled to fit their screen while maintaining the correct aspect ratio using letterboxing or black bars on the edges o...
I'm looking for a good coder's device to experiment with graphics programming. I'm sure a lot of you must have favorites. It'd be a great help if we can compile a list of these devices. Just to be clear, I'm interested in devices which are easy to hack. There are good devices like the iPhone, for example, but you can'...
I noticed that many social games have the concept of "timeouts". In farm games etc. it obviously makes sense (stuff grows, etc.). But I also noticed that angry birds introduced this as well. Individual angry bird games are pretty much stateless, so it doesn't seem to make a lot of sense at first glance (and some users ...
When I render five boxes in WebGL with one texture for all of them, the app runs at 60 FPS, nice. But when I render 70 boxes the performance decreases to ~40fps... but only 5 of the boxes are visible. I have debugged the app and all 70 boxes are using per fragment shaders when there is no need because 65 of them are ou...
Normally my app runs at 60 fps, But when I add some simple models it decreases to 40fps. I think v-sync on, which is might be causing it to run slower. Is there any way to disable v-sync in WebGL? Would glflush at the end of rendering work?
I'm making a 2D game for the Android phone, one that involves falling balls. I want to use a physics engine to properly simulate the balls falling and hitting other objects. I'm currently using Phys2D, but when the game runs in the emulator it doesn't look natural; slow and rough. Course, I don't know if this is becaus...
I have made a simple HTML5 racing game. The laps are timed. I am running the game are 40 frames per second, each frame represents 40 milliseconds. There for my timer will increase in 0.025 increments. My question is how can I get my timer to record lap times more accurately, without running at 100 frames per second!...
I am having some trouble understanding Math.tan() and Math.atan() and Math.atan2(). I have basic knowledge of trigonmetry but the usage of SIN, COS, and TAN etc for game development is very new to me. I am reading on some tutorials and I see that by using tangent we can get the angle in which one object needs to be rot...
I'm using the Game State Management (GSM) concept in my prototype and I like it very much. One of the screen has a "Game" embeded in it, where all the "good stuff" happens. The menu launching the game works fine, but I'm not sure how I should allow the game to request a screen from the ScreenManager. I'm not talking ab...
I want to study water simulation, with a a demo with source code which using physically-based methods(Eulerian approaches or Lagrangian approaches). How can I get some examples?
I'm working on a game with a component-based architecture. An Entity owns a set of Component instances, each of which has a set of Slot instances with which to store, send, and receive values. Factory functions such as Player produce entities with the required components and slot connections. I'm trying to determine th...
I'm building a prototype puzzle game at the moment. I'm just curious as to the principles behind building graphic interfaces within games. At the minute I'm looking at designing the graphics for an interface in something like Illustrator. I'm looking at one graphic (650 x 650 px) that incorporates the play area (400 x...
for (int i = -5; i < 5; i++) { Rectangle screenRectangle = new Rectangle(0, 0, screenWidth, screenHeight); spriteBatch.Draw(foregroundTexture, screenRectangle, Color.White); Rectangle backGroundRectangle = new Rectangle(x + screenWidth * i, 0, screenWidth, screenHeight); spriteBatch.Draw(backgroundText...
I'm using the Chipmunk physics engine to make the levels for a 2D C game. I'd like to be able to fit a polygon to an arbitrary shape to serve as the collision mask. Given a black and white collision mask for an arbitrary level object like this: Are there any well-known algorithms for getting this: I could then use ...
In other threads on this very website, it has been repeatedly stressed that having a game demo to showcase at a job interview is of paramount importance, so I decided to have a go and write my own game demo. I would like to know what is typical for interviewers to focus their attention on while reviewing your game demo...
I have been learning C++ for long time (but only learning game development for eight days) and I have made a simple game using 2D textures. I was thinking of starting on 3D game development. I wanted to begin by loading and rendering a 3D model on the program, but I dont know how. Can anybody tell me if this function c...
I'm working with SFML right now, and upon finishing the tutorials I still do not know how to give a shape a texture or image -- not just a solid color/outline. The only thing I know can take an image is a sprite, but thats way to simple, as it only allows you to render rectangular images in a rectangluar way! What are...
So I've been fighting my way through learning the DirectX 11 API with what little documentation there is out there and noticed some new D3D11 warnings in my debug output. (Atleast I think they are new, been rearranging my draw calls to try and solve another problem I'm experiencing at the moment) Anywho, with some Goog...
I've read that the speed of game objects should not be hindered by FPS but instead should be based on time. How can I seperate the update/draw code to maximize performance without limiting the drawing rate and provide a constant logic update rate based on time? My current pseudo code is as follows loop { draw(); ...
I have a Direct3D application which uses a PRESENTATION_INTERVAL_ONE implementation. Pity, its blocking and eating my CPU waiting for Present. I ended up searching for raster scan (BitBlt) solutions, sample code from the Internet, but none of them actually worked well - failing to do the exact timing prior to Present c...
Note: I am not asking how to make a clone of one of these. I am asking about how they work. I'm sure everyone's seen the games where you use your own music files (or provided ones) and the games produce levels based on them, such as Audiosurf and Beat Hazard. Here is a video of Audiosurf in action, to show what I mean....
I am implementing PCSS and I am using a directional light. The directional light volume is clamped to the camera frustum (as is typical with directional lights). So when the camera rotates, the directional light volume can find a tighter bound on the camera frustum in some cases, and then all of the depth values can in...
My client wants a browser based online game, languages which are known to me are Java Script PHP and Action Script and also My Sql. Game is quite like Farmvile as far as functionality is concerned.I would like to know how to combine these technologies to make a full fledged browser game, also do i have to use all of th...
Are there any open source games using Flashpunk? The other big flash game library Flixel has a number of example projects, are there any equivalents for Flashpunk?
I am trying to figure out the difference between a "Material" and a "Material Pass" (in theory). Is it basically that a Material will have multiple "Material Pass"'es, along with a name. Then the "Material Pass" will have the references to the texture, shaders and property values that need to be set?
Is their a way to make it where no matter what the screen size is my sprites will always start at a certain position. I am trying to get my sprites to start in the lower right corner area of the screen. I am using a 2D SurfaceView.
Hey can someone help me out, I've been trying to fix this for about 2 hours now, and I'm a noob when it comes to game programming and Java(only been reading and programming with it for a week now, this is my first non-tutorial driven attempt at anything). Basically from my understanding my tile map class should be done...
I've been looking into how to use the XNA Content pipeline appropriately for a game I am working on. I have however been having a hard time wrapping my head around it and am not sure on the best way to proceed. The specific example is, I have a top down 2-d RPG style game. I want to create a utility (probably Windows F...
There are plenty of tools for making images. I'm not looking for one of those; I have many tools for creating an image. I've got tools for compressing images, generating mipmaps, and even for poking at their basic data format. My issue is with texture assembly. DDS files support cubemaps, array textures, and even cubem...
I am developing Android an game. It's going to be a top-down shooter with stealth features. I am now thinking about how to the make controls. Most top-down games are now twin stick (joystick on the left and right sides) but I need more buttons (for choosing weapons, commanding your squad, and using skills). So here are...
How did you learn the DirectX 11 API? MSDN documentation, tutorials, blogs, sample applications, books, etc?
I would like to ask you all a question about how I should be going about creating and especially maintaining an Amateur/Independent team for quite a big project. I'm specially interested about common pitfalls like who to Not accept on a team for example but also any information about how to build and maintain a team of...
I started playing around with terrain and I am getting this assertion in QueuedRenderableCollection::addRenderable: "Error inserting new pass entry into PassGroupRenderableMap" I am trying to find out what I have done wrong, but it is hard, so perhaps someone has any idea of what may it be. I can reproduce it easily o...
I have a problem with making map editor in XNA. I'm making a 2D tile based map editor. The problem is, I need every tile I put in map editor to be X: 0, or X: 32, or X:64 and so on, not 1.10, 2.99, 5.62, etc. You see, it has to be exactly i*32 tiles, where i is whatever number, not decimal. Thank you if you help.
I'm trying to write a SpriteManager class in XNA, but I need access to the Game variables. For example, the Game.Content property would be very helpful in loading textures, and Game.GraphicsDevice.Viewport would be helpful in getting the window size. For now, I have the following class: public MainGame : DrawableGameCo...
I have the following Sprite class (leaving out everything that doesn't pertain to my question): public class Sprite { public Texture2D Texture { get; set; } public Vector2 Position { get; set; } private SpriteBatch _spriteBatch; public Sprite(Texture2D texture, Vector2 position) { Texture =...
I have a c++ application which outputs to screen using entirely DirectX9, running on Win7 64 Home. It runs as normal in these circumstances: Debug Build, from within MSVC 2008. Release Build, from within MSVC 2008. Debug Build, by opening the compiled executable itself. However, strange things happen when I run the c...
I have a problem with rendering rectangular textures on non-rectangular surfaces. While googling, I found a thread with person having a pretty similar problem: http://www.gamedev.net/topic/419296-skewedsheared-texture-mapping-in-opengl/ But in my case, I cannot be sure about surface's exact properties. It's not regula...
I have a 2D matrix; each of its elements describes a homogenous coordinate in 3D wave (the values of wave coordinates are changed in time). The wave rendering is done with texture. I need to make an integration for the wave. Does anyone have a clue? And another question; will the texture have any impact on integral cal...
Is there a tool for Linux (preferably a command-line tool) that can convert from the .x text format to the binary format? I wish to use this format with Irrlicht but the text format is loading very slowly (taking around 8 seconds to load one model), so I'm wondering if the binary format will be faster. I have seen this...
By culling, I mean, only rendering what is currently seen by the camera. In my game, nothing is tile based. Each object has a center point and that is where it is on the screen. The camera is simulated by doing glTranslatef before drawing anything on that layer. Here are the constraints: I have 6 layers. Each of these ...
I would like to better understand the difference in capabilities between mobile and desktop/console graphics? What exactly are the limitations of a mobile device? What kind of operations can a high-end GPU do that a modern smartphone cannot do? It's clear that games in a desktop look much better but what is behind thos...
We are looking to add an archiving system to our game, where the assets (textures, scripts, sounds, etc.) will be located and directly accessed from memory. The main requirements are: Files must not be compressed Archive must have an internal folder structure Individual files must be accessed directly from the archive...
I am not new to XNA 2D programming, but have never done 3D. I am interested in learning, but always get lost once I get to creating a Matrix. I am sad to say that I don't really get them. Can someone explain, (or even just point me to a good tutorial) on getting started with matricies? I understand them from a math po...
I've seen before a topic here asking if there is any significant differences between using PALib or Nintendo's Nitro SDK... and that got me curious: what does it take to obtain the official SDK ?
Say I have a sprite. Its AABB is easy to find since I know the width and height. Say I rotate it 45 degrees, I don't think the AABB would be big enough to cover it, so I need a new AABB. How can I calculate the bounding rectangle of a rotated rectangle (given a center point, an angle, and its width and height)? Note th...
I was the lead developer of 2 moderately successful browser games quite a few years back, and plan on working on a new game soon. At the time, I wrote them in pure PHP (no template engine or anything of the sort). I'd like to start working on a new game, but have been out of the web development world for a while. Readi...
Seems like a quick and easy question but I haven't been able to find exactly what I'm looking for so: How to calculate a unit length vector that is pointing along the line which is exactly 50% of the angle of two connected line segments? A picture speaks a thousands words (that are also better than my explanation!) So...
Possible Duplicate: How do you prevent your JavaScript / HTML5 web game from being copied or altered? If a game client is developed in Javascript, the source code can be found in browser. It's dangerous, because it's easy to hack the game, and patent can't be protected. Are there any good ways to avoid this, e.g Ja...
I am new to Android, I am developing a fighting game in Android with AndEngine. Now I want my enemies to mimic my player behavior and on base of score they should come up with different tactics. I need to write an AI script. Please help me in that. I want to make my enemies intelligent that they can destroy my player a...
I'm a programmer and would like to get some perspective on the art / content creation part of game development. Comparing a 2D platformer like Super Meat Boy and a high-end game like Crysis 2, what do you think: What is harder to do / more likely to cause the project to fail: Art or programming? Which will consume mor...
Is there a simple way to get a true isometric projection with the HTML5 canvas element?
I want to start a new development of a Online 3D Card Game. I have alot of expirience in C# .NET and Sockets and everything. I started to play with XNA Game Studio, but i found it a mass. No Visual Help like in any other Game Engine or like in Windows Forms. My question is that, i dont know where and hwo to start on th...
To make a game like an RTS networked, I've seen a number of answers here suggest to make the game completely deterministic; then you only have to transfer the users' actions to each other, and lag what's displayed a little bit in order to "lock in" everyone's input before the next frame is rendered. Then things like u...
Here is what I want to do with my tile map that I am unsure of. As you can see the top walls are way larger then the bottom and side ones (this is also an issue with my corners which are odd shapes [more like an L then a square] as well as larger then the 40x40px that my current tiles are). I have also attached the t...
I am making a simple 3D game with plane in space. With c++ (win32). But the plane rotation is not realistic. The code I am using for the rotation is the following: point3D AxisRotation(point3D point,point3D Rotation){ float sx = Sin(Rotation.x*PI/180); float cx = Cos(Rotation.x*PI/180); float sy = Sin(Rotation.y*PI/180...
What's the best way to implement a detail feature, like a road, on a heightmap-based terrain? Update: It's a bit hard to see in the image, but the road descends from the top of the quarry to do its base.
I want to be able to achieve spell effects that cause a fragmenting/discoloring effect on the sprite. The first couple seconds of this video http://www.youtube.com/watch?v=HNCFh7mkvuc shows what I mean. When the enemy gets hit by an electric attack, the effect I'd like to achieve activates (in yellow). I'll have to use...
i'm wondering if there's any 2D AI source code or engines out there. I'm inspired by the Euphoria engine, and want to use whatever is already out there to make something like it in 2D, where the characters can move left and right, and attempt to preserve themselves. The only new feature i would want to add on is abili...
I have an object, and i want to interpolate its position between two points over a given time period; but i dont want it to be a linear interpolation. I'm not sure if i'm phrasing this right. vector posA; // Where we start vector posB; // Where we end float timeI; // An interval from 0 - 1 normally i would just do it ...
I'm creating a platformer game that has a "co-operative" feature which I'd like to work over networks / the internet. Now I've read up on network game programming including articles like What every programmer needs to know about game networking and so I understand the difference between techniques like Peer-to-Peer loc...
I would like to know how can I go about with an approach, that lets the enemies blink after they are hit with a shot/particle? Is it better to pre-render colored enemies into an array for a better performance or is it just okay coloring them during gameplay? For example, you can use the colorMatrixFilter- or colorTrans...
I've been looking at ways to load data into a game. I even asked a question on stack overflow about reading binary data in a portable manner . The gist of the answer seemed to be that you can use the int types header file to specify an particular integer byte amount, but there's nothing really useful for floats, etc....
Do you know any patents of GamePlay model? I mean behavior between User as Player and the System? In another words Patent of GamePlay rules. For example "when player's character dies -> the system must raise him at last checkpoint". If you know any patent please provide a link:)
I'm fairly new to Cinema and I'm building a rigged flat (2d) character out of illustrated pieces. I want the meshes to have an efficient number of polys but sufficient resolution where they'll bend most, so I'm starting with planes and mostly knifing away. Part of this process is roughly following the contour of the pi...
I am an absolute beginner with game programming, should this question be poorly formulated, be aware it was not sloppiness by my side, but lack of game programming experience. The game I am planning to code will use a top-down 2D map as "world". The world might be larger than the window (the window can zoom in or out) ...
I have read a lot individual information about three key 3D Graphics Authoring Applications: Softimage, 3DS Max, Maya. To me, it looks like each of them has its own way to accomplish the same goal, which brings me to the question, is any of them better than the other ones? In other words, if am free to decide which one...
I've done some shader programming some time ago but only simple stuff. I'm especially interested in how do you manage shaders? Do you just write one of each kind, or do you need more of them? If so, how exactly do you split and managed them? Also I've recently read that all the transformation matrix operations I used i...
Possible Duplicate: Tracking Object Position - Firing on a Trajectory I need help in implementing the projectile motion in my game as was implemented in Angry Birds. Please help.
I'm trying to get around the rule of only being able to form convex shapes in the SFML C++ library. To do this I'm planning on testing given vertices, and if concave, splitting the vertices into groups, testing each groups' concaveness, and repeating until a full set of convex shapes results that look just like...
Recently, I've been looking into developing games for Nintendo 64 emulators, and modding existing ROMs. I wanted to know if there is the possibility for any legitimate tools out there which can be used to write the code for the emulators or if all of that is off limits. I heard that the Nintendo 64 SDK has always been ...
Take a game with a persistent state that can continue even when players are not online. E.g. your player enters into a fight and loses some health points which are replenished 1 point every five minutes. There are a number of ways to implement this "update stuff even when the player isn't logged in" scenario. E.g. run ...
I hope this question hasn't been asked before. I'm thinking of creating an MMO game, perhaps for Facebook. I've investigated the options of using Java or Flash/Flex. But I'm still not sure which to go with. Does anyone have any advice on which language to use? Which language has more open source or free tools/libraries...
I'm thinking of making a lander game, where you control a spaceship and need to land it without crashing. What is a simple formula to calculate speed of falling or acceleration with relation to working time to time engines?
I have a mesh that is computer generated with a texture on top of it with transparancy on one side. The SamplerState is set to LinearWrap because I would like the texture to wrap. The problem I have is that this transparent edge has some weird aliasing. This does not occur when I set the SamplerState to LinearClamp. I ...
I'm trying to create a simple 2D sprite game. The problem I'm having now is how to design my game. I was thinking of using a Sprite class that will be my base class for all the different types of Sprites I will use. The problem in my design is wheter to let every Inherited Sprite class draw itself, having a Draw method...
For a number of reasons I have chosen to use Microtransactions to monetize my current project. However, like all make or break features I am concerned about how they are received in-game. Microtransactions seem to present a unique problem in my mind though. I believe that just giving people currency will skew my resul...
Im developing a 2D RPG for Android where the character can move up, down, left, and right like in top-down RPGs like Pokemon. What is the best input mechanism to use to control the character? A virtual joystick seems a bit to complicated for just straight movement.