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
31 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 ...
0
votes
4answers
374 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
84 views

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

As an experiment I want to code a "Hello World" program for N64 using only assembly code, and using no headers, tools, helper files, etc. I just want to write the assembly code bare bones from ...
-1
votes
0answers
30 views

Want to start game dev(have some programming and OOP knowledge in java) [on hold]

I am 16 years old next year going to start high school and study Pure Mathematics and Computing A level. I would like to pursue a career in either game development or in software development, I would ...
-7
votes
0answers
80 views

Using C++ on video games? [closed]

I know the best game programming language is C++ but some game engines don't support C++ (like Unity3D). So my question is: how can I use C++ on my games? I've been learning C++ since 3 months
0
votes
1answer
47 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
69 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
102 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
43 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 ...
0
votes
2answers
103 views

How to set HUD elements position and size depending of resolution

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
5answers
999 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
61 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 ...
0
votes
1answer
57 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 ...
0
votes
0answers
61 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
0answers
109 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 ...
1
vote
0answers
74 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
803 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 ...
10
votes
2answers
688 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
64 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
558 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 ...
1
vote
1answer
306 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 ...
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 ...
0
votes
1answer
805 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 ...
0
votes
0answers
51 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 ...
0
votes
1answer
96 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
57 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
110 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 ...
5
votes
1answer
153 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
2answers
219 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 ...
2
votes
4answers
785 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 ...
2
votes
1answer
97 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
102 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 ...
3
votes
1answer
203 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?
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 ...
0
votes
0answers
26 views

How can I handle collision detection between many objects efficiently? [duplicate]

I have made a game that runs poorly. I suspect that the way that I programmed the collision detection in the game loop could be the problem. My game has two player-controlled tanks which fire ...
0
votes
1answer
102 views

What coding issues can be significant in damaging the performance of a game? [closed]

I have just finished a 2D game in Java that I've been working on for a while. I found that on some computers it runs fine, and on others (which are not particularly slow in general), the game runs a ...
1
vote
2answers
137 views

How can I make different levels in a game?

Let's say I was working on a platform game. Each level has an exit. When the player reaches the exit, the game switches to the next level. What would be the best way represent and switch to the next ...
1
vote
2answers
130 views

Should the game update loop compensate for slowness

I am building a game engine and considering the design for the core game loop that will drive the game. In the most basic form, the implementation looks similar to this (in pseudo-code): while ...
-1
votes
1answer
50 views

the basic or important thing that i need to learn from C# [closed]

I started to learn C#, and it's really big and have many things, but i want to learn the important things that can i use to programming my game. any advice ?
3
votes
3answers
359 views

Limitations of p2p multiplayer games vs client-server

I am reading up on multiplayer game architecture. So far most of the articles i've found deal with the client-server model. I'd like to know what are the limitations for using a p2p architecture? ...
0
votes
1answer
214 views

Creating a knockback effect

I'm fairly new to creating a 2D game in java and I'd love some help. I'm trying to create a sort of knock back effect the enemies have on you. So when you are touched by a enemy you will: lose life ...
0
votes
1answer
114 views

When to use class/objects for graphics [closed]

I am fairly new to game development, but I have a good programming background with object oriented programming. But with games, I do not know when I should use an object (or class) for an entity on ...
2
votes
1answer
793 views

Game development with D programming language [closed]

I have recently found out about D programming language and its basic features. It seems D is quite powerful alternative for C++ and more effective at some points. Also D can interface to C, but ...
0
votes
3answers
233 views

Creating a hostile Mob

So I'm currently developing a 2D top down view java game. I have a mob called "Mutant" that currently does nothing. It generates a random number and depending on that number moves a few pixels in that ...
1
vote
1answer
129 views

How do you get player to interact with level?

I suffer from this problem where I have say a class called Player and a class called Level. Now the only way I can figure out how to say make the player interact with the level is if I do something ...
0
votes
1answer
75 views

Map editor undo function - Not actually setting values to tiles

I'm currently attempting to implement an undo/redo function for my map editor for a tile-based 2D platformer game made with XNA. I've found a lot of resources online about this and decided to try to ...
2
votes
0answers
73 views

Where can I find game postmortems with a programmer perspective [closed]

There are a number of interesting game post-mortems in places like GDC vault or gamastura.com. The post-mortems are generally give with a CEO/manager perspective or a designer perspective, or, more ...
1
vote
1answer
163 views

Are techniques from Warioware: D.I.Y actually useable in creating an actual game?

In a game called Warioware: D.I.Y, it teaches you how to create minigames with certain forms of AI. Can I use the techniques shown in this game to actually develop an advanced game?
-1
votes
3answers
262 views

Do I need “cube subclasses” to represent the blocks in a Minecraft-like world?

I would like to try to develop a very simple game like Minecraft for my own education. My main problem at the moment is figuring out how to model classes that represent the world, which will be made ...