Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [battle-simulation]

Battle simulations are simulations in which theories of warfare can be tested and refined without the need for actual hostilities. See the Wikipedia article on Military Simulation for more information.

5
votes
3answers
86 views

Most basic fantasy combat simulator

I was wondering if anyone had anything to recommend for how to clean up the code I made below. Essentially I am asking if my code is messy or not and if there are any recommendations for my ...
6
votes
1answer
121 views

First C# RPG game and project as a beginner [closed]

I wanted your opinion on the first RPG game I made in C#. What things can I improve on with the code? Events: ...
4
votes
1answer
123 views

Text-based adventure and combat game

I'm new to coding and this is a text based adventure game with combat. Sleep and choice functions based on idea from https://codereview.stackexchange.com/a/52292/179642. Map idea from Codecademy ...
4
votes
3answers
173 views

Java RPG battle simulator

I'm coding a turn-based RPG battle simulator (text based) in Java. I'm doing this as an exercise/project to learn OOP design. I've coded something similar in C, but just porting that code over to ...
5
votes
3answers
584 views

Text-Turn based dueling game

I have recently started to learn python, and I have made my first fighting duel game. I'm planning on adding more stuff in the future like shops and items so you get a way to spend gold, but for now ...
1
vote
1answer
177 views

Text based game in Java

To help with learning code in my class, I've been working on this text based game to keep myself coding (almost) every day. I have a class called BasicUnit, and in ...
2
votes
2answers
270 views

Concurrent hero vs monster program

I have made a simple concurrent program. It represents a battle between a hero and a monster. I am beginner in concurrency so I just want to hear your opinion. What are bad and good sides of my code ...
5
votes
2answers
136 views

Random missile generator and air defense system

My task in C#: Random missile generator generating 2 types of missiles each second: ThermoNuclearBomb and FacetBomb Missiles ...
4
votes
1answer
174 views

Python3 Terminal Based 'Combat' System

This is my first leap into Python and I had a lot of fun writing this - it is not complete yet. I'm interested in adding a perk system next, instead of generically increasing stats I'd like the ...
7
votes
2answers
134 views

Revised version of my Python text game

Following all the good notes I've received from my question, I've edited my code quite a lot, so there are probably even more problems than there was before. Anyway, here are some details of the ...
0
votes
1answer
99 views

PHP fighting system

I'm a young beginner in PHP and all. I'm just trying to make a fun game while learning by myself so you will easily spot errors. The code is working, yet it need some serious improvements as this is ...
3
votes
1answer
696 views

C++ game: fighting three enemies

It's been a month or so since I started learning C++ by myself online on youtube. This is my first ever "game". I call it "game", because you don't do anything other than choose which attack you do, ...
3
votes
1answer
687 views

Automated Java fighting and battling simulation

This is my second post since I've started coding/joined this site so be ready for some bad code and beginner questions! I am just playing around with Java right now, as I believe this is a fun way to ...
1
vote
2answers
172 views

Soldier class, with health points

Recently I completed the encapsulation lesson and I made a simple android app implementing encapsulation, I had difficulties understanding encapsulation. My Soldier class: ...
4
votes
0answers
338 views

Customizable Multi-Agent Predator/Prey Simulation

I am trying to create a highly customizable "battle simulator". The default setup is a predator/prey relationship (no births); however, I am trying to create code such that it's easy to add and ...
1
vote
1answer
55 views

Exurbb (automated turn based) Battle Simulator Revised

I have revised my other question's code which you can find a link to here. This is just an automated turn based battle simulator which means everything comes out about 1 second at a time, and player ...
4
votes
1answer
177 views

Exurbb (automated turn based) Battle Simulator

I have created a semi-medium program (in size) to simulate any battle for all of your battling needs! I would like some feedback on how it is (not to great at programming in c++) or you can just put ...
4
votes
2answers
87 views

Slaying a dragon, the old-school way

Is the below program written in the most efficient way possible? I am new to Java Script and am just trying to make something basic so I can practice as I learn more. The way I wrote it the program ...
0
votes
1answer
116 views

Passing C++ objects by reference for participants in a simulated battle

I just started watching C++ videos couple of days ago. I tried taking everything I learned about classes and passing by references vs values. The main question I what would like to know is this the ...
4
votes
1answer
176 views

Small text-based fight

I plan to flesh this out into a hopefully full 2-3 minute text adventure game, and the most fun part to start with is the combat. The fight function down at the bottom repeats itself quite a bit, ...
3
votes
2answers
928 views

Python text-based fighting game

I wrote a fighting game. My code is rough. I would appreciate constructive and critical feedback please. The goal is to become a better programmer/developer. (I wrote this using 2 Files - The Main ...
17
votes
2answers
2k views

Discount Pokemon Battles

I have decided to create a discount Pokemon battle simulator using a module called guizero. It's basically a wrapper for Tkinter that is easier to learn. Recently, ...
3
votes
2answers
122 views

Damage function for a game

For my game I have a function that resolves FireOrders between units. The function is being called a ton of times and it's only being extended from various classes. ...
3
votes
3answers
1k views

Pokemon-style text battle game

I took a crack at making a Pokemon-style text battle game in Python 3 to practice object-oriented programming a bit, inspired this project on Reddit, but I did not follow every instruction. ...
10
votes
1answer
1k views

Pokemon battle simulator

I learned Python and Pygame and now have coded a few games. For the last few months I have been working on this "luck free" pokemon battle simulator. I feel my program runs well in the current state ...
12
votes
1answer
325 views

Cat fight (with rockets)

My code is attempting to implement FP in an efficient / readable manner into some of my video games. I realize this may be a bit subjective, but I feel there is enough merit / objectivity to be of ...
18
votes
4answers
994 views

Battle game in one 900-line class

A little bit of background; I'm a high school student in my junior year and I attended a tech competition last year when I enrolled in my high school's CS I course. Below is what I submitted to the ...
4
votes
1answer
164 views

Simple text based game (LPTHW)

For Learn Python The Hard Way exercise 45 I made a small text game, that took a few hours. Since classes were used and classes were a recently brought up concept in the book, I was wondering how this ...
3
votes
1answer
178 views

Beginner attempt at a text adventure v2

Based upon feedback received in this post I've amended my game and would very much appreciate further feedback on it's current state(work in progress) and any suggestions on what I could implement in ...
4
votes
2answers
676 views

My beginner attempt at a text adventure

I'm a beginner working on a text adventure. It's quite bare-bones at this point but I would appreciate feedback before I continue and the flaws in my code become further ingrained. I plan to add an ...
6
votes
2answers
798 views

Algorithm to say if win or lose using player's rating and randomness

I wrote a small simulator to understand the Elo rating system. I can create players, matches and tournaments, and I want to be able to predict the match ending depending on the rating of each player ...
3
votes
2answers
269 views

Random RPG Battle System in Lua

This is my battle system that I wrote in Lua. Bear with me on this one, this is my first real program that does something besides write hello world. If there is anything that I could have done ...
3
votes
1answer
494 views

Beginner code for a text-based battle simulator

I wanted to see if anyone would like to review the existing code I have for a beginner program that simulates a battle. I have learned a heck of a lot while doing it, and I had a few questions ...
6
votes
1answer
118 views

First drafts of Ultima-like adventure code

A friend and I watched most of the thenewboston syntax videos for Python 3 and spent 2 hours attempting to piece together our first program / generic text adventure. First experience with coding. I'...
0
votes
1answer
51 views

Dueling beings on a grid

I'm remaking an old program of mine in Clojure. It involves "Beings" (generic entities capable of attacking and breeding) let loose in a confined space. I've noticed a pattern of taking a record, ...
10
votes
3answers
858 views

Text-based turn-based fighter game

To get a better understanding of objects/methods, I wrote a text-based, turn-based fighting game. I want to expand by adding new characters with new moves (one of which can alter the way other moves ...
7
votes
3answers
262 views

Risk battle simulator v2

I wrote a Risk battle simulator that returned the odds of every possible outcome and put it up to be reviewed here. I used the comments to improve it, and am wondering if it can be optimized further. ...
5
votes
1answer
135 views

CIS194: Risk!-style “battles”

After reading LYAH and using RWH as a reference, I've been doing the exercises from CIS194, which is often suggested to beginners on irc://freenode.net/#haskell and ...
1
vote
2answers
3k views

Fighting game in Java

I want a better way to do the if statements, and if there is a better way to do it. How is it more efficient? Is there something like a ...
5
votes
2answers
304 views

Metal King: A JavaScript Game

I started to learn programming just a few days ago. And I've written code for a simple original game for practice, using some knowledge of JavaScript that I have gained so far. Is the following code ...
15
votes
1answer
1k views

Battle Tanks game

I created a simple 2D game that I made for myself in C++ with SDL2.0 + OpenGL + Box2D, but I'm insecure about the code and structure because I developed the game using everything I've learned on the ...
7
votes
2answers
555 views

Small “Grid Battle” console game

This is my first attempt to make a game on my own. I just want to see if anyone has any comments. Am I doing things, at least, sort of alright? Is there a better way I could deal with the input? <...
3
votes
1answer
1k views

Battle simulator RPG

I just learned about classes today and wanted to find a way to implement them that interested me. I whipped up this little battle simulator and would like any feedback and critiques as well as any ...
5
votes
2answers
643 views

Mass Army Combat Simulator

I am currently teaching myself C++ in my spare time. I created the below "game" to simulate combat between an army of humans and an army of skeletons. Is there a simpler or better way of creating this ...
8
votes
3answers
694 views

Risk battle simulator v1

I've written a program to find the odds of either side winning a battle in Risk, and how many men they would have left. I've finished, but I feel that it can be improved since it doesn't function if ...
2
votes
3answers
51 views

App for a tabletop RP that generates hits and misses for weapons

I'm looking for tips on cleaning this up. I think it's legible, but it sure ain't pretty. In particular, I'd love to clean up the hitCheck function. I've dealt with ...
6
votes
4answers
2k views

Artillery game C++ practice project

I've completed a program as a learning experience to make sure I've got the concepts down. I found a practice project online and decided to try it out. The program compiles and runs exactly how it ...
17
votes
2answers
12k 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 ...
1
vote
2answers
153 views

Army strength based on level and modifiers

Right so I was doing a quick project, and sought a quick way to finish one section of my Python code. I handed it in, but I'm well aware that it's bad code, but I was wondering if there was a good way ...
8
votes
2answers
4k views

Text based fight game

I learned code about a week ago and I wanna hear some recommendations and stuff I could add to my code. This is a fight system I made for my text based game. Please tell me what I could do better. ...