progether / jadventure Goto Github PK
View Code? Open in Web Editor NEWJava text adventure game.
Home Page: https://progether.github.io/JAdventure/
License: GNU General Public License v3.0
Java text adventure game.
Home Page: https://progether.github.io/JAdventure/
License: GNU General Public License v3.0
thoughts:
When using the stats command (on the DebugPrompt) it throws a NullPointerException, here is the stack trace.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.jadventure.game.prompts.CommandParser.parse(CommandParser.java:60)
at com.jadventure.game.Game.gamePrompt(Game.java:68)
at com.jadventure.game.Game.(Game.java:35)
at com.jadventure.game.menus.MainMenu.testOption(MainMenu.java:94)
at com.jadventure.game.menus.MainMenu.start(MainMenu.java:46)
at com.jadventure.game.menus.MainMenu.(MainMenu.java:31)
at com.jadventure.game.JAdventure.main(JAdventure.java:47)
Caused by: java.lang.NullPointerException
at com.jadventure.game.entities.Player.getStats(Player.java:168)
at com.jadventure.game.prompts.DebugPrompt.parse(DebugPrompt.java:77)
at com.jadventure.game.prompts.DebugPrompt.(DebugPrompt.java:30)
at com.jadventure.game.prompts.CommandCollection.command_debug(CommandCollection.java:107)
... 11 more
thoughts:
I have made constructors for a lot of different monsters that can be returned from the factory. Before I submit any pull requests though I wanted to get input from you guys on a few things. My goal is to have this completely independent from the gameplay so we can use it for future projects.
There was a suggestion to turn this into not just a factory for the games monsters, but for NPC's in general. This can be done quite easily, and I like the idea, but it will change the implementation, and require changes to our existing code (nothing extensive fortunately, just 3-4 lines). If you guys want to go that rout, let me know and I'll get it ready this week.
The way it is currently working, the monsters stats are based on the players level, and for now, I just kind of pulled numbers out of my butt. When someone is ready to get battle working, get with me so I can fine tune these stats to balance things out a bit.
The types of monsters returned are based on the setting the player is in. So whoever handles areas will need to assign each area a 'locationType' (i.e. forests, caves, fields, swamps etc...) Do you guys like that idea? Or would you rather just have a pool of monsters that it pulls from randomly.
I'm open to all other suggestions you guys have. So feel free to pitch any ideas. In the mean time I'll continue the direction it is headed in now.
How do we want to implement the mechanics for leveling and experience?
thoughts:
When you exit the game by stopping jadventure and restarting it, the locations and all the default items are reloaded to their default state. But when you exit from the jadventure menu to the main menu and "[1] Start" a new player, the old locations and changed items remain. the json/original_data/locations.json should be recopied over to json/locations.json when this option is selected.
Difficulty: Medium
It spawns three empty prompts and doesn't pick up the item.
flesh out loot drops and make sure it works fine. some thoughts:
for multiple clients, they all use the same locations.json file which can mess with each other. They should all use separate locations.json files.
Underground titles offer the option to goto up, even though this should be impossible, except at certain places, e.g. the stairs.
Attack and defence mechanisms that still need to be implemented:
Ideas for what is required available here
pretty simple, change the stats command in debug menu to reflect the standard command in the game. oh and it might be best to hide the debug menu option from the help and only let it activate when the test user is loaded. That way regular players can't use it to cheat.
Code needs to be documented using:
Ideas for what is required available here
they should be moved to json files as well instead of having a class for each character type. I have a commit ready that i'll upload later. just leaving a note here for later reference and discussion.
Does use mean equip? Will use also "equip" potions by drinking them an applying the stat? what about if the player is wearing an amulet that decreases attack but increases health and the player wants to remove it? Will use show equipped items too (it doesn't) and then dequip it?
thoughts:
I was thinking about writing some documentation, not just for the new guys that want to join, but also for myself. So that I know how everything works.
But I'll need your help, I have no clue if what I am writing is correct in your eyes. Or if it needs more/is incomplete.
So I thought let's create an issue here where we can discuss this. I'll work on it on a separate branch(https://github.com/blackwolf12333/JAdventure/tree/documentation) on my own github repo untill we agree to merge it.
Hey, everyone! This is the first time I've ever opened an issue/offered solutions to an open source project, but I'm excited to contribute to this project.
I'm not sure if these issues are large enough to warrant a pull, but every bit counts, I suppose.
I'll submit a pull request when I've updated my local copy. Thanks. :)
I think this would be an invaluable thing to have while fighting; to see the backpack, stats, and equipped items.
It's important that instead of displaying the name given by the player, the confirm prompt shows the folder name to be deleted so that the user can be sure that there are no errors in deleting a character.
ex:
Are you sure you want to delete { playerFolder.name }? y/n:
It's cluttering up the commits and really changes should not be marked (since it is replaced by the locations.json in original_data anyway)
Difficulty: Medium
Dropping an item keeps the item equipped which should be impossible. I'm also going to start guessing at the level of difficulty for each bug/issue so newcomers can easily figure out which issues to tackle and which they may want to leave alone.
If you go to the load avatar option off the main menu and you do not know what avatar to load, there is no way to return to the main menu and pick new game without restarting the game or atleast I haven't found one. Also, is there a way we can display the available avatars, perhaps an option to delete them.
I also noticed that when I load an avatar, I return to the the initial location rather than where I had saved.
Perhaps can we also display all the options for the player when waiting for a prompt. For example when you first enter a room you have the room exit options and items presented to you but if you go to pick up an item or open the backpack, the options shift upwards. Then when you drop the item, you don't see it available in the room unless you leave and reenter.
Perhaps the options/items can be redisplayed with a key. I know when you type 'help' you get a list of options, but it is outdated. The other thing is changing the font color for items or monsters, something to break up the wall of text, making it easier to see when you equip or pickup something.
See comments about refactoring of code
Player mechanisms that still need to be implemented:
Ideas for what is required available here
Difficulty: Easy
Equipped items are displayed as the item ID instead of the item name. You just need to initialize the item, grab the item name, and then display that instead.
jadventure only partially supports being a server, there's no way to get input or have a client remotely connect to the game. The items that need to be implemented for this goal to be finished is:
1. abstract user input to another class
1. set up command line arguments to allow jadventure to be started in multiple modes:
1. local remote (both on same computer or network)
1. http remote (server on one, client on another)
1. standalone (playing directly on the core)
1. allow jadventure to be started as a server with an open socket
1. create a basic client that can connect to socket and send/receive text
1. allow multiple people to connect to server (not multi-player, but allows one server, multiple clients for a public web game)
For clients:
clients should be able to be implemented in multiple languages such as c, c++, python, java. It shouldn't be too hard as they need to just be able to connect to a socket and receive/send data.
thoughts:
we need to make sure that end users can easily download and setup a client on any platform and start playing. that means that there need to be multiple distro packages for all main linux distros and an executable for windows and osx.
I can check packages for linux (specifically arch linux).
to make sure that this is finished, we can share our game on certain subreddits (i.e /r/playmygame) and forums (communitycontributions on arch linux) and see feedback from real users. we'd have to make sure that our game is at least playable and that we can call it an alpha version.
Experience mechanisms still need to be implemented:
Ideas for what is required available here
From @projectdelphai in pull request #112:
an interesting concept would be to remove the debug prompt and merge all the commands into the main prompt. They would only be valid commands however if the current player is test. this way, we save code and minimize the amount of prompts while keeping the same functionality. just a thought.
There are some unused imports lying in the codebase.
Performance isn't much of a variable but it can have some naming conflicts.
Related question on Stackoverflow
Any thoughts on that?
There is no way to record location, or move between locations. goTo
method in Game.java has not been implemented.
If a new game and you type "exit" from gamePrompt(), it leads you back to the chooseClass method. Should quit to mainmenu after the first time.
thoughts:
location: The entrance to Silliya's Underground Society
command: plock and pick
result: No response
Think the spaces are causes problems in the parsing of the command
player: new recruit
item: shiv
location: spawn spot
commands: pshiv, eshiv, ueshiv
attack = 47
why?: I'm pretty sure it's because when place = "" and is passed to equip method and so line 209 in Entity.java is being invoked and stat is lowering to 47. Something over there is really weird. Line 257 in Player.java is passing "" though which is definitely wrong.
See comments about refactoring of code
Player mechanisms that still need to be implemented:
1. Add class switching for things like explorer, hunter, etc.
2. Add quests.
Ideas for what is required available here
The command parser class as it is, is not very big. But in the futere when we add more commands it will become a "god object". We should probably think of some way to move out some of the code to different functions.
This does not have a high priority, but it should be done at some point in the future...
Followed from #47.
there used to be a feature that allowed you to drop an equipped item which would automatically unequipd the item and drop it. It was really helpful and I think we should have that option back.
There needs to be both dangerous zones and safe zones. for instance, around 70% of the underground is dangerous, about 20% of the above is dangerous (excluding the wildlands/forests)
There should be a dangerous/safe property for each location to that is used to determine the possibility of a monster. if there is a possibility, then there should be some method of deciding whether a monster spawns of not (random or calculated). if calculated, then there shouldn't be consecutive monsters (or maybe there should?). It might be even better to have a danger grading system. Tiles with a danger of 5 (maximum) will have monsters next to each other and multiple monsters while lvl. 1 tiles will have monsters only once every 5-6 tiles (for instance).
This can be used later in the game (for spells and such) but for now, it'd definitely help with internal testing both manually and with junit.
I get a NullPointerException when using the stats command.
I checked all the values are non-null, some of the Integers are 0 but I don't know if that causes this.
Don't make a pull request to the main repo's master if you don't want your commit merged yet. At the very least, create a new branch. Again, don't make pull requests if you're not willing to merge that code.
Sorry if I come off as brash, I'm just being direct. Rather than opening a pull request, consider opening an issue to discuss the problem you're fixing. Keep the WIP updates to your fork, maybe merging the updates to their separate branch in the main repo if they're's enough there to warrant it.
For example, if you have a backpack of three milks, and you call:
dmilk
then all the milks are dropped and you are left with an empty backpack.
Post any solutions here.
h command is not printing out the help menu. I'm working on it
So there are basic equipping mechanics in place, however it is still pretty limited.
Next steps to be done for equipping mechanics.
It becomes rather annoying to run the stats command and get such a large output especially when you then don't know what changed. It'd be much easier to see the changes (i.e strength: +5, intelligence: -3) on equip/unequip.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.