All Questions

Filter by
Sorted by
Tagged with
25
votes
4answers
27k views

Are there existing FOSS component-based frameworks? [closed]

The component based game programming paradigm is becoming much more popular. I was wondering, are there any projects out there that offer a reusable component framework? In any language, I guess I don'...
38
votes
2answers
15k views

How exactly does XNA's SpriteBatch work?

To be more precise, if I needed to recreate this functionality from scratch in another API (e.g. in OpenGL) what would it need to be capable of doing? I do have a general idea of some of the steps, ...
31
votes
12answers
6k views

How can I make A* finish faster when the destination is impassable?

I am making a simple tile-based 2D game, which uses the A* ("A star") pathfinding algorithm. I've got all working right, but I have a performance problem with the search. Simply put, when I click an ...
29
votes
4answers
8k views

How to determine the amount of experience needed for leveling up

Related questions under this topic might include: How should I base how much experience points it takes to get to the next level? What factors are involved in this? How do I keep the player not ...
19
votes
3answers
5k views

Design of a turn-based game where actions have side-effects

I am writing a computer version of the game Dominion. It is a turn-based card game where action cards, treasure cards, and victory point cards are accumulated into a player's personal deck. I have the ...
35
votes
6answers
28k views

Is it legally possible to make a clone of the game?

With board games like "Monopoly", "Domino", "Checkers", or "Chess", can game developers make clones and sell them? Also, can I make a clone of ZX Spectrum games? Are there many parts of the game with ...
31
votes
7answers
20k views

Are there any open source projects for car engine sound simulation? [closed]

I have been thinking how to create realistic sound for a car. The main sound is the engine, then all kind of wind, road and suspension sounds. Are there any open source projects for the engine sound ...
34
votes
2answers
9k views

How do I make a character capable of walking on walls?

I am trying to get a character to move like a spider: Given a rising slope which a ball would normally not be able to roll up, the spider would slowly crawl up. Similarly, given a mid-air rectangular ...
25
votes
8answers
21k views

What is a good tool for producing animated sprites? [closed]

Has anyone come across a software package that allows you to build animations in a similar way to how you can in Flash (i.e. using techniques such as tweens & bones & easings, etc) and then ...
13
votes
3answers
7k views

Algorithm for determining random events [duplicate]

I'm struggling with coming up with an elegant solution to generating random events in the game that I'm working on. Say there are 4 classes of events that can happen, with varying events in those ...
51
votes
5answers
4k views

Looking for a good technique for character movement in hack&slash game

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 ...
26
votes
3answers
15k views

How to achieve a Neon-Light effect?

I'm wondering how to achieve a neon-light type effect. For example, in Pac-Man Chamipnship Edition: Or in Geometry Wars: Is that a Bloom Effect? Or what techniques would I have to look for?
45
votes
7answers
44k views

How were 8-bit and 16-bit games developed? [closed]

We have a lot of information on the internet out there on plenty of engines, SDKs, fancy IDEs, etc. But how did people manage to develop games in the past? Are there 'famous' tools? What was the most ...
25
votes
2answers
2k views

How do I teach my artist to do art for games?

So my girlfriend is an artist and I'm a programmer and we often talk about joining talents and doing some small games or other fun stuff for the different popular platforms currently out. But because ...
20
votes
6answers
18k views

How do I build a 2D physics engine? [closed]

The most advanced games I've made are a 8-ball pool game made with the physics engine Box2dFlashAS3 and a platform game with levels. When I did platform games, I've always wished to know how to make ...
16
votes
5answers
44k views

Best Way to Create A Map for a 2D Game?

I apologize for the subjective "best" keyword. My friend and I have started creation of a 2D adventure game. It will be top-down in the style of pokemon or zelda (just the perspective). We have been ...
53
votes
7answers
51k views

Why are textures always square powers of two? What if they aren't?

Why are the resolution of textures in games always a power of two (128x128, 256x256, 512x512, 1024x1024, etc.)? Wouldn't it be smart to save on the game's file size and make the texture exactly fit ...
21
votes
5answers
8k views

How do I implement parallax scrolling in 2D?

Suppose I have three layers: a foreground, an intermediate-ground and a background. What is involved in using these three layers to create parallax scrolling?
17
votes
2answers
17k views

How to implement turn-based game engine?

Let's imagine game like Heroes of Might and Magic, or Master of Orion, or your turn-based game of choice. What is the game logic behind making next turn? Are there any materials or books to read about ...
20
votes
4answers
12k views

What should a game engine do? [closed]

I'd like to improve my skills/try something new and I'd like to start with 3D. I have read Starting programming in 3D with C++ but I have question about engines: What should engine do? I know it is ...
20
votes
2answers
11k views

Best technique to create oldschool (fake 3D) racing game?

What would be a good approach to develop the render system for an oldschool type racing game that uses a pseudo 3D scenery, like for example Outrun or Lotus Esprit Turbo Challenge? There's an endless ...
19
votes
2answers
5k views

Where should collision detection logic be placed?

I am developing a small 2D game engine. The characters have a paint method which currently does the following: Calculate the new position of the character as per its speed, etc. Update the collision ...
14
votes
4answers
7k views

2D tower defense - A bullet to an enemy

I'm trying to find a good solution for a bullet to hit the enemy. The game is 2D tower defense, the tower is supposed to shoot a bullet and hit the enemy guaranteed. I tried this solution - http://...
14
votes
2answers
7k views

How do I implement group formations in a 3D RTS?

I managed to get pathfinding work for a single unit, and I managed to avoid agent-agent collision, but now I need to be able to send a group of agents to some location. This is my set-up so far: ...
26
votes
9answers
21k views

What C++ GUI library can you suggest? [closed]

I'm building my own game engine in C++ and I'm currently deciding on what user interface I should use. Should I use a library? Should I make my own?
20
votes
3answers
5k views

How does one avoid the “staircase effect” in pixel art motion?

I am rendering sprites at exact pixel coordinates to avoid the blurring effect caused by antialiasing (the sprites are pixel-art and would look awful if filtered). However, since the movement of the ...
14
votes
5answers
6k views

Should I learn Direct3D 9, 10 or 11? [closed]

I'm just starting to get into 3D programming with Direct3D. What version of D3D should I pick up? 11 looks pretty neat, but 9 and 10 still seems to be pretty present. Given the current state of the ...
9
votes
2answers
8k views

How to implement the interaction between engine parts?

I want to ask a question about how the information exchange between game engine parts should be implemented. The engine is separated in four parts: logic, data, UI, graphics. In the beginning I made ...
15
votes
2answers
12k views

2D Planet Gravity

I'm trying to make a simple game where a spaceship is launched and then its path is effected by the gravity of planets. Similar to this game: http://sciencenetlinks.com/interactives/gravity.html I ...
8
votes
3answers
12k views

Synchronizing clients with a server and with each other

What is the best way for keeping all clients synchronized with a server and with each other? Currently, we have two approaches in mind: When a client sends something to the server, the server ...
19
votes
3answers
3k views

MVC-like compartmentalization in games? [closed]

I was contemplating the design of a game (translating a boardgame to the computer, specifically, which I suppose is relevant in this case) and it occurred to me that it might make sense to build the '...
17
votes
2answers
10k views

Inheritance vs Composition

I make my money in C# Generally in that language I like to decouple everything to the high heavens using interfaces. This has served me well in enterprise code but in writing games in C# I find myself ...
14
votes
4answers
5k views

How to continuously find all entities within a radius efficiently?

I have a very large number of entities (units). On each step, each unit needs to know the positions of all units near it (distance is less then given constant R). All units move continuously. This is ...
12
votes
7answers
18k views

What is a good way to store tilemap data?

I'm developing a 2D platformer with some uni friends. We've based it upon the XNA Platformer Starter Kit which uses .txt files to store the tile map. While this is simple it does not give us enough ...
8
votes
1answer
12k views

Understanding pixel art in Unity 2d

I am struggling to understand the basics behind pixel art in Unity. I understand what a unit is, and that if I draw my sprite with 16x16 pixels, I should set PPU to 16. Take stardew valley for ...
26
votes
4answers
3k views

How do I avoid “too” lucky / unlucky streaks in random number generation?

I'm currently dealing with a multiplayer combat system where the damage dealt by the players is always multiplied by a random factor between 0.8 and 1.2. In theory, a truly random RNG may eventually ...
20
votes
5answers
17k views

Do I need the 'w' component in my Vector class?

Assume you're writing matrix code that handles rotation, translation etc for 3d space. Now the transformation matrices have to be 4x4 to fit the translation component in. However, you don't actually ...
11
votes
3answers
8k views

How do I implement occluded lighting in a block-based 2D game?

I want to have 2D lighting that can be blocked by in-game objects. My game has a top-down view and all game objects are described by rectangles. Let's say I have a 10x10 world and I place a light at ...
10
votes
6answers
6k views

3D Illusion of a 2D Planet Texture

Several years ago I overheard a technique that gives the user the illusion of a rotating planet by using a 2D texture. Given that the user isn't able to change its position or viewport. What's the ...
8
votes
3answers
5k views

Is there a simple way to group two or more sprites, so all of them will be dependent on each other?

I think that this question is very similar to this one, but I'm not sure if the answers are universal. So, my goal is: Place two sprites in fixed position, for example player and his eyes Make sure ...
11
votes
2answers
18k views

What is the difference between PBR and SSR?

I am very new to game development and I have been trying to understand the difference between Screen Space Reflection and Physically Based Rendering. I have read about PBR, and from what I understand,...
21
votes
2answers
14k views

How do I disable texture filtering for sprite scaling in XNA 4.0?

I have a sprite that I'm trying to scale up in XNA, but XNA is applying some sort of texture filtering that smooths it and makes it look ugly. I'd like it to just do pixel doubling instead of ...
8
votes
2answers
6k views

How do you triangulate an arbitrary polygon?

I need to triangulate a polygon for rendering in OpenGL ES on Android (no GLU triangulation available). Is there an already known algorithm for polygon triangulation? The polygon can be convex or ...
31
votes
3answers
8k views

What is the difference between a library and an engine?

I am working on a library to help 2D game development with Scala. So far, it is a collection of helpful classes, file loading, collision detection, images, sprites, etc. So when does it stop being a ...
13
votes
3answers
5k views

Projectile Motion - Arrow

In a 2D game, I simply want to draw the trajectory of an arrow in flight. With the code below, the trajectory (the parabola) looks right, but the angle (or rotation) or the arrow isn't. ...
10
votes
1answer
4k views

What are screen space derivatives and when would I use them?

I see the ddx and ddy glsl functions and the hlsl equivalents come up in shader code every now and then. I'm currently using ...
7
votes
5answers
28k views

How do I destroy a Box2D body on contact without getting an IsLocked assertion error?

I get this error when attempting to remove a body from the world: java: /var/lib/hudson/jobs/libgdx/workspace/trunk/gdx/jni/Box2D/Dynamics/b2World.cpp:134: void b2World::DestroyBody(b2Body*): ...
15
votes
3answers
5k views

How can I make “falling away” 3D terrain like Animal Crossing?

Animal Crossing has a unique way of scrolling the world map: When the character moves down, the the world rolls around and over at the top, like it's stuck to a cardboard tube: This video shows how ...
11
votes
4answers
1k views

Scaling HUD with variable resolution

I'm unsure as to what people prefer when it comes to HUDs, and scaling them. What would you say is the best practice when it comes to sizing the HUD? I'm thinking there's really two options: Scale up, ...
5
votes
3answers
17k views

How do I calculate how an object will move from one point to another?

Here's the problem: A player starts the game in the 0 coordinate (x=0,y=0). When the user clicks on the screen, it returns the coordinates of the destination. Now the player has to move from its ...

15 30 50 per page