instruction
stringlengths
33
29.4k
I have a webgl based 2.5D platformer game, and I would like to add a simple blob shadow under the character to help the player with the platforming. How is this normally done? As you can see below, I do not need to worry about sloped terrain if that matters.
I'm trying to get something like the below image. As you can see, there's a highway and inside of it, there'll be some objects moving (millisecond). I guess the street behavior is like a pipeline. When the highway loads an object, it appears at the beginning and it'll be moving through the highway until it arrives in t...
How can I handle a touch event in cocos2d for Android? And how to move a sprite using ccTouchesMoved?
I'm developing a 2D physics platformer game, with commercial purposes. Almost everything is finished: An original game concept The whole 2D self-written game engine A level interpreter to read xml levels A level editor with an advanced GUI to generate levels in xml An advanced level object system Profile manager (load...
I'm venturing into Mobile/Tablet based development coming from the world of Web Applications. I want to write a game similar to 1942/43 video game from the 80's: ...similar in the sense that I have a plane/spaceship that flies vertically "up" the screen and stuff comes down to attack it (otherwise nothing that would v...
I've recently read The Art of Game Design and am currently reading Why Reality is Broken and am wanting to learn more about the psychology behind game design. I'm a computer science student but I'm intrigued by the subject and have thought about minoring in psychology. For the veteran game design people out there, wou...
I've been playing with loading and displaying Source Engine models (TF2, specifically) and have had mild success, but there are some aspects of it that are eluding me still. I've been primarily looking at http://developer.valvesoftware.com/wiki/MDL and online forks of the SDK headers like http://hlssmod.net/he_code/pub...
I'm trying to make a similar to http://www.cultofmac.com/edge-for-iphone-controversy-rumbles-on-game-again-pulled-from-app-store/13115, but I'm not sure if it's real-time 3D or just really good 2D. Any thoughts?
I will keep this simple. The question pretty much sums up what I am looking for. Where are some locations for 2D effects. Specifically ones like those used in old Amiga demos. They do not need to have source code. I am just looking for inspiration to code and replicate some of the effects. It would be nice to have a li...
I have a 2d heightfield converted into a very simple mesh and textured with tiles from a texture atlas. The tiles texture is drawn with: glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP); glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP); On my integrated Intel card, it draws as I intend (top picture)...
I'm creating a logic game based on Fox and Hounds game. The player plays the fox and AI plays the hounds. (as far as I can see) I managed to make the AI perfect, so it never loses. Leaving it as such would not be much fun for human players. Now, I have to dumb-down the AI so human can win, but I'm not sure how. The cur...
Many of the sprite sheets online have non-uniform sized rectangles as the animation frames and often use a portion of the image for credits, etc., this makes it hard for a game engine to correctly clip the sheets. Is there any tool that can help you quickly define frames in a sheet, export animation data which the ga...
I decided recently write a 3D game in my spare time, as I was tired of my daily "corporate programming". If I expect to be done in 6 months/1 year, which version of OpenGL should I use as baseline? In other words, which version of OpenGL should I require my potential users to have? I did some OpenGL has a student, but...
I'm about to program a copy of Mario in Java. I'm thinking on 2 representations/data structures for the levels but I'm not sure which one should I choose: A 2D integer array. A quadtree to divide the level in pieces. What are its advantages and disadvantages?
I'm presently working on a 3D car racing game for the iOS platform. I had to implement a replay system and then record that replay in a video file to upload it to YouTube. I'm only having issues with the recording part, the rest is done. What I'm doing is using the glReadPixels() command of OpenGL ES 1.1 to capture th...
I'm developing a game in Flash and I need a little help. It can be considered a math problem. My object is flying with speed X and my object can collide with stones. When it collides with a stone, I need my object to break the stone and continue, but with less velocity. It's easy to hard-code it and write something lik...
I want to to develop a game like Populous: The Beginning with my friend. But we could not find out what type of geometry they have used for the world. We know that - all tiles have the same size - all tiles are squares So.. It cannot be a Icosahedron, because there are triangles, nor cant it be a standard sphere geomet...
I tend to build games with strong stories, which usually involves quite an indepth world environment. Typically I develope typical 2.5 over head view JRPG style (think Zelda, Final Fantasy 3, etc) because I have it stuck in my head that you can only achieve world depth using this style. This question is limited to the...
As a kid hanging out in my local arcade, me and my friends used to swear up and down that our computerized sf2 opponents would learn our strategies. I wonder if anyone here might know whether that was the case. It feels as if it couldn't have been as simple as a finite state machine, because the opponent's tactics wer...
I'm working on a realtime multiplayer game that will require a database (for features such as player profiles, friends, unlocks, news, etc.) This is a standard PC game (not browser-based) and will use a client-server architecture. I am new to using databases, and have done some research over the past few days when I st...
I'm working on a 2D game where you use paint to add tiles to a level and right now I'm working to add warp tiles. I have it set up so certain direction-oriented paints use two points (a start and end) to determine which direction the tiles will point (left, right, up, down.) The warp tiles have these points, but they'l...
How can I embed a video in a XNA application? I'm developing a card game with XNA C# and I need to send webcam video between four machines. Could anyone give me some tips about that?
Can anyone please help me out with a small test game I'm creating. I'm basically creating this game to learn a few things about HTML5 and so far it's all been good. I've been able to create a canvas with a air balloon that can fly and drops to the bottom when it's not. Now I want the air balloon to be able to stop on a...
I've taken the A* Algorithm from this example XNA Pathfinder Example so that it will be able to plot a path for a moving goal. The issue I'm having is that it will go in the right general direction but it will keep going back and forth in a line. I've changed the method so that it calculates a new path every half a sec...
I have basic experience in Python, and I want to know which is the best library to use in development. I was looking originally at Pygame but found it a bit lacking in tutorials. Are there any good ones for Pygame? And if not, is there any nice alternative to the Pygame library, or Python itself?
Ok, so i have created my first "game" and it uses a lot of java's collections. for example, i have a bunch of monsters in a HashSet which sometimes gives me the fabled java.util.ConcurrentModificationException when i try to modify the HashSet. Basically im getting these exceptions when im within a for loop and then som...
I'm programming a Side-Scroller, and I've reached the point where I need to program the enemy behaviour. I don't know what I should choose between hard-coding the enemy ships' behaviour or using a scripting language. Going with the hardcoded way, all different kind of enemies would be different classes derived from an ...
I'm looking for a good beginners' book on the subject of physics in game development. Something that focuses on 2D games would be preferable.
Overview The game is a multiplayer simple real time strategy housed in a Flash application. Players run the Flash client, and are connected to a server written in another language (the language is irrelevant). Players compete against one another in games of 2~8 players. My aim is create some way for people to create ...
if a Vertex looks like this: struct vertex { vec3 point; vertex [] connected; }; Can I tell if this makes a solid shape with no holes? (e.g a sphere or a cube, NOT a sphere with a side missing for example) (if i can see the back of a face from outside of the shape then it is not solid)
I'm working on a tool for character customization (e.g. starting from a base model, a player can control his fatness), so I'm looking for ideas, techniques or other regarding this topic. After some research I thought to this technique: starting from two models (one standard human and one fat human, both with the same d...
I wrote a little 4 spatial dimension game, it's a 4D snake. The rule are the same as the game for the old Nokia cell phone - eat the food, don't cross yourself, don't go out of the borders. What do you think of the idea? How do I make a better graphic of the UI? Do you have any suggestion? Like this actually seem a DOS...
I make a MenuScene when my Game loads, which grabs some intro text from levelData and displays it and a button to start playing the level. When the MenuScene is created and displayed in onLoadComplete() it's fine. However when I display it again when advancing the level (levelData is loaded with new data and the MenuSc...
I'm trying to replicate the glowing outline effect in the Left 4 Dead game. The effect causes an objects outline to glow, even when the object is occluded. Here is a screenshot of the effect: I'm somewhat able to replicate this effect in my OpenGL based program. This is what I'm currently doing: Create a color and de...
I'm working on a TCP turn multiplayer game. I've read many tutorials and stuff, and they all said to use Async IO, but, none of than give practical examples on how to do it. I was thinking that in every TCP data stream sent, the client would have to send who is he, and what he's doing. Is it really necessary? What's th...
I'm learning SDL. I'd like to create rectangular surface filled with a flat color (not an image). Below is my code -- it compiles fine, but doesn't work. I'm passing the function these parameters: SDL_Surface* m_screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE ); SDL_FillRect(...
I have an arrow image. I want to stretch this image between two given points. I'm retrieving the points from touch locations, so they aren't fixed. When the user touches the iPad, the arrow image should appear and be shown until the touch ends. So if the user touches point A and is moving his finger to point B, the arr...
I was thinking of developing a game in Flash, as a hobby/educational project. However, I was hoping I could make it run on a smartphone, but a friend who develops in Flash says that in their experience things will move really slow on the likes of an iPad when the Flash packager is used. So slowly that you can't use it ...
I am trying to get the colors of the top left pixel in an image, I use this code: using (FileStream stream = File.OpenRead(animationFile)) { animation = Texture2D.FromStream(graphicsDevice, stream); } Color[] animationData = new Color[1]; animation.GetData<Color>(animationData, 0, 1); When i run it I get...
This isn't a game development question per se, but here goes... I have a 50x50 pixel space in which I need to draw five lines: X and Y axes, and one line for each of a steepest, average, and flattest slope. I'm working with (Java) code that was handed down to me with no documentation or commentary and I've never worked...
I'm trying to create a body of a irregular 2D sprite Farseer 3.3.1. The regular shapes that BodyFactory provides are not that I want. Is there a way that one can create irregular objects? Could it be done using the BodyFactory.CreateCompoundPolygon method?
So I'm teaching myself GLSL and am trying to figure out why it's suppose to be faster than the fixed function pipeline. The reason I am having a problem is that from my understanding , the shaders you create are replacing sections of the pipeline that were there before. So, how's simply providing your own version spee...
I use the following chunk of code to make bullets that fire towards the player's ship: @Override public void onTimePassed(final TimerHandler pTimerHandler) { pTimerHandler.reset(); if(spawnBullets){ for(int i = 0; i < enemies.size(); i++){ if(enemies.get(i).isShooter()){ //sh...
I'm having a problem with the Farseer Physics Engine, where in a tiled environment, my object will at times interact with corners of others objects, even if they align perfectly. I've read about people suggesting that you calculate and create one larger object, using Marching Squares or something similar. This is not ...
I'm doing HTML5 Canvas development and currently have a large viewport (on the left) and a map (on the right). Like this: I need to show on the map what is currently being viewed in the left. And I'm at a lost on how to calculate this. This is how I want it to be: I am manipulating the main viewport via a transformat...
I showed my friend a demo of what I was doing with the farseer physics engine on the windows phone and he wanted to know if farseer would be good for a game he wants to develop. It's a tile based game so I said I don't think farseer would be the best choice (correct me if i'm wrong). Are there any tile game engines for...
I'm a beginner to OpenGL and GLSL especially, and I'm having a lot of trouble getting textures to display via shaders. My shader code compiles without any warnings or errors, but I seem completely unable to render my texture. In fact, nothing's being rendered at all; I'm getting a blank screen. Here's my current, simpl...
I only have experience in physics-based games in cocos2d. I want to develop a turn-based game in Cocoa Touch (iOS). Two players will play this game on different devices which connect via Bluetooth or Game Center. I'd like to know how to synchronise two devices through a Bluetooth connection. Please tell me of any blog ...
I'm just getting started build my first game with XNA (I'm experienced with C# but not games). I'm building a pretty simple top down 2d shooter. I read this tutorial on using a color based collision system and it sounded really cool to me. http://www.xnadevelopment.com/tutorials/theroadnottaken/theroadnottaken.shtml It...
I'm trying to use direct2d to render images off-screen using WindowsAPICodePack. This is easily achieved using WicBitmapRenderTarget but sadly it's not hardware accelerated. So I'm trying this route: Create direct3d device Create texture2d Use texture surface to create render target using CreateDxgiSurfaceRenderTarget...
I'm looking for an (easy to use) "3D painting" program, a program that lets me load up a UV-mapped mesh, some textures and lets me 'paint' with those different textures. Exactly like all those terrain painting programs (Unity 3D has one integrated for example) but for a generic mesh, not just a height map. Cheap is bet...
I'm about to start writing an iOS game and I'm going to use mainly C++/C for the core gameplay logic. I really like pre-allocating everything in the game and try to avoid any dynamic allocations as much as possible. With my own C++/C code it's not a big deal. However there are some ObjC libraries which I'd like to re-...
I recently created a game (LD21) that uses a geometry shader to convert points into textured triangles/culling. Since I was under the impression that the support for #330 was widespread I only wrote #330 shaders, but it seems that a lot of not so old hardware only support #130 (according to GLView) Now, since I'm only ...
is the concept for Tetris in the public domain or is there someone who is still collecting royalties on the concept? I mean, if I were to write a variant of Tetris would I owe somebody some money? Thanks.
Is there a good (accepted) method for "fixing" the cycle time within an HTML5 canvas game implementation? The game that I have been working on runs far quicker in Google Chrome than in other browsers such as Firefox, Opera, or IE9. To be honest, it kind of reminds me of running a game from the early 90's on a brand ne...
I've been modifying a pathfinding example from XNA Pathfinding example as described in my previous question Link to question here I had an issue where the character moved kept moving back and forth in a line. John McD suggestion made the brilliant I alert the way that the Heuristic calculation so that any nodes on the...
How would you implement movement on a camera in order to always move it on X and Z coordinates, and if the camera has pitch yaw or roll it still moves only in those coordinates and doesn't fly up?
How do you or your company require designers to deliver their assets to coders? Do they deliver a PSD? A series of 24-bit PNGs? If you are a coder, what would you include in a best-practice guideline to designers? If you are a designer, what questions would you like to see answered in such a document? Here are some ...
I'm looking for the most capable C++ model loading API. So far I've found tons of ply, obj, and other such file format loaders. But the libraries I've found tend to load just one model type, and this requires you to learn quite a few api interfaces? Is there One API To Load Them All, One API To Parse Them, One API To ...
I used to use the BGE until I found that unity can build to lots of different platforms. What platforms does the BGE support?
Principally, this is a follow-up-question to a problem from a few weeks ago, even though this is about the algorithm in general without application to my actual problem. The algorithm basically searches through all lines in the picture, starting from the top left of it, until it finds a pixel that is a border. In pseud...
There are many algorithms that can be used for collision detection. In many cases we check for an overlap in coordinates of an entity. If we make a triangle a,b and c. We have 2 entities at a and b heading for a collision at c but each of them are moving at exactly the same time, what kind of algorithm could work? It s...
I'm trying to get access to the keyboard state in XNA from an embedded JavaScript runtime. I'd like to do something similar to the following, but I can't seem to figure out how to get from "Left" to Keys.Left, in one line, for all 100+ keys or so. js.SetParameter("XNA_Keyboard", new { keyDown = (Func<string, bool>)...
What's the best way to program a rhythm based game in XNA? (Some sort of game like Dance Dance Revolution) Would you use the built in GameTime? What logic would you use to make sure the game constantly stays in sync to the music? Any tips would be much appreciated! What I am basically asking is how you would keep the ...
How did the creators of TF2 make the glow on the payload cart visible through walls? Is it possible to implement this in Unity's shaderlab?
I already have the basics of ambient occlusion down. I have a raycaster and am capable of shooting rays about a hemisphere uniformly. It seems like those are the basics of what are needed for radiosity but I don't know where to go from there. Do I find how much light comes from each face? (I'm making my game out of...
What is the usual method of storing 3D models, textures, sounds and scripts (e.g. Lua files) during development and in a release? I am developing a game with my friends in mainly C++; in the prototyping phase we only had a single texture that was saved as a C header with the GIMP, but of course, this approach does not ...
I am very new to game programming and I am in my first project. I have come to a point that I need expert advice: Now for the game physics to be able to work on objects, it needs to know each object's position and its orientation in 3D space. As part of the simulation and due to objects moves (position change) and chan...
I was wondering what kind of technologies were used in FPS games to move bots around the level. I know the pathfinding is done using waypoints or navigation meshes but how do the bots actually rotate and move over those paths? Is something like opensteer used for that, if so, which particular parts?
I found this article on implementing an input pipeline for Android, but I don't really understand how it works. I also don't completely understand the programming concept of a pipeline or a pool either. Could someone explain these concepts and how they work as this input pipeline?
What's the best way to go about this? I've never coded using two languages before, let alone for an android phone
I am trying to learn game development with the Unreal Development Kit and Unity, trying both out, and trying to get an idea how they work. For now, I'm mostly focusing on PC games. How hard is the technical aspect of porting a PC game that I made in the Unreal Development Kit or Unity to another platform, such as Play ...
Basically decided to make my own mob, I have: Created my mob's entity class Created my mobs model class Drawn the model Added the function call for addMapping within the EntityList class I'm stuck on what to do next. I've tried finding the code that deals with passive animal spawning in the world, however I can't see...
I have had trouble getting the money together to buy a digitizing tablet, and it would cheer me up to know what kind of digitizing tablet the artists were using to create classic games like Super Mario World and Sonic The Hedgehog. Part of me feels that maybe there is a way to make games without 2000+ pressure sensitiv...
I am doing a simple 4X strategy game in space where each node is a point-of-interest (a planet, an asteroid and etc.). To randomly generate a map, I would follow the steps below Decide how many type of each nodes the map will have (perhaps, say, 5 Earth-like planets, 10 barren planets etc.) Place each type of node on...
I'm moving from Flash to C++, and am wondering if there are any tools out there that would let me author animation much like Flash does. Basically I want a GUI that lets me layout sprites and specify keyframes + easing for position, size, rotation, etc., then later be able to load and play these animations from my own ...
Just starting out using XNA to draw 3D scenes and have a question about determining which objects are currently visible. If I load many thousands of sprites and shapes in a scene, then render the current view from a camera, is it possible to actually find (e.g. list to a text file) the IDs of those visible objects? I g...
Does anyone know of any good tilesets for hex-based maps that are available for free use? The tiles from Battle for Wesnoth seem to be under a license that would allow others to use them in their games, but the game I'm developing is on a scale where a hex would be about equivalent to the area that a person would stand...
If I set the directx feature level to D3D_FEATURE_LEVEL_9_3 but I have a graphics card which supports D3D_FEATURE_LEVEL_11_0 does that prevent directx11 features from working even though my graphics card supports them? I want to ensure that my game works on 9.3 level hardware but don't have such a card to test it on. I...
I want to check collision detection between two bitmaps but I am not getting how to do it. I read several queries and tutorials but didnt get properly. I want to check by their width and height. I have implemented some logic also but not getting where I am doing wrong public boolean collision(){ for(int i=0; i<...
A few days ago I found something called voxel terrains and I think that they're pretty cool. But I don't know anything generating them. Do you model it in your modeling software or use something like a heightmap? I read on wikipedia that voxels are like 3d pixels or volumetric pixels. After I make the voxel terrain, h...
I know this is a common question, but I can't find an answer to it that isn't written using a huge game library sadly. I'm trying to write a scrollable tile system, which allows the user to move around it (from an arial perspective). I have this partially working, but it doesn't work as expected. Could anyone help me o...
Are there any recommended blogs or whitepapers that talk about making the AI in an RPG game feel more real? (Specifically in turn based combat.) I know something must be out there, but I am only finding papers that talk about algorithms behind the AI. I am looking more along the lines of "this is what makes a computer...
I'm currently looking at the options regarding how to do a strategic map for a web application. My goals here are : a synthethic view of what's happening in a stelar system the ability to management movements (through displaying trajectories of some ships and planets/star(s)) the development should'nt take years, sin...
I want to make my own Minecraft mods and I'm wondering what I need to do to get started. Is there any good software or anything for it?
Could someone please explain how it would be possible to create a sphere vertices, indices and texture coordinates? There is a surprising lack of documentation on how to do so and it is something that I am interested in learning. I have tried the obvious, googling, looking on gamedev.net, etc. However, nothing covers ...
I'd like to create a very simple 2D board game for Android, it would be a concept/mockup so I can see how the game works out. Let's for the sake of this question that it's a clone of Othello - board game with score display, clickable game pieces/spots on a square grid and some animations. I have to choose from these a...
I am trying to draw spheres using a billboard, so I have a normal map with a z component that I am sampling in my fragment shader. I just need to add this z component to the depth of my fragment to get proper 3D spheres... How do you determine the current fragment's z-depth, add my offset and then set gl_FragDepth? I...
I'm thinking of making a spot the difference game. But immediately I stumbled over a problem. I'm thinking of storing a "difference area" in the form of a x,y coordinate. However, because on a smartphone it will be difficult selecting the exact pixel at that location, I need a way of checking if the "area" is within th...
I've been building a rogue-like for more than a year now, and so far I've only ever implemented very simple monster behaviour - such as moving toward the player when he's in the line of sight, and attacking. I would like to implement fleeing behaviour for certain monsters that realize they're outmatched. I have these p...
I´ve got some questions regarding the loading of tile maps. I´ve got a world with several buildings in it that guide the user to a new map. This map can be a small room, but also a big area. To change the map it seems straight forward to change the current tilegrid to the tilegrid of the new map. But this seems pretty ...
I'm wondering if anyone can guide me with following problem... Each fruit has different chance to be called out. Apple - 80% Orange - 10% Banana - 10% Each time a user click on the random image, only 1 fruit will come out with above weight. I have no idea how I can calcuate to get that result. Pseudo code example is ...
I'd like to know how many shadow casting lights are supported in modern games, such as Uncharted 2, Crysis 2, Modern Warfare 2, Halo: Reach, etc. Do they all limit themselves to just a couple of shadow casting lights, or do the numbers vary wildly?
Few years ago I tried to make a simple 3D game - billiards. Completed like 50%, stuck with physics. Basically, I only need to calculate balls rolling over flat surface, but it would be nice to make something more flexible. I know all the formulas and laws (most of them, anyway). the problem is I have no idea of how to ...
In D3D11, they still have the ability to make 16 bit and 32 bit index buffers. Few models will use more than the max (20k tri) that a USHORT index buffer can handle, but will I really pay a bad performance cost for always using an INT (32 bit) format? Memory savings aren't that much (2 bytes per index!). For a 20k tri...
[Reposting this question from stackoverflow, as it was pointed out that it fits better here.] I'm currently porting my 2D game engine to Java. I looked at some of the game libraries pointed at here on stackoverflow. However, the ones I looked at were rather simplistic and didn't even state if they supported things like...
When I'm creating games, I really love the coding part -- designing, developing the main functionality and "core" part of the game. However, most of my games are reasonably small/easy in terms of coding, but require a lot of content -- whether graphics, levels, sounds, puzzles, story narrative, etc. I find development ...
I was wondering how can I get started with game design & developement because Im not really good at any programming languages that used to make games
The video shows an EA representative talking about how a programmer can get into the industry by showing some demos (in fact, he shows a physics demo presented by a candidate who wanted a job at EA). The demo shown depicts kind of a ragtime doll made of yellow cobblestones. I don't remember if I watched on YouTube or V...
When I was younger I used to play games a lot for hours. I would say I got addicted to them. Now I'm a software developer and was wondering if games are explicitly designed to be addicting? Game developers are interested in keeping their users playing as long as possible. I've read about Operant Conditioning and Virtua...