Giter Club home page Giter Club logo

text-fighter's Introduction

Text-Fighter

Hits

Text Fighter is a text-based RPG game. It's still in early development (Alpha stage), so there may be a lot of bugs/missing features. There isn't really any set goal or missions yet, but there's still a lot of things you can do. Fight a variety of enemies to get coins, gain XP, and unlock achievements. You can spend money on more weapons/supplies, and unlock items by leveling up. There's even a casino where you can gamble your hard-earned coins. If you aren't one who likes playing by the rules, you can use the built-in cheats to your advantage (or disadvantage). More in-depth documentation/information is available via the in-game help menus.

This is my first (and currently only "big") Java project, so this is meant as a learning experience for me. I've been lightly developing this over the past couple of years while I learn Java.

Contributing

I'm not actively developing this at the moment, but that doesn't mean the project is dead! Feel free to open PR's and I'll check them out! Whether you want to fix a small bug, or implement a new feature- all contributions are welcome and encouraged. Check out the issues if you're looking for some stuff to do!

This project is very begginer friendly; I especially encourage new developers, or people learning java to contribute. I learned a lot developing this project, and hopefully you can learn from it as well! I'm always happy to give code-reviews or answer any questions; about the project, or about programming/java in general. Please don't hesitate to email me at [email protected].

Installation

First, make sure you have the latest version of Java installed on your computer. Download the jar file from the latest release. Simply clicking on the .jar file won't work (..yet). You need to run it in the command line. Open your command line/terminal, navigate to the downloaded .jar and run java -jar Text-Fighter.jar. If you want to run Text Fighter without the splash screen and popups (No GUI; true text-based), simply run it with the nogui option: java -jar Text-Fighter.jar nogui. Text-Fighter should work on Windows, Mac, and Linux.

Running

To run this project in IntelliJ use the these configurations

Modifications

I've made it easy to add your own weapons/enemy types into the game via modifying the code. With just a couple lines of code, you can fully implement a new weapon or enemy with your own properties. This will automatically setup achievements, and even create a full information page in the help menu for your modification. Instructions on how to do this can be found commented in-line at the bottom of Start.java Feel free to fork your own copy, add your own enemies/weapons and then send a pull-request for me to add it to the code.

Documentation

Pretty much all the information you need about the game mechanics is available in-game via the help menus (Accessible through the home menu). I'm not sure if I will add documentation about the code itself yet, that will be determined at a later time.

Upcoming

I'm planning to continue developing Text-Fighter for a while, as it's proven to be a good resource to help teach me Java. I don't have an end-goal for the project, but I do have a lot of things I want to eventually add. Everything I plan for Text Fighter is posted in issues.

In the beta stage, I want to add a better UI while still keeping the game mostly text-based. For example, having buttons to click on instead of typing numbers in, but still having the output be in text form.

If you want to request any feature, open an issue, and there's a good chance I'll add it.

Contributors

Thanks for all your work!

hhaslam11
BrendonButler
TimerErTim
docschorsch
htn17
Will-Estes
CLEMENTJOHNSHAJI
alfr3dosv
xdvrx1
R1ndT
SaurabhKukreja
emmamickas
colinwillis2
mmccoy3

License

Published under the MIT license

text-fighter's People

Contributors

alfr3dosv avatar brendonbutler avatar clementjohnshaji avatar colinwillis2 avatar docschorsch avatar emilelancecoetzee avatar emmamickas avatar hhaslam11 avatar htn17 avatar jdevfullstack avatar mmccoy3 avatar nwom avatar r1ndt avatar rberlin-2019 avatar saurabhkukreja avatar tim-see avatar timerertim avatar urosh1g avatar will-estes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

text-fighter's Issues

Loans

  • Access loans from the bank
  • Starting loan of 100 coins, and goes up 100 by each level
  • Needs to pay back full loan + (10%:EASY)(15%:HARD) interest

*Until loan is fully paid back, player cannot deposit coins into the bank

Add cheat to get rid of loan

Selling items, being able to find/buy mutliple items (For example, 2 pistols), dual wield?

The player should be able to purchase, or find (Currently, finding weapons isn't implemented) more than one of each weapon. (Or body-armor type).
With that, player should also be able to sell items (including first-aid items) for half the price of what its worth.

With multiple weapons would also come with dual wielding, and maybe trading with NPC's? Could be part of quests too. "Find [NPC] a [WEAPON] and bring it back to him!"

Food

Heals player
Maybe able to make gardens by buying land and seeds, go fishing, etc

Better save files

Make better names for save files, and make able to have multiple save files.
[USERNAME].tfsav

Fix crashing issue when entering an invalid number on certain menus

The equip weapon menu,
the equip armour menu.
the eat food menu,
the equip weapon menu.

For example, the equip weapon menu:

  1. Fists
  2. Baseball Bat
  3. Knife
  4. Pipe
  5. Pistol
  6. Smg
  7. Shotgun
  8. Rifle
  9. Sniper
    10
    Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 9, Size: 9
    at java.util.ArrayList.rangeCheck(ArrayList.java:653)
    at java.util.ArrayList.get(ArrayList.java:429)
    at com.hotmail.kalebmarc.textfighter.main.Weapon.choose(Weapon.java:141)
    at com.hotmail.kalebmarc.textfighter.main.Game.home(Game.java:282)
    at com.hotmail.kalebmarc.textfighter.main.Game.start(Game.java:146)
    at com.hotmail.kalebmarc.textfighter.main.Menu.load(Menu.java:29)
    at com.hotmail.kalebmarc.textfighter.main.Start.main(Start.java:19)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)

Process finished with exit code 1

NPC's

Read info from a datebase
Make NPC file using Random Name Generator

Cheats.java errors fix

Line: 58
{
for(int i = 0; i <= Weapon.arrayWeapon.size(); i++){
}
-> for(int i = 0; i < Weapon.arrayWeapon.size(); i++){

Line: 59
{
Weapon.get().setAmmo(5000, false);
}
-> Weapon.arrayWeapon.get(i).setAmmo(5000, false);

Line:63
{
for(int i = 0; i <= Weapon.arrayWeapon.size(); i++){
}
-> for(int i = 0; i < Weapon.arrayWeapon.size(); i++){

Line: 78
{
case "givemeachallange":
}
-> case "givemeachallenge":

Line:85
First:
import javax.swing.JOptionPane;
Second:
case "suicide":
Ui.popup("You have died! You lost half of your coins. ", "You've died!", JOptionPane.WARNING_MESSAGE);
Coins.set(-(Coins.get() / 2), true);
Stats.kills = 0;
Enemy.get().setHealth(Enemy.get().getHealthMax(), Enemy.get().getHealthMax());
Health.timesDied++;
Stats.timesCheated++;
break;

I like this game

Add constant arraylist access modifiers

For example, Ach.checkLearning():

    for (int i = 0; i < Weapon.arrayWeapon.size(); i++) {
        if (!Weapon.arrayWeapon.get(i).viewedAbout()) return;
    }

    for (int i = 0; i < Enemy.arrayEnemy.size(); i++) {
        if (!Enemy.arrayEnemy.get(i).viewedAbout()) return;
    }

    for (int i = 0; i < Armour.getArmours().size(); i++) {
        if (!Armour.getArmours().get(i).getViewed()) return;
    }

    for (int i = 0; i < Food.arrayFood.size(); i++) {
        if (!Food.arrayFood.get(i).viewedAbout()) return;
    }

Compare the third for loop (armour) to the rest.

File Save/Load system error

Hi,my name is Mathew.

To reproduce:

  1. create a new user profile
  2. exit the program
  3. use the user name to enter the save game
  4. Cannot find save file.

Solution:
Resource: SaveAndLoad.java
Line: 171
{
path = path.replace(".jar", User.name());
}
-> path = path.replace(".jar","_"+User.name());
Hope it help.
I love this game :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.