Jump to content

Alek's Java Game - Rpg/quest - Updated October 27th


Alek

Recommended Posts

I've been getting a little bored of making scripts recently, doing it for over a year gets pretty boring fast. Instead I decided to embark on a project that would push my technical boundaries and open my world to new things. With that said, I decided to embark on a small Java based video game.

 

Most recent screenshot:

 

screenshot.png

 

 

Status:

-Collisions

-Level handling

-Player

-Entities

-Battle system  (Decided I won't be making a battle system)

-Level editor

-Sound (Decided I won't be adding sound)

-Interfaces

-Interaction

-Game log

-Inventory

-Main menu

 

 

 

The game is going to be a very short and sweet RPG quest. I've learned a lot so far and I hope to learn even more. 

 

Changelog:

27 October 2014:

It's truly great to be on leave, I've finally been able to get some personal time once again to work on this game. Today I worked on a menu system; adding a new controller which traverses over something called a MenuTrack. A MenuTrack is a normal entity but contains the special variable "Label". This label is later used to paint onto the main game window ("Start", "Exit", etc.). The selector can only move into a direction where there will be another track. The label of the MenuTrack will also determine what actions to take when the controller uses the execute command (Z on the keyboard). So for instance if the controller is on a MenuTrack with a label of "Start", the game will begin on Level 1.

 

17 October 2014:

It feels like forever since I've worked on this project, but alas it has been revived. The first major overhaul from my return has been on the action system. Previously all actions and outcomes were stored in a single class within a single switch. It was pretty manageable considering that there are only about 11 entities with child ids (interactable objects). However since this project is about learning, I went ahead and made something a little better.

 

The abstract Action class was created and each object is assigned an Action class on instantiation. If the object has a child id of 4 (for instance), it will be assigned action class "Action_4").  Essentially, these action classes are casted as a new instance.

 

e40254633cd63dabb6d3aba2f55714b9.png

 

07 September 2014:

The game is completed. This is not to say that development is complete as well. I'm going to be making a start menu, a game over screen, working on the GUI, and doing a final clean-up of the code. The final game consists of three levels, two of them being puzzles. Oh and the name, "Cake and Coffee".

 

27 August 2014:

Today was another pretty large step in the right direction with the base for an inventory. In fact, I think the inventory is just about complete. This week I'm on vacation and there was no better way to enjoy it than improving on my Java skill set and doing something that I love. With college starting up again during this same week, hopefully I'll still make time to continually update, improve and eventually release this game. 

092c559f600d97ea70ab1afa06d0d310.pngf73dbd165eaaa3e7be8ef6f0ebb14196.png

 

24 August 2014:

Object interactions were added today with relative ease. My planning beforehand has really paid off and I'm glad that I didn't rush other portions of the game (always build a house on a strong foundation). The first line is typically a question followed by up to three choices. I've started a basic outline for my inventory which will support up to four inventory items. I hardly doubt there will be any point in the short quest where you will have more than two items at once, however it's nice to fill up the sidebar.

 

19 August 2014:

I usually don't work on projects during the work week, but programming is a great escape. Today I made some small additions, once again namely to the level editor. Previously I could only add objects on a 16x16 grid, however I allowed for "precise editing" so I can plop drinks on tables and intricate details with ease. I'm really at the point to start making the "game", however I still want to make sure everything is as clean as possible before then. After everything is cleaned up, I'll work on a short and sweet inventory system/gui.

 

Updated screenshot:

f191fc3f1386ab082726718c6a7b45c6.png

 

17 August 2014:

Since the sprite selector, I've decided to go ahead and polish up many parts of the engine. The first biggest change was limiting my entities to 4 types, StaticObject, StaticItem, DynamicObject, DynamicItem. Another large portion of my changes include changing my non-static references to a static reference. Various components were being instantiated when they didn't need to be. Both of my interfaces (Entity and Level) have been switched to abstract classes accordingly. The result is clean looking code that's both manageable and efficient. Before I get into the actual game, I want to bring the engine as close to perfection as possible.

 

The second accomplished objective for today was working on the gamelog. It's now fully functional and I can execute commands such as Global.addGlobalText(string) or Global.clearGlobalText(). It also received short and sweet alternating line paint:

 

                for(int x = 0; x < 4; x++){
                    g2d.setColor(((double)x/2 % 1 == 0) ? color1 : color2);
                    g2d.fillRect(0,textLine[x], super.getWidth(), 16);
                }

09 August 2014:

I've been working very long shifts at work, however I've finally found some free time. One of the biggest decisions in creating this game was deciding whether or not I want to have this game scale. By this I mean, if I want to reuse this game for a larger project in the future. Since I've always had a fascination with RPGs, chances are I'll want to reuse the core of this game for something later in the future. With that said, I had to overhaul my the way I handle resources. Previously when creating an entity, I would have enter the entity type, image id, and child id (if the entity is dynamic). However if the game became very large with lots of different images, I would be overwhelmed with remembering image ids. Another problem I faced was that each entity handled image ids separately. An image id of "1" for a DynamicObject could be a door while an image id of "1" for a StaticItem could be a potion.

 

I wanted a way to achieve the following:

-Allow all entities to share a global image structure

-Browse images in a way which would scale well with a larger project

-Have level editing remain relatively fast and easy

-Steer away from hardcoded image ids

 

This was all possible by creating a separate Sprite Selector gui. The tabs and lists are generated dynamically and nothing is hardcoded. I plan on also adding a few debugging buttons, namely "Toggle objects", "Toggle items", and "Toggle child ids". 

 

5cb7e720cbeb393b8f0981e1af90a681.png

 

 

03 August 2014:

Today I gave child ids to all entities. Entities that are static will have a child id of 0. This will allow for many different types of doors, stairs, beds, items, and another object specific functions. Once again, I had to edit the seemingly expansive Level Editor. Only three more entities remain to be created, and it should take me only a short while. I also added two more items to my todo list, "Quest Event Handler" and "Inventory". This game will be a very short quest, however I have something fun in mind which is more than plausible. 

 

02 August 2014:

It seems I've been re-writing the Level Editor every time I look at it. The first level editor worked completely as advertised, however it would only save and load one entity at each location. This means that you couldn't place objects on a wall or have transparent entities. The second version allowed for this, however it was limited to 9 variations of an object class (maximum of 9 types of walls, tiles, objects, etc.). This would be a huge limitation, especially if I decided to make a larger RPG in the future. The newest version implements a new interface system to allow for thousands of different types of objects to be handled and placed. It's a bit messy right now, so I'll be working on cleaning up all my code over the next few days.

 

5bebfdbcfce1e2153b651e2190570517.gif

 

 

30 July 2014:

I've decided to go ahead and start working on the Level editor. In order to make the level editor, I had to "modularize" many components so the focus can rely without a player being on screen. I've also decided to edit movement, making the player actually move on a 16x16 grid. 

 

  • Like 5
Link to comment
Share on other sites

This is.. an RPG ;o?

 

Anyway, if its meant to be for learning, and not for releasing in some kind of store, I'd recommend snatching some tilebased gameboy game tilesheet/spritesheet; Thats what I did when I made one, and made everything pretty and fun c:

Yep, already did that. I used to make my own sprites but there's no point really.

 

FYI: Level Editor is now complete (saving, loading etc.)

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...