Computer programming is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs.

learn more… | top users | synonyms

0
votes
1answer
71 views

How do I Draw Text at the End of a Countdown?

I am using the program GameMaker and I created a countdown with a variable of time. The countdown works properly and is displayed at the proper coordinates. The issue is when the countdown reaches ...
-4
votes
0answers
75 views

Too little too late for me? [on hold]

So iam 29 and living in the UK, ive been a manager in retail for years and want to make a change, last year I learnt web design/development and got a diploma from it and doing the same with Java at ...
-1
votes
1answer
42 views

Enemy spawning problem [on hold]

I've been trying to get my characters to spawn at random points through out the map. I have a camera which is following my main character (2D RPG Style) around the screen, but I want these "enemies" ...
0
votes
1answer
56 views

Proper way for Player object to communicate with Map object?

I'm writing my first game (in javascript / node over websockets) and am running into a bit of chicken and egg problem, and am afraid how I'm doing it right now won't scale once the game gets more ...
5
votes
1answer
2k views

Unity: how to apply programmatical changes to the Terrain SplatPrototype?

I have a script to which I add a Terrain object (I drag and drop the terrain in the public Terrain field). The Terrain is already setup in Unity to have 2 PaintTextures: 1 is a Square (set up with a ...
0
votes
0answers
38 views

update(100) behaves slightly different than 10 times update(10) - is that a problem? [closed]

While looking into some test failures, I've identified an curious issue with my update logic. This: game.update(100); Behaves slightly different from: for (int i = 0; i < 10; i++) ...
1
vote
1answer
69 views

Vehicle: Boat accelerating and turning in Unity

I'm trying to make a player-controllable boat in Unity and I'm running into problems with my code. 1) I want to make the boat to accelerate and decelerate steadily instead of simply moving the speed ...
-1
votes
1answer
84 views

Changing a Sprite When Hit in GameMaker

I am making a simple little Galaga style game. I want the objects sprite to change whenever it is hit. For example if a laser hits an alien then the sprite takes 1 out of 4 damage to its health ...
0
votes
2answers
129 views

How to set HUD elements position and size depending of resolution [duplicate]

How can I set HUD elements' position and size when changing resolution and maintain the desired layout? All HUD elements (including menu items such as play button, setting button etc) need to get some ...
5
votes
1answer
117 views

Is there a good alternative to a world state data structure?

How do you avoid one big data structure containing all the current world state ? Let's pretend we're in a real-time strategy game, how would you code a skill that decrease mana of units around it ? ...
-4
votes
1answer
70 views

Do total conversion mods require absolutely no programming or scripting skills? [closed]

I tried to look up total conversion and other mods as examples (Counter-Strike, Defense of the Ancients, Gunman Chronicles, Dear Esther, Natural Selection) but it is a bit difficult to find out if ...
0
votes
2answers
138 views

How to write “Hello World” for N64 purely from scratch?

As an experiment I want to code a "Hello World" program for N64 using only assembly code, using no headers, tools, helper files, etc. I just want to write the assembly code bare bones from absolute ...
1
vote
1answer
93 views

GLSL Processed Image to OpenGL

I've tried wording and rewording this question in various forms of search and can't seem to find an answer to it. If I'm wording it wrong and/or just not finding the right information, feel free to ...
0
votes
2answers
71 views

Technique suggestion to render corroded pipes

I've been tasked with an interesting piece of work and I was looking for some suggestions from some more experienced developers on how I should proceed with this. We currently have a lot of data ...
1
vote
1answer
59 views

How was/is playback of music handled on consoles such as the NES, Master System, Gameboy, etc? [closed]

So, I deliberately left out the SNES because AFAIK the music subsystem is basically entirely self-contained. However, on systems like the NES and Gameboy, while there are sound chips, there isn't any ...
0
votes
4answers
423 views

What is the point in using API such as Open GL or DirectX when there are game engines? [duplicate]

I was wondering why today programmers place so much emphasis on API like DirectX, and even OpenGl. As far as I know, you'd need thousands of lines of code to make a simple 3D game using one of the ...
0
votes
1answer
79 views

The sprite will not move in libGDX

When I ran the android application, The sprite image will not move when I press the input keys. I followed a tutorial based on input keys and wish to know what's wrong. Can anyone see what's wrong? ...
2
votes
2answers
228 views

Expandable 2d environment by spawning and controlling individual tiles

what is the best way to implement an environment that is "expandable" in every direction so that when the player moves in any direction a new row or column of tiles that can be manipulated ...
1
vote
4answers
2k views

How to differentiate between instantiated objects in Unity?

I'm currently trying to solve a way to go about the following problem before I start writing any code (the old fashioned pen and paper way) but I'm not sure how I could achieve the following. I'm ...
2
votes
2answers
79 views

Decoupling the entity from whatever controls it

In a lot of games the player can choose whether an entity will be controlled by the AI or by the player. For example in the game Little Fighter 2, the player can choose how many of a maximum of 8 ...
-1
votes
1answer
152 views

Game code difference between consoles (PS3/PS4) and PC [closed]

I'm interested in game development and have some very curious questions. Im a newbie in game dev so pardon my silly mistakes and question and repetition if any. I hope biggies here will guide me and ...
0
votes
1answer
46 views

How can I avoid type checking in the physics side of collision handling?

I have a class responsible for handling the physics side of collisions. When the collision detector spots a collision, it notifies both entities in the collision to take care of gameplay. It also ...
5
votes
5answers
1k views

Technical differences between square and hexagon for a grid?

I'm developing a 2D city-building game and trying to decide on the type of grid. There will be vehicles, so the unit movement is important too. I know there are visual differences for using Squares ...
0
votes
1answer
67 views

How to make player rotate towards mouse [duplicate]

I'm making a top down shooter with Three.js and Box2d. I'm displaying all of the graphics in 3d, but all of the physics are done in 2d, so it's sort of like super smash bros in a way. Anyway, how can ...
1
vote
1answer
385 views

How does the Unity3D entity system work?

I saw the Java Artemis Entity Component System and thought of the entity system in Unity3D. In Artemis for example you can only add one component type to each entity and the logic is not in the ...
15
votes
7answers
3k views

What scripting language would you recommend for a C++ game project? [closed]

By scripting here I mean not just putting config data in a script, but scripting parts of the project like some class methods, test specific game loop, etc. This would be not just to accelerate ...
0
votes
0answers
124 views

How do I combine multiple squares into one Tetris block?

I am learning Phaser by making a simple game—Tetris. I'm having difficulties: Can I use simple rectangles as tetrominoes or they should be sprites? I don't know how make the figure's block ...
0
votes
0answers
57 views

Get Facebook Picture in Cocos2d-iphone V3

I'm trying to get the profile picture from Facebook, but I'm getting the following error: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImage ...
1
vote
0answers
78 views

How to write a global GameState manager for a game in Java [closed]

My implementation is written in Java: public class GameState { public static String state = ""; public static void setState(String state) { GameState.state = state; } ...
3
votes
2answers
1k views

Update vs. FixedUpdate in Unity

I was told to use Update() for graphics and FixedUpdate() for physics, but sometimes my inputs won't register when I use FixedUpdate(). It works fine if I use Update() for everything though. Should I ...
3
votes
5answers
253 views

What are the legal considerations about making a game with a dynamic age restricted content?

What I mean by this is - is it legal to make a game which asks (or proves) your age during install or on initial load, and then dynamically sets the content to the players age. For example if the ...
7
votes
1answer
2k views

OpenAL - alGetSourcei and AL_BUFFERS_PROCESSED gives junk

Posted this question on SO but got no answers. Maybe somebody can help me here. I recently had a well-working program which streamed WAV and Ogg sounds with OpenAL. I then decided to abstract the ...
10
votes
2answers
703 views

What are the benefits of using an entity ID system?

I'm currently reading the book Programming Game AI By Example. The book mentions assigning unique ID numbers to each entity in the game. Often when entity A needs to contact entity B, A gets a ...
-1
votes
1answer
78 views

Match-3 Shuffle Required?

How can I detect if there are no more potential matches possible and therefore a shuffle is required?
8
votes
4answers
632 views

Infinite 3D Cave in Unity

A friend and I are hoping to make a game in Unity in which you fly through an infinite 3D cave that can twist and wind in any direction (though obviously not to the point that the turns are impossible ...
15
votes
1answer
2k views

How can I mock Google Play purchases?

I would like to know what best practices should I do for testing the functionality when a user buy an item/power-ups via Google Play and purchased with real money? For example, basically, creating a ...
0
votes
1answer
48 views

How to find the right direction to plug a sword into a rig's hand after projecting it?

I've downloaded BVH animations and projected it following a book. I can now see a 3D moving rig and it looks alright. The problem is, now I want to plug a sword on the hand of the rig, but I don't ...
1
vote
1answer
1k views

Basic hierarchical component access in Unity: GetComponent vs. Find

I'm just learning to develop in Unity. One simple thing I'd like to do is change the colors of objects programmatically. I have a compound asteroid prefab object, in which the meshrenderer and ...
43
votes
8answers
9k views

Event-driven Communication in a Game Engine: Yes or No?

I am reading Game Coding Complete and the author recommends Event Driven communication among game objects and modules. Basically, all living game actors should communicate with the key modules ...
0
votes
1answer
122 views

try to create CCSpriteFrame but get nil values

I'm trying to animate a CCSprite in cocos2d v3 following this question, but I'm getting the following error message in Log: Terminating app due to uncaught exception 'NSInvalidArgumentException', ...
1
vote
1answer
60 views

Clay Jam continuous path/tap

I saw this game Clay Jam, that the user can create a path in the sand. The path is a continuous one, and it can varies from a single point to curves. How one can develop smooth and continuous paths? ...
-1
votes
1answer
113 views

Size of modern games [closed]

As a non-game developer, I'm always stunned by the sheer size of modern games. For example, last night I downloaded Killzone for my PS4 and it clocked in at over 30GBs, which to me is absolutely ...
12
votes
1answer
1k views

What research areas exist in game programming? [closed]

I'm currently in a group that researches network optimizations and various distributed applications, I'm much more interested in games but more from a research side.Is there a resource that focuses on ...
4
votes
1answer
315 views

What are some great papers/publications relating to game programming? [closed]

What are some of your favorite papers and publications that closely relate to game programming? I'm particularly looking for examples that are well-written and illustrated, and/or have had a profound ...
5
votes
1answer
168 views

Best way to organize models with multiple meshes and textures?

I have character models which have different parts, ex: upper body, head, lower body; each part is a separate mesh in the same model. Each part has several textures associated with it (diffuse, ...
2
votes
4answers
829 views

How to make a game without OOP? [closed]

I am currenty studying game development and practicing making games. I use a lot of OOP in my games. For example, each missile that is shot is an instance of a Missile object, and added to a list of ...
3
votes
1answer
226 views

How to convert a SDL window to a SDL surface? SDL 2

I am trying to make a paint program and there is a sdl function called IMG_SavePNG() which requires a surface and destination file. How can I turn what I see in the window to a surface?
2
votes
1answer
99 views

Where should the collision response/resolution code go?

I've got a collision response/resolution function that does the same for any pair of two entities. It's is in the World class right now. But right before that function is invoked, I have some ...
0
votes
1answer
112 views

Why does my SDL code crash when I move the mouse over the window?

Whenever I move my mouse below where the image renders in my game, the SDL window crashes and closes down. I have narrowed the crash down to the bit of code where I check to see if the Escape key ...
0
votes
1answer
22 views

Restarting a game be resetting an object [duplicate]

In a game I made, I want to restart the game when the players presses a button. I have an instance of a Game class, which is where most of the game happens. I though that I could simply initialize ...