Skip to main content

Questions tagged [role-playing-game]

A role-playing game (RPG and sometimes roleplaying game) is a game in which players assume the roles of characters in a fictional setting. Players take responsibility for acting out these roles within a narrative, either through literal acting or through a process of structured decision-making or character development. Actions taken within many games succeed or fail according to a formal system of rules and guidelines.

Filter by
Sorted by
Tagged with
9 votes
1 answer
3k views

Very simple Python RPG

I am new to Python and am working on a small RPG game project to practice the language and OOP. I honestly don't know what I am doing though, so before I get into developing the battle system I ...
4 votes
2 answers
3k views

Stats classes for a text-based adventure

I'm learning Python by creating a text-based adventure. I've put the stat creation and storage classes into separate files (modules?), and common functions (ValueError handling etc.) into another one ...
1 vote
1 answer
1k views

Inventory system for RPG

I'm working on a inventory system for a rpg. I want to be able to compare items, restrict access for specific items(i.e. consumables) for specific inventory slots(i.e. leg, head), summarize items ...
2 votes
0 answers
335 views

Inventory and stats for a game with Tkinter

It's an inventory UI and also displays the player's stats. I have been programming for a year or more and I want to improve my code. ...
5 votes
1 answer
380 views

Strategy RPG in Java

I recently got into coding and built a small game in Java to practice and test myself. As I started plugging away at it, it very soon became...not so small. As of this moment, everything works the way ...
3 votes
1 answer
1k views

Character class with name, gender, and inventory list

I am trying to create a class to test my understanding, and it takes an ArrayList as parameter. The decision of choosing an ...
31 votes
4 answers
17k views

Beginner object-oriented text-based RPG

I'm in the process of writing a text-based RPG in Java using object-oriented programming. I'm fairly new to programming and currently learning through CodeHS and coding this within their sandbox, any ...
14 votes
4 answers
8k views

Fight against Enemies (RPG in Java)

I've written a program that simulates a fight between the player and an enemy to gain experience in the programming of such role-playing games. Above all, it was important to me to have good, object-...
1 vote
1 answer
491 views

Basic console game, with combatants and inventory items

I've tried to improve upon my last design of a basic console game, practicing OOP and treating more things as objects. So here is my revision. Is this good software design or is it really bad? I know ...
3 votes
1 answer
95 views

Translate a problem to OO code in Java, especially an RPG idea

I think that I have big problems with object-oriented analysis of a problem and with writing really good, object-oriented code based on the analysis. When I was trying to write an RPG, it struck me ...
2 votes
2 answers
829 views

Calculate the total sum of points that cost to level up a character

I'm learning JavaFX and how to make good code in general. I created a little aplication that let you calculate how many points cost to level up a character stats. But I noticed that I usually repeteat ...
15 votes
3 answers
42k views

Text-based RPG in Java

I'm writing a simple text-based RPG in Java. I think it's a good exercise to practice OO and think about how objects should best interact. I'd be interested in hearing any thoughts! The ...
9 votes
2 answers
1k views

Item implementation for a role-playing game

I'm working on a cross-platform, implementation-independent Python library to make RPG-style game development easier, or at the very least more accessible. This code is designed to run on Python 3.6 ...
14 votes
3 answers
26k views

Character creator for a role-playing game

Goal: Write a character creator program for a role-playing game. The player should be given a pool of 30 points to spend on four attributes: strength, health, wisdom, and dexterity. The ...
7 votes
2 answers
871 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 ...
1 vote
1 answer
204 views

Java Text_RPG Game

I am looking for help with my code, new to programming/development and looking for advice on how to improve. I’ve been having issues with objects made in do loops, ...
5 votes
1 answer
1k views

In-Progress Unnamed "D&D" Style Game (Python 3.5)

Short (Non-Explanatory) Summary of Code I just started learning Python a month or 2 ago, and this (small) 955 line mess is what I've worked on since summer started in June. I am basing it on Dungeons ...
2 votes
3 answers
292 views

Object-oriented RPG in Java, determining the data of a generated location

I've been coding for around a month, learning through CodeHS and coding within their sandbox tool. I am currently working on a text-based explorer/RPG game in order to practice Object-Oriented ...
0 votes
1 answer
1k views

Object-oriented text-based RPG with randomized enemies and loot in Java

I'm currently in the process of creating a RPG in Java in order to practice and learn the ins and outs of the language. I have been learning to code for around 1 month through Code HS, and coding ...
8 votes
2 answers
2k views

Dice roller in Python

I'm trying to get better in Python and decided to rewrite my dice roller in Perl into Python. ...
2 votes
2 answers
1k views

Console-based game in Java to demonstrate Solid principles and abstractions

I've written a console-based demo while learning about the Solid principles. Along the way, I've become exceedingly paranoid about whether I'm writing good code or not. Here is the code I have so far:...
7 votes
3 answers
16k views

Very simple console RPG

I'm currently teaching myself C# and am looking for some feedback on my most recent project, creating a very simple c# RPG. I wasn't concerned at all with the balance of the game (it's VERY easy to ...
6 votes
3 answers
6k views

Learning C++ with an RPG game

I'm particularly focused on learning object oriented design right now there's some SDL code but it does nothing save generate a window. For now I am working with text until I get a better ...
5 votes
1 answer
1k views

Python Character Creator Program

Q1. Can the following code be made more efficient and simple? Q2. How is the general structure of the code? Q3. Would this be better written in def/classes? If yes, what would the code look like? ...
13 votes
3 answers
5k views

Character classes and character creation for an RPG (early prototype)

So, I've only started to learn actual programming about a week ago (only did some basic matlab scripting before) and because I wanted a challenge I decided to start with C++. To get more familiar ...
4 votes
1 answer
133 views

Calculator for magic item creation in RPG

I have created a simple calculator that will assist in creating magic items from the tabletop RPG Pathfinder. Here are the full requirements, and if you want a more concise version, here is a player ...
8 votes
3 answers
10k views

Save and load the state of a role-playing game using Pickle

I am working on a text-based adventure game and I'm implementing new features, one of these features being saves and loads. This code works, and I know that there is a more efficient way of coding it, ...
1 vote
2 answers
283 views

Simple RPG - Alice fights Bob

This is designed to be a simple example of a RPG battle, for a talk I hope to give. The rules: Alice and Bob both have 5 hit points and inflict 2 damage. Each turn, Alice attacks Bob, and Bob attacks ...
5 votes
3 answers
650 views

Text-based RPG (WIP)

I wanted to see how this code looks, what can be improved and how those improvements can be implemented. I'm still new to C++ so I hope it isn't too sloppy. ...
0 votes
1 answer
440 views

RPG for a school project

I'm trying to make an RPG game and I would like to make the code a lot shorter. This is only the first floor but there will be 5 floors. To advance to the next level, you have to defeat the boss of ...
6 votes
2 answers
832 views

Browser-based Mafia game in PHP

Because I'm rather new to PHP and Object Oriented Programming, I'm often looking for some practice. Thus I decided to focus on making a browser-based Mafia game that should work like a Dutch variant: ...
6 votes
2 answers
1k views

Reading large amount of player properties from CSV

I have written a class with a function that reads out the CSV from the webpage and creates an object with it. The class seems too big - it seems very unoptimized, prone to mistakes and it's not very ...
1 vote
1 answer
222 views

A Generic "Augmentation" Collection for RPG Attributes/Resistances/Aversions

After having showed a previous implementation of my "Resistance System", I decided that I was completely wrong about how I had been going about things. The system, as it had been presented, was ...
2 votes
1 answer
178 views

Custom resistance system for role playing games

For the game that I am creating I came across the need for an Elemental-based Resistance system. By that I mean, a system which would allow the player to mitigate damage or take more damage based upon ...
3 votes
1 answer
2k views

Classes representing items in an RPG game

I wrote a little program in C# that contains classes representing Items in RPG game. I wanted to have access to all inherited classes parameters from list contains parent Item class instances, so this ...
6 votes
3 answers
6k views

JavaScript text-based RPG

I'm making a text-based RPG in JavaScript. It works but I'd like to know how to improve it, like code-wise. Also, I want to know how to make it run on anything other than Internet Explorer. ...
6 votes
1 answer
3k views

Generating RPG Characters (Objects)

I am a beginner Java programmer. I have just finished up an assignment and would appreciate some advice and/or constructive criticism on my program. I am trying to ensure I do not advance my knowledge ...
3 votes
2 answers
3k views

RPG character, levelUp system and stat checking for object usage

So I am working on a small RPG in Unity. Right now I am writing some business classes, POCOs, that have no link to Unity except being in the required C# flavor and using Debug.Log and stuff. I have ...
3 votes
3 answers
10k views

Dynamic class instancing (with conditional parameters and methods) based on a dictionary

In an RPG game I'm developing, after building a base Weapon class, instead of having many subclasses of Weapon, I want the ...
11 votes
2 answers
5k views

Object-oriented dungeon crawler game

I am creating a simple dungeon crawler game. My program runs and does what I want it to do so far, but I am starting to run into difficulty with adding new functionality, and I think one of the main ...
3 votes
1 answer
1k views

Randomly generated world for text-based RPG

I am developing a text-based RPG with a randomly generated world space. I have built a light engine to produce a world for me and fill it with 'world objects' like trees, mountains, villages, and the ...
3 votes
1 answer
4k views

Text-based RPG using OOP

I started this project after reading Chapter 3 of Python 3 Object-Oriented Programming by Dusty Phillips. At first I just wanted to create RPG-based objects to practice inheritance, but now I am more ...
3 votes
2 answers
2k views

Text-based RPG game in C++

This is a text-based RPG game I've made in C++ and would love some review on it. I am a 100% complete newbie with maybe 2 weeks of C++ experience so I'd love some lessons on what I did wrong and how I ...
4 votes
1 answer
69 views

Simple React and Flux application to heal a player

I'm just trying to learn the basics of React and Flux, and the above code works and I can see it works nicely. index.js ...
5 votes
1 answer
142 views

RPG Stack Exchange chat bot

Recently, I made a small bot to simulate an ASCII-based RPG in a chat room. The other users can enter commands (.left, .right, <...
0 votes
1 answer
1k views

Classes (and maybe subclasses) for characters in a Python game

I am practicing classes and subclasses in Python. I'm not sure whether it might be useful to add a subclass to the following code, instead of just adding methods to the class. ...
6 votes
1 answer
209 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'...
2 votes
1 answer
1k 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 ...
2 votes
1 answer
179 views

Range class to represent limited values, like HP, Stamina and so on

I made a small script for Unity3D, meant to be use as GameComponent for GameObjects. It is supposed to represent values that have a max value, and an actual value. In games that would be the case, for ...
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/...