For questions requesting reviews of game development code.

learn more… | top users | synonyms

10
votes
6answers
1k views

2048 merge function

From: Principles of Computing Part 1 Course on Coursera I got -2 pts on my OWLTEST which uses Pylint for style guide. The error states: Too many branches (17/12) function "merge", line 7 ...
4
votes
0answers
10 views

Moves box in direction of touch, and has wraparound when reaching edge of screen

Part of me thinks that it would be simpler to ditch Apple's move API and just updated position with a timer. I know that's what I did with a JS canvas snake game I built a while ago. But I'm also ...
9
votes
3answers
544 views

Lights on: playing with buttons in Javascript

First play with the game a little bit, and it is quite fun (a little hard but very satisfying when you win, be sure to put it full page): ...
8
votes
1answer
83 views

Pattern-finding game

This is a game that is supposed to be based on strategy and guessing. The letters need to match in a ABCD fashion on each button on buttons[0] - ...
4
votes
2answers
64 views

Simple RPG Skeleton, Part 2 - The Entity, and a SpecType

This question is a followup to Simple RPG skeleton, Part 1 - The Character. This is the second "part" of my development of this skeleton, and it now includes two new classes, ...
6
votes
4answers
85 views

Simple number theory game, pt. 3

More refactoring based you guys' great feedback. This time around I worked on using global/local variables properly and efficiently, putting return values to use, renaming variables so that the code ...
7
votes
2answers
80 views

Simpler number theory game

After receiving some awesome feedback in my first post yesterday, I was able to grasp the "building block" method of creating javascript in chunks and putting them together to create ...
10
votes
3answers
603 views

Simple number theory game

I just started JavaScript about a week ago. For my first project, my goal was to use my knowledge of basic JavaScript to create somewhat of a "thinking computer brain," so to speak. I wasn't focused ...
9
votes
3answers
355 views

Chances to gain yards (text simulation game)

I'm making a text simulation game in C# and I've made the calculations and all. But I know there's a better, faster and more efficient way in doing this. Basically, the first calc is that there's a ...
13
votes
2answers
414 views

Full C++ Snake game

I managed to finish my approach on the legendary Snake game. You move around with the WASD keys. I would like to hear your opinion and maybe ideas on how I can improve frame rate because now it sort ...
10
votes
2answers
59 views

Roguelike-ish template game

I have created a simple program that is supposed to be the core of a roguelike game. The program uses ncurses, and all that is supposed to happen is you choose a race and class, then choose an arena. ...
18
votes
4answers
2k views

Simple RPG skeleton, Part 1 - The Character

I've been on a quest to learn C++, and to learn, I've started building a small RPG skeleton to help myself learn the language. I've tried to make sure that I've followed C++ styles/standards ...
2
votes
0answers
60 views

Tic Tac Toe algorithm

I made a Tic Tac Toe game, but I think there's a lot of hard-coding and useless variables. Can you check it out and tell me what I can improve on? It works, but it has a couple of bugs. ...
17
votes
6answers
3k views

Rock, Paper, Scissors, Lizard and Spock

I am currently done with this little Rock, Paper, Scissors, Lizard, Spock game in JavaScript. The game is working fine, but I am not pleased with the code. Is there a way to refactor these ...
6
votes
2answers
83 views

Basic game with moving objects in Swing

This is a simulation attempt of an "old-style game", where a "car" (nothing more than a red rectangle) must dodge some "obstacles" (blue squares) falling from the upper edge of the frame. If an ...
2
votes
1answer
243 views

Game server packet handler - follow-up

This is a follow-up question: Game server packet handler I have applied most of the suggestions and now the code looks like this: ...
12
votes
3answers
120 views

Weighted Probabilities with Integers for Game

The idea here is to pick a skill at random for the player each round. Four skills will be chosen, they are all random, and the same skill can repeat multiple times. The player has a skill level for ...
7
votes
1answer
74 views

Python snake game

If anyone has the patience to take a look at my first python snake game, I'd be very grateful for any feedback. I am fairly new to programming and Python, but am looking to improve so any constructive ...
5
votes
1answer
81 views

Inventories, Containers and Filters

Coming off a comment on this question, I figure it cannot hurt to post my Inventory work here as well. Basically, I have Item, ...
6
votes
1answer
70 views

Builder - A 2D Minecraft clone

I was poking around on my Raspberry Pi that I hadn't turned on or used in a while, and I stumbled upon this Python script that I wrote ~1.5 years ago, and I was intrigued. Essentially, it's a 2D ...
15
votes
4answers
386 views

Entities and the things they do

So I have an Entity, which is responsible for providing an abstract base for other objects to inherit. (Like Actor objects, ...
10
votes
0answers
94 views

Racetrack pathfinding and path following

Racetrack The August community challenge is to implement a program that plays the Racetrack game. Each player starts with an integer position on a square grid. On each turn, the current player can ...
11
votes
0answers
112 views

Racetrack in Java

Racetrack: The August community challenge is to implement a program that plays the Racetrack game. Each player starts with an integer position on a square grid. On each turn, the current player can ...
7
votes
1answer
44 views

Slick Lags when drawing 800+ circles

I am making a space-themed shooter game, and I need to render many "lasers" at the same time. I am using the library Slick2D, a wrapper around ...
6
votes
1answer
91 views

Do you want to be a super (voxel) hero?

I have implemented an upgrades system in my Unity3d game, and I am pretty sure that I am not doing things in an optimal way. Any advice regarding best practices would be much appreciated. The idea is ...
1
vote
0answers
51 views

Depth First Search for percolation to find clusters in Go game

I have some questions about Depth First Search and whether I implemented it correctly. Below is a more thorough discussion. The graph in question is a randomly colored square grid (I use 3 colors). ...
7
votes
3answers
858 views

Game server packet handler

I am developing an online game and my code is getting pretty hard to work with. I would appreciate any suggestions how to clean it up or make it simpler to work with. Thanks for any suggestions. ...
9
votes
1answer
104 views

A low tech approach to measuring game speed

Whilst developing a game I needed a delay routine capable of doing delays ranging from 0.5 sec to just a few msec. The obvious choice was to use the BIOS delay function 86h on int 15h. In a true real ...
3
votes
1answer
53 views

Graphic object class

I am trying to implement graphic objects that can be either Sprite, Base, Point or some ...
3
votes
2answers
89 views

Connect Four game in Java

I was wondering if you guys could point out any mistakes I've made in this program, and how to improve the code. It's a simple console-based Connect Four game. You use 0-5 to place your piece in the ...
8
votes
2answers
187 views

Procedural World in Unity3D

The idea here is that rather than placing objects directly into the scene, these building objects are instantiated at run time and placed in the correct locations. This gives me full control over ...
13
votes
2answers
647 views

Pokémon style battle game

I haven't been learning Python for too long and I was just wondering how this Pokémon style battle looks? It's based off of this: Turn Based Pokémon Style Game. It's my first proper time using ...
4
votes
1answer
50 views

Xonix game in JavaScript/Canvas: detection of conquered regions

I've written a Xonix clone in Javascript/Canvas. It seems to work fine. However I would like to refactor the code of detecting conquered regions which seems to be bulky (see methods ...
2
votes
1answer
86 views

2D Tile Engine game

The game basically has a player (PlayerCharacter class) that can move around the world. It has a 2D world made of tiles managed by ...
12
votes
2answers
101 views

Let's (path) find A Star

Yesterday I found myself struggling with creating an A * algorithm in Java, but this morning I finally figured it out, so I would love to hear what Code Review has to say about it! The goal here is ...
4
votes
1answer
51 views

Simple Snake with pygame

I've been reading Dive Into Python and I needed to actually program something before I forget everything I learned. So, this is my first Python project (apart from trying the basics and playing with ...
21
votes
5answers
802 views

Cardshifter game lobby

We've been hard at work creating a browser-based GUI/Client for playing the Cardshifter TCG for the past week or so. Today, I just finished doing a pretty complicated layout for the chat lobby, along ...
7
votes
2answers
56 views

Game of Runes: revised version

I have created a game called Runes in C. It is similar to Chess, but has a bigger board and different pieces. I would like to know how I can improve the code, for example, with user interface ...
7
votes
1answer
47 views

Game of Runes: a similar concept to chess

I have created a game called 'runes' in C. It is similar to Chess, but has a bigger board and different pieces. I would like to know how I can improve the code, for example, by adding proper error ...
4
votes
1answer
36 views

Pong-like game built in Love2D

I just started learning programming in the past two or three months. I started with Python, and now I'm learning lua. I started game programming this week and this is a game I made with the Love2D ...
5
votes
2answers
132 views

Two-player Mancala

After playing Mancala with my brother, I thought coding the game would be a fun project to practice my abilities in C++. I am relatively new to programming, having only done a few small projects to ...
12
votes
1answer
80 views

Embedded FizzBuzz

Recently, I have started to enter the realms of embedded systems programming. And, as my first major project, I thought I'd do the obvious: FizzBuzz. However, this is a little different: this is a ...
4
votes
1answer
86 views

2048 Game Algorithm in Java

I created a 2048 game clone in Java. However, I am only writing the fundamental algorithm for the game such as the movement, the losing condition, and the algorithm to generate a new tile. This ...
3
votes
1answer
71 views

Implementation of a VertexBufferObject class

I have been working a simple 2D Game using C# language with OpenTK (OpenGL wrapper/binding for .NET). It uses a lot of sprites. Since it uses lot of sprites, I think it's important to make everything ...
3
votes
2answers
60 views

War playing cards based game

How can I make this "War" card game code more visibly pleasing? ...
8
votes
1answer
79 views

Snake game for Windows console

I would apreciate any suggestions on how to make my code better and more efficient. ...
6
votes
1answer
48 views

Input processing/state machine function

I'm making a Mario clone in pygame and I have just wrote a function proccesses inputs and acts as a state machine for Mario. Everything is working just as I want it, but I was wondering if you can ...
4
votes
1answer
115 views

Class for modifying stats of units

I am specifically looking for input on naming ModifierCalculator and Modifiers. I would also appreciate input on whether ...
9
votes
2answers
92 views

Simple inventory system - Part 2

I've refactored my previous inventory system, and added a few features like removing items from the Inventory class, easily obtaining the current selected item ...
12
votes
2answers
118 views

World Generation for City Builder

I decided that I wanted to add some spice to my bland looking city maps, so I created a couple of algorithms to add water to the map. I also added a "marshlands" setting that would just randomly ...