Questions tagged [game]

For questions requesting reviews of game development code.

Filter by
Sorted by
Tagged with
79 votes
6 answers
231k views

Design a chess game using object-oriented principles

I would like to know if my approach is correct and how could it could be improved? Also, is there a way to get rid of the relation between the Piece and the ...
SummerCode's user avatar
73 votes
3 answers
20k views

Monopoly simulator

I was advised by a Reddit user to get my code reviewed on this site. The complete code is on GitHub. ...
ohjuny's user avatar
  • 833
52 votes
7 answers
8k views

RPG Currency System

I just spent the last few days constructing the currency system for my game, and was wondering if you guys had any suggestions on how—if at all—I could improve it. Before I show the code, let me ...
Krythic's user avatar
  • 1,498
43 votes
4 answers
6k views

Rock-Paper-Scissors-Lizard-Spock Challenge

"Scissors cuts paper, paper covers rock, rock crushes lizard, lizard poisons Spock, Spock smashes scissors, scissors decapitate lizard, lizard eats paper, paper ...
Mathieu Guindon's user avatar
43 votes
2 answers
471k views

Snake game in C++

This is my version of the Snake game, written in C++. How could it be improved, and what general advice would be useful for future projects? ...
Funky's user avatar
  • 950
42 votes
5 answers
3k views

Regularity in the "Rusty Towel of Mutual understanding"

I have the following Java class: ...
Etheryte's user avatar
  • 654
39 votes
4 answers
8k views

Ultimate Tic-Tac-Toe in C

Here is my attempt at the UTTT code-challenge (in response to the the Weekend-Challenge Reboot). Here is what I would like critiqued: I tested the code a few times for bugs, but I may have missed ...
syb0rg's user avatar
  • 21.8k
37 votes
3 answers
2k views

Voxel World Optimization

This is not related to a Minecraft clone. I am currently writing a turn-based strategy game like Final Fantasy Tactics. The game is played on floating voxel-style islands, which are generated from ...
Krythic's user avatar
  • 1,498
37 votes
2 answers
8k views

Weekend Challenge - Poker Hand Evaluation

Weekend Challenge #2 - Poker Hand Evaluation Very early I decided to support the usage of wild jokers, even though I knew that this was going to lead to trouble more work. I also wanted to support ...
Simon Forsberg's user avatar
37 votes
1 answer
2k views

Shift and merge numbers as in 2048 game code

I started to learn Rust last night. Given its parallelization capabilities, I thought a good starting point would be porting my C++ AI for 2048 to Rust. This is the function implementing the shift ...
Jonas Schäfer's user avatar
36 votes
3 answers
2k views

Bush Wanderer - code intended for teaching

I am teaching computing to an AS class and this was their assignment: Bush Wanderer Task 1 Create a 5x5 grid of hashes(#) where the player is an ...
Toby Adams's user avatar
36 votes
4 answers
1k views

Memory with a twist

Description This is the good old game Memory with a twist: Every time you pick a wrong pair, the two tiles you chose will switch their location. So sometimes you might think that a tile is at one ...
Simon Forsberg's user avatar
30 votes
7 answers
29k views

Basic OOP Poker - Deck, Cards and Hands

I decided it would be interesting to simulate a game of Poker. Baby steps at the moment, and eventually I'll attempt to turn it into a GUI. The code I have so far is very basic such as populating a ...
dan's user avatar
  • 303
30 votes
6 answers
23k views

"Guess a number" game

I began the journey to be a self-taught programmer about a month ago and my biggest fear about teaching myself is developing bad habits and not realizing it. I'm looking for criticism on this "Guess ...
Mike Medina's user avatar
30 votes
2 answers
32k views

Pacman game implementation in Java

I assume you've all played Pacman, I mean, most people have. I am a 10th grader, and I am working on building Pacman for my intro to Java class in school. However, the project I'm working on ...
user2279952's user avatar
30 votes
1 answer
1k views

Javascript Minesweeper (with Stack Snippets!)

As Stack Snippets are live on Code Review now, I wanted to do something quick in it as part of rolfl's challenge on meta. And when you make things quick, they probably get dirty. And when things get ...
Simon Forsberg's user avatar
28 votes
5 answers
6k views

A first "Hangman" game in Python

I am new to Python (it's my first language), been coding for a couple of weeks now. I have already made a couple of simple scripts to download and manipulate some financial data, but lately I thought ...
Mike's user avatar
  • 381
28 votes
4 answers
4k views

Self-playing Baseball game

The Demo for what I have made is located here Basically I am trying to make a self playing JavaScript baseball game with the use of no libraries. Is there anything I could improve on in the code? <...
Naftali's user avatar
  • 1,089
27 votes
4 answers
3k views

RPG skeleton, Part 1 - The Character

I've been on a quest to learn C++, and to learn, I've started building a small Role-Playing-Game skeleton to help myself learn the language. I've tried to make sure that I've followed C++ styles/...
Ethan Bierlein's user avatar
27 votes
4 answers
40k views

Simple card game to learn OOP

My goal was to get my hands dirty in OOP by designing and using classes and getting started with inheritance and other OOP concepts. I have written a very small code to play a card Game called "War"....
Inquest's user avatar
  • 405
27 votes
3 answers
2k views

View for Ultimate Tic-Tac-Toe board

I've put together a board for Ultimate Tic-Tac-Toe (What's that?). This is part of the current code-challenge: Code a Ultimate Tic-Tac-Toe Resources: Live demo of my view – For you to see what ...
kleinfreund's user avatar
  • 3,681
26 votes
9 answers
3k views

Countdown Code: 'League of Legends'

I have written some code to track buffs as a side addition to the popular game League of Legends. My code is incredibly repetitive and I also have the issue of not being able to track multiple buffs, ...
Niall Szalkai's user avatar
26 votes
6 answers
30k views

Guessing a unique 4 random digits number

I've created a simple game, in which the user needs to guess 4 digits number between 0-9, generated randomly using Random() Each of the 4 digits are different from ...
Baby's user avatar
  • 362
26 votes
5 answers
2k 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 ...
Phrancis's user avatar
  • 20.4k
26 votes
5 answers
29k views

Non-AI Tic-Tac-Toe program

I'm fairly new to C++ and to game programming itself. Today I decided to build a multiplayer Tic Tac Toe program using only elemental C++ syntax/data structures. I also implemented a text interface ...
leansie's user avatar
  • 361
26 votes
4 answers
3k views

Convert Bitmap Font to Texture Atlas

I wanted to render the textures that comprise a bitmap font glyph onto the screen directly as an Image in libGDX. When you make a bitmap font using a program (such ...
bazola's user avatar
  • 8,579
26 votes
2 answers
2k views

Spin-the-bottle-like game

I've started coding about 3 weeks ago, just for fun and maybe practical uses later. My GF dared me to make a PGM that would replace this dice game where you roll two dice, one with body parts and one ...
LuukV's user avatar
  • 325
26 votes
2 answers
1k views

Please Save My Name

I wanted to create a save game system for my city building game that did not require the player to input a name for the city. It was also important to allow infinite save games, so I could not just ...
bazola's user avatar
  • 8,579
26 votes
3 answers
462 views

A scoring approach to computer opponents

This code is starting to be used within several of my projects, and therefore I thought it's time to get it reviewed. Description The most common application for this code is that there is a ...
Simon Forsberg's user avatar
25 votes
6 answers
6k 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 ...
Clever Programmer's user avatar
25 votes
3 answers
3k views

2048 with GUI in C

0x2048 This is my implementation of the classic game "2048" in C. The instruction to build/run the project (GitHub repo) can be found here. I started with the core game and then built a GUI ...
Gnik's user avatar
  • 882
24 votes
3 answers
5k views

A simple mastermind clone

I made a simple Mastermind clone and I'd just like some tips on what I could do better/different solutions for what I have already coded. If you're wondering what mastermind is, there are, for the ...
Levis's user avatar
  • 241
24 votes
6 answers
24k views

Beginner number guessing game in Java

I am a first year CS student. We are currently learning Java and my latest assignment was to create this random number game. I am hoping to get some feedback on code style etc so that I know what not ...
jjacobson's user avatar
  • 343
24 votes
2 answers
21k views

Texas Hold'em in Java

I have been a programmer for 12 years, mainly ERP software and C development and am looking to make a career/specialty change to Java. I've read it countless times if you want to learn a new language ...
user avatar
24 votes
6 answers
5k 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 ...
Daria M's user avatar
  • 451
24 votes
1 answer
20k views

UDP Network server/client for gaming using boost.asio

I've designed those classes for use in a multiplayer game with possibly very high number of clients for one server. Is this implementation good, or is there something obvious I overlooked or something ...
DarkWanderer's user avatar
24 votes
0 answers
415 views

Rubik's cube mode for emacs

Following is a dumb implementation of Rubik's cube for Emacs. I am not well versed in writing (e)lisp, so I ask for a review and corrections. ...
Srv19's user avatar
  • 455
23 votes
5 answers
4k views

Simple battle class

I'm new to Java, and this code could likely be squashed down a whole heap. How can I make this code simpler and easier to read? chance.base is a percentage. If it ...
Thedudxo's user avatar
  • 333
23 votes
4 answers
2k views

Monty Hall Simulation

I wrote this code as my first self-directed effort and would appreciate any input on things that I've done seriously wrong. I worry that perhaps I'm over-relying on ...
murty's user avatar
  • 333
23 votes
4 answers
21k views

Pong game using SDL 2.0

I've just finished writing my first game: a clone of the classic Pong game for Linux and Mac only. You will need SDL 2.0, SDL_ttf 2.0 and SDL_Mixer 2.0 to compile it. The complete project can be found ...
Chafic's user avatar
  • 585
23 votes
2 answers
15k views

Input handling system using the command pattern

The online book Game Programming Patterns briefly describes the use of the command pattern to handle input in a game. I've attempted to write my own "one size fits all" input handling system based on ...
Chafic's user avatar
  • 585
23 votes
1 answer
6k views

Python - Minesweeper

I'm new to Python (and generally to programming), and I have recently written this Minesweeper game: ...
MrHezi's user avatar
  • 517
22 votes
5 answers
13k views

Tic Tac Toe computer AI

I am creating a TicTacToe game for my college project, and when I finished the code for computer AI, I ended up with a big chunk of code. It allows the computer to make the winning move, stopping the ...
Seeker's user avatar
  • 341
22 votes
2 answers
4k views

Dungeon Crawl game for the terminal

I am learning C++ and I attempted to do one exercise I found: Dungeon Crawl. The goal of this game is to reach the treasure by moving your character along the board. The exercise asks not to use ...
Zanzag's user avatar
  • 392
22 votes
4 answers
2k views

Possible improvements to Risk board game?

Enter risk! This program will roll dice for the game of Risk. The initial input is two numbers separated by a space and if the attackers wish to do a blitz they can add one more space and an "!&...
lukeb28's user avatar
  • 445
22 votes
2 answers
6k views

4x4 tic tac toe

I just started coding 10 days back. This is my first program using classes in C++. It is a two player 4x4 tic tac toe game. It works perfectly. If there are any improvements I can make, please let me ...
vivek1234's user avatar
  • 223
22 votes
5 answers
7k views

Battleships game in Python

The idea is, you enter an amount of ships, for example 10. It will then place 10 ships on a 10x10 grid (0-9). You may enter a coordinate, and it will tell you if it is a hit or a miss. A simplified ...
user avatar
22 votes
1 answer
1k views

MVC in XNA game development - rudimentary MVC GameEngine

I've read a lot about using MVC in game development and it seems to be a good way (speaking of testing, code reusing, etc ...) I created a XNA project and tried to implement MVC. But I'm not sure if ...
Jo David's user avatar
  • 341
21 votes
4 answers
7k views

Rock, Paper, Scissors in C++

I have a fair few years experience with programming, and am currently working in a software development role, writing internal web applications in C#. This is the first C++ code I have ever written, ...
Jessica's user avatar
  • 818
21 votes
3 answers
2k views

How to Train Your Dragon

I started out practicing on implementing the builder pattern and somehow ended it up with this 2 hours later. It isn't really much, but it works and I'm hoping review should bring about a lot of ...
Legato's user avatar
  • 9,819

1
2 3 4 5
39