All Questions

Filter by
Sorted by
Tagged with
44
votes
6answers
65k views

How can I implement gravity?

How can I implement gravity? Not for a particular language, just pseudocode...
39
votes
7answers
78k views

Algorithm for dynamically calculating a level based on experience points? [closed]

One of the struggles I've always had in game development is deciding how to implement experience points attributed to gaining a level. There doesn't seem to be a pattern to gaining a level in many of ...
62
votes
10answers
95k views

What is the fastest way to work out 2D bounding box intersection?

Assume that each Box object has the properties x, y, width, height and have their origin at their center, and that neither the objects nor the bounding boxes rotate.
46
votes
7answers
60k views

How can I draw outlines around 3D models?

How can I draw outlines around 3D models? I'm referring to something like the effects in a recent Pokemon game, which appear to have a single-pixel outline around them:
83
votes
6answers
34k views

What is the future of XNA in Windows 8 or how will managed games be developed in Windows 8? [closed]

I know this is a potential dupe of this question, but the last answer there was 18 months ago and a lot has happened since. There seems to be some uncertainty about XNA in Windows 8. Specifically, ...
70
votes
10answers
26k views

Is UDP still better than TCP for data-heavy realtime games?

I know that UDP is usually recommended for real-time multiplayer games with high data usage. Most articles are serval years old, and since ~80% of all data transmitted on the internet is TCP, a lot ...
34
votes
16answers
62k views

What are some famous games developed with .NET and/or XNA? [closed]

Are there famous games written in .Net and/or XNA?
23
votes
3answers
9k views

Best way to mask 2D sprites in XNA?

I currently am trying to mask some sprites. Rather than explaining it in words, I've made up some example pictures: The area to mask (in white) Now, the red sprite that needs to be cropped. The ...
12
votes
2answers
17k views

Open-source 3D models easily usable in OGRE3D/jMonkeyEngine [closed]

I'm looking for a source of 3D models (cars, game characters, furnitures etc.) which are usable in an open-source 3D game. I found various website with free/opensource ...
25
votes
4answers
18k views

How to choose how to store data?

Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. - Chinese Proverb I could ask what kind of data storage I should use for my actual project, but I ...
14
votes
3answers
4k views

Anti-Cheat for MMOs issues and solutions? [closed]

Most online games suffer for this problem and there are some software companies out there to cover this but recently from what I've seen most companies are trying to avoid those programs creating ...
20
votes
5answers
7k views

When should you roll your own game engine? [closed]

I've been a software developer for 5 years, now, and I am wanting to get into iOS game development. I've played around with the iOS SDK for about 2 years, attending cocoaheads meetings, and I feel I ...
16
votes
3answers
11k views

Can I achieve a torchlight effect (lighter area around a light source) in a 2D game?

I am thinking of writing myself a simple 2D game. It will not shine with perfect graphics or gameplay at first, but I'd consider it my first step in PC game development. So, imagine such simple sprite-...
11
votes
2answers
6k views

Microsoft XNA Platformer Example, is the Collsion Detection implemented accurately?

The example provided by Microsoft seems as if the collision detection (from what I can see) will have a small error. When the user collides with an Unpassable tile, the depth of the intersection is ...
35
votes
7answers
11k views

Anti-cheat Javascript for browser/HTML5 game

I'm planning on venturing on making a single player action rpg in js/html5, and I'd like to prevent cheating. I don't need 100% protection, since it's not going to be a multiplayer game, but I want ...
9
votes
1answer
2k views

Documentation on 2D space partitioning

I am looking for documentation that explains the different kinds of (well the major ones anyway) 2D space partitioning algorithms & data structures. Any pointers besides 'Google it and sift ...
8
votes
1answer
4k views

How should I handle sprite creation for customizable 2D characters?

I'm want to create avatar animations (sprites) for a browser-based MMORPG. The player is able to customize the character, and the content changes often (new weapons, armors, and so on). How can I ...
17
votes
3answers
7k views

How would I implement an endless road the player runs down?

I want to create the illusion that a man is running down a long road i.e. this pic http://camlinecambridgelimited.web.officelive.com/images/road%20graphic1.jpg If you have played Temple Run on the ...
12
votes
2answers
8k views

Scaling my pixel art platformer from 720p to 1080p

I'm developing a pixel art 2D platformer for PC and smartphone, but I'm stuck on a technical issue. I chose to have a 32x32 tile resolution, and a 64x64 character sprite resolution. The levels are ...
7
votes
1answer
1k views

“Unclutter” units in RTS game

For intentional reasons, certain units in the game I'm currently programming don't have any collision detection and response among each other. This enables them to clutter right on top of each other....
7
votes
5answers
6k views

How to lead a moving target from a moving shooter

I saw this question: Predicting enemy position in order to have an object lead its target. My situation is a little different though. My target moves, and the shooter moves. Also, the shooter's ...
10
votes
2answers
5k views

Accessing DualShock 4 motion sensor in Windows (ideally Unity)

I'm trying to use a DualShock 4's IMU as a motion controller in Unity, under Windows 7. So far I've tried: DS4Windows (1.5.11): reads motion sensor data, but does not expose them to Unity as axes ...
13
votes
3answers
3k views

How do I move the camera in full pixel intervals?

Basically I want to stop the camera from moving in subpixels, as I think this leads to sprites visibly changing their dimensions if just ever so slightly. (Is there a better term for that?) Note that ...
8
votes
3answers
4k views

XNA - Static classes from game libraries executing after content pipeline extensions, how to avoid the problem?

Alright, formulated this way I'm sure it sounds obscure, but I'll do my best to describe my problem. First, let me explain what's wrong with my real source code. I'm making a platformer, and here ...
6
votes
1answer
2k views

Turning a sprite such that it rotates in the direction that's most efficient

I have a sprite that moves from waypoint to waypoint. It turns to face its velocity vector, but not instantly (there's a rotation speed). The problem I'm having is, from one direction to another, the ...
7
votes
1answer
4k views

How to make prefabs independent?

I'm working on a Unity's Project and I want to modify a prefab, more precisely I want to change the texture of a prefab. The problem is that my modification is applied also to other prefabs. I read on ...
3
votes
3answers
4k views

Optimized rendering of a cube mesh world

I want to render a cube-mesh (a.k.a. Minecraft-style) world. If I render each existing cube it will eat up FPS pretty quickly. How can I optimize it? I understand that the point is to not render ...
3
votes
1answer
662 views

Platformer collision problems

I am working on a platformer 2D, and i am currently focusing on collision. I have the actual rectangle(class: Rect) and i can detect if the player-model is intersepting it. However, when it comes from ...
0
votes
1answer
1k views

Car driving through walls with transform.Translate()

I need help with a script for a very simple car that uses transform.Translate: ...
78
votes
6answers
36k views

How does a collision engine work?

How exactly does a collision engine work? This is an extremely broad question. What code keeps things bouncing against each other, what code makes the player walk into a wall instead of walk through ...
44
votes
2answers
18k views

How to create adjustable formula for RPG level up requirements?

I'm trying to create a formula that can be modified simply by changing two values: number_of_levels, and last_level_experience. This is to enable people modding the game to change the levelling ...
67
votes
12answers
74k views

How do you handle aspect ratio differences with Unity 2D?

I've gotten a lot of answers to this question, but they are all generic and generally not very useful. None of the tutorials talk about aspect ratio and dealing with mobile devices and there are a ...
53
votes
7answers
7k views

How can I set up a flexible framework for handling achievements?

Specifically, what is the best way to implement an achievement system flexible enough to handle going beyond simple statistics-driven achievements such as "kill x enemies." I'm looking for something ...
47
votes
7answers
52k views

What are atan and atan2 used for in games?

I am having some trouble understanding Math.tan() and Math.atan() and Math.atan2(). I have ...
26
votes
4answers
9k views

How is load balancing achieved in MMOs?

I believe it's a common requirement of MMOs that processing for a single shard or realm can be done over several servers to ease the load. I'm curious as to how this can be done whilst maintaining a ...
63
votes
8answers
74k views

Is Java viable for serious game development? [closed]

I have scoured the internet, but there are not very many resources for Java game development, not nearly as many as C++. In fact, most engines are written in C++. I tried to play a game made with ...
27
votes
2answers
12k views

Algorithm for procedureral 2D map with connected paths

Problem to solve: Generate a random 2D dungeon map for a tile-based game where all rooms are connected. I am looking for better solutions than what I currently have. My current solution is that I ...
48
votes
3answers
8k views

How can I generate Worms-style terrain?

I'm working on a Worms-styled game and want to generate some terrain procedurally. I've previously done a lot of terrain generation using perlin noise, and this is what I started out using for this ...
43
votes
8answers
28k views

How to learn 2d animation? [closed]

Where can I learn how to do simple 2d animation well? Or is it really just literally drawing every single frame of something in photoshop? Is there tips or tricks? Tutorials to help get started? Also,...
22
votes
3answers
40k views

How can I create a random “world” in a tile engine?

I am designing a game that is working on a classic tile engine, but whose world is generated randomly. Are there existing games or algorithms that do this? The procedural generation algorithms I have ...
52
votes
7answers
9k views

2D Platformer AABB collision problems

I have a problem with AABB collision resolution. I resolve AABB intersection by resolving the X axis first, then the Y axis. This is done to prevent this bug: http://i.stack.imgur.com/NLg4j.png The ...
27
votes
4answers
7k views

Top Down RPG Movement w/ Correction?

I would hope that we have all played Zelda: A Link to the Past, please correct me if I'm wrong, but I want to emulate that kind of 2D, top-down character movement with a touch of correction. It has ...
51
votes
9answers
15k views

How are deterministic games possible in the face of floating-point non-determinism?

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 ...
21
votes
1answer
8k views

How to convert mouse coordinates to isometric indexes?

I draw isometric map with tile 64x32: ...
20
votes
2answers
15k views

Implementing a camera / viewport to a 2D game

What is the most practical way to implement camera/viewport to a 2D-game? I've read, that I should store the object world position instead of position relative to the screen? Current situation: I ...
20
votes
3answers
31k views

Moving from A(x,y) to B(x1,y1) with constant speed?

I currently have something like: float deltaX = point0.getX() - point1.getX(); float deltaY = point0.getY() - point1.getY(); And every 0.01 seconds I refresh my ...
17
votes
1answer
18k views

Fast, accurate 2d collision

I'm working on a 2d topdown shooter, and now need to go beyond my basic rectangle bounding box collision system. I have large levels with many different sprites, all of which are different shapes and ...
18
votes
3answers
6k views

How can I implement smart scripting, in my game?

I'm developing a game engine. It is supposed to be an entity/components based one. For developing my game, itself, I thought to use some scripting language to actually create the entities. For ...
18
votes
2answers
22k views

How can I convert a mouse click to a ray?

I have a perspective projection. When the user clicks on the screen, I want to compute the ray between the near and far planes that projects from the mouse point, so I can do some ray intersection ...
17
votes
1answer
7k views

How do I detect ledges?

In my game, I'd like my character to be able to grab and hold onto ledges, and to be able to pull themselves up if there's room to do so. How do I detect if there's a ledge, and if the character has ...

15 30 50 per page