Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1336193 Posts in 60812 Topics- by 52281 Members - Latest Member: Sarwic

April 23, 2018, 10:53:06 am

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsZarphorus - A text based adventure game made using JFrame
Pages: [1]
Print
Author Topic: Zarphorus - A text based adventure game made using JFrame  (Read 583 times)
Artsicle
Level 0
***


View Profile
« on: December 27, 2017, 01:01:36 pm »

I've been working on this game, Zarphorus, for a little less than a month and I decided it deserves its own devlog. Keep in mind this is like my 5th or 6th program made in java.

Gameplay

So basically, this is how the game works as of this point.
You can pickup items using the command, "Loot", and to check for items in the area without looting you could use "check item".
Entities is similar, but you use "check entity".
To attack entities you get the interaction id from "check entity" of the entity you'd like to attack, and type "attack <INTERACTION_ID>".
For example,

here you can see I checked for items, and found a stick and looted it.

Now I found an entity (pig), so I equipped my stick and started attacking it for that delicious bacon.

In the above image, I killed the pig, looted his bacon, ate the bacon, and my energy went up. I'm going to work on levelling
so it actually does something and so you actually level up, but for now its just a random variable.

Areas

There are 7 areas in the game as of this moment. You can call them biomes, but then the dungeon would feel left out. You can see them
here


These are the chances of getting areas and these are the chances graphed (10,000)


Experience

Experience is barely worked on but I did add a little.
The equation used for getting the next amount of experience needed for the next level is right here, however I will most likely tweak it in the future as I
test it out.
Code:
public static Integer getNextLevelXp() {
    Integer basexp = 100;
    Double exponent = 1.25;
    return (( int ) Math.round(basexp * (Math.pow(level , exponent))));
}
So that would mean the first level is 100 xp to get to the second, and to get to the third, its 238, etc.

File System

I already added saving and loading, and I actually made my own encoder for it.

In green, is my encoder. I called it "Art Coder" and in black, is what's currently saved. Death doesn't do much at the moment except for say "You died!" but im going to disable some commands by changing the interface so there's a function
Code:
public boolean canUseIfDead() {
   return false; //I'd enable the commands game (for saving, loading, deleting, and listing save files), option, and help.
}
I'll talk about death later though. Sp the file system is pretty simple, all files are stored as "C:/Zarphorus/saves/FILE_NAME.zar"
The command for saving and loading and deleting and listing files is 'game'.

Loading is a little hardcoded, but I couldn't think of a system. If I come up with one at any point, I'll try to implement it.
Here is my code, a little warning though, there's a lot for one function so I zoomed out so you could see it all.


Windows

There are two seperate windows, the input window, and the console window. I don't know if i'll stick with using two seperate windows or just combine them.


Misc

As of writing this, there are exactly 3550 lines of code collectively.
There is a ghost class that I created awhile ago, called GameEvent, where I was going to add natural disasters like fire tornadoes and whatnot.
How did I come up with "Zarphorus"? If I told you, there would be a lot of games sounding like "Zarphorus" such as what I just came up with, "Apromium"
« Last Edit: January 08, 2018, 06:51:12 am by Artsicle » Logged
Artsicle
Level 0
***


View Profile
« Reply #1 on: December 28, 2017, 04:41:58 am »

Experience!

Experience added
« Last Edit: January 13, 2018, 09:10:24 am by Artsicle » Logged
Artsicle
Level 0
***


View Profile
« Reply #2 on: December 28, 2017, 02:30:04 pm »

Crafting!

Crafting has been added! It took me almost a full day to make it as this is my first time using json, but its very easy to add recipes now.
Code:
{
  "result": "ToughString",
  "resultCount": "2",
  "ingredients": [
    {
      "type": "single",
      "ingredient":"CatTail",
      "count": "1"
    }
  ]
}
Code:
{
  "result":"WoodenSword",
  "resultCount":"1",
  "ingredients": [
    {
      "type":"single",
      "ingredient":"Stick",
      "count":"1"
    },
    {
      "type":"single",
      "ingredient":"SharpStick",
      "count":"1"
    },
    {
      "type":"single",
      "ingredient":"ToughString",
      "count":"3"
    }
  ]
}

All I have to do is add files and you use the command 'craft <json_file_name>' such as 'craft toughstring' 

Ignore how you can get 1998 cattail from the swamp for now, that's just a value for testing.
« Last Edit: January 13, 2018, 09:10:47 am by Artsicle » Logged
Artsicle
Level 0
***


View Profile
« Reply #3 on: December 29, 2017, 06:44:27 am »

Saving!
This took like two hours, but I finally fixed saving. Before, my encoder, ArtCoder, failed to use 0's and _'s properly so literally nothing happened when you loaded a save file, also a whole bunch of other things that had to do with json. My system is more complete now, and I added a command 'game overwrite save <##filename>'
When you load a save, now it gets the serialized launch date variable and converts it into a date where it can then find the log file (Console text) and load the console from the last save!

« Last Edit: January 13, 2018, 09:11:04 am by Artsicle » Logged
Artsicle
Level 0
***


View Profile
« Reply #4 on: January 03, 2018, 07:47:27 am »

Linewrap!
Added linewrap so you'll never have to scroll sideways in the console!
« Last Edit: January 13, 2018, 09:11:15 am by Artsicle » Logged
Artsicle
Level 0
***


View Profile
« Reply #5 on: January 05, 2018, 06:24:55 am »

Tools and mining!
I added a lot of things since last time, including
Fixed autosaving!


(Autosaves everytime a command is typed, and when the game is closed)

Mineables and tool classes!



New crafting arguments!



Commands now have aliases!

And a new help menu!



I'm planning on adding trees in the future for mineables, and that would be pretty easy. Just as simple as adding a new class

(Oh yea, and registering that class using the mineable registry)
« Last Edit: January 13, 2018, 09:11:36 am by Artsicle » Logged
Artsicle
Level 0
***


View Profile
« Reply #6 on: January 08, 2018, 06:58:28 am »

Open Source!
I've made a repository on github  Ninja
https://github.com/ArtsicleOfficial/Zarphorus

And smaller updates are posted on my Java and old Windows Nostalgia discord (Including windows 98) (23 members)
https://discord.gg/QtsUFMc
« Last Edit: January 13, 2018, 09:11:51 am by Artsicle » Logged
Sundrop
Level 1
*

Grandma cooks best!


View Profile
« Reply #7 on: January 08, 2018, 08:36:30 am »

This looks like so much work! I don't play text adventures that often myself, but would love to see where this goes!  Gomez
Logged

Artsicle
Level 0
***


View Profile
« Reply #8 on: January 09, 2018, 02:34:41 pm »

This looks like so much work! I don't play text adventures that often myself, but would love to see where this goes!  Gomez
Thanks!
Logged
Artsicle
Level 0
***


View Profile
« Reply #9 on: January 12, 2018, 08:42:37 am »

Npcs, Currecny, and Code Overhaul!
Huge update this time, it's taken me awhile but It's here.  Shocked
First up, npcs have been added! These do not have many features yet, other than selling items for you to buy. Items already are planned to to be sold to the npcs as well, but that will be added in the future.
Money has also been added!
The player menu has been updated to look nicer, however I did miss a few things to add there I believe.

The currency symbol is "Ñ" and possibly will change in the future.

A few other things have been added
The Cave Area is now in the game,

To enter without stumbling around, you'll need to make a lantern, the recipe can be seen here.

Also, there was a huge overhaul in the code, where I'm using enums now instead of constant number variables for ids

It used to be that the item ids, entity ids, area ids, and mineable ids were stored in Integers, but not anymore.

Now there are enums for all of that.
Also, the chances to get an area are also stored enums.

And in the item enum class, I now store the "ItemSoldClass", that could be either Misc,Food,Plant,Metal, or Monster Drops.
Here is a list of the items neatly stored in the enum

That doesn't mean I'm giving up using my item interface, as that's still necessary and it's very clean as there are a lot of values.
Another update, Monsters! They could be in the game before, but now they can attack whenever a "Game Interaction Command" is performed, such as "Equip" or "Walk" or "Attack", Game Interaction Commands do not include commands such as "Option" or "Game" as those do not interact with the game. If an entity attacks automatically, such as a goblin, it will attack you whenever you type a Game Interaction Command.



One thing I plan for in the future is enemies that can spawn at night, anywhere! Goblins will have that ability when its added.
What I mean by night, has to do with my new Time System.

Four minutes and 30 seconds are added every time a Game Interaction Command is run.
That hasn't been added yet, but I hope I will add it soon.


Oh yea, and the blacksmith will say things once I implement it. Probably using a command, "Talk <##interaction_id>"

The github has been updated with all this code here
https://github.com/ArtsicleOfficial/Zarphorus

The amount of cattail needed to make toughstring has doubled to 2

For those of you wondering, the line count has more than doubled since the first post

And now I programmed a line counter tool to do it automatically for me
« Last Edit: January 13, 2018, 09:13:01 am by Artsicle » Logged
Artsicle
Level 0
***


View Profile
« Reply #10 on: January 12, 2018, 01:41:21 pm »

Npc interaction!
This is a smaller update, I added names to the npcs (Randomly generating out of ~450 names in a text file)
and talking.

There aren't many texts for the blacksmith to say to you, I'll add more types of npcs in the future as well.

Those in the above picture are all the npcs I plan to add.
If anyone has good ideas for texts for npcs, I would gladly add them to the game.
« Last Edit: January 13, 2018, 09:13:40 am by Artsicle » Logged
Artsicle
Level 0
***


View Profile
« Reply #11 on: January 12, 2018, 04:56:29 pm »

Plans!
When you use the "walk" command now, your chance of getting the same one is slightly higher.
Also, I've decided to get some ideas from the discord, such as earlier today when when we came up with a "workstation" system earlier today.
This is what we came up with,



Arrow keys and space would control it, and the text would be colored based on if you have enough materials to craft or not.
https://discord.gg/QtsUFMc
« Last Edit: January 13, 2018, 09:56:58 am by Artsicle » Logged
Artsicle
Level 0
***


View Profile
« Reply #12 on: January 13, 2018, 09:10:07 am »

Dimensions!
Dimensions have been implemented! The old game would be in the "Norconium" dimension, however there is going to be something very cool about the spectrum dimension

Here is a hint of what it will be, it's kind of hard to get it from just this one screenshot but as soon as I finish adding this I'll post the full update
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic