Saturday, August 27, 2011

Long Time Update Perhaps Eracia Will Move to C++

I've been relearning C++ for the last month.  So I try programming Eracia in C++.  Java yelled at me far to many times for simple algorithms, I needed to come back to C++.  In two to three months I will be recreating Eracia in C++.  While I am relearning I have been writing a nice story-line for the game.  Sorry for not updating.

Thursday, July 28, 2011

Its been Awhile Heres Eracia v0.0.1f

Wow its been awhile since I updated, but here is my small update on Eracia:

1.) Finally got my light sources to work well and much faster than before.  The map  generator will start randomly putting torches in rooms and hallways.

2.) Started working on small support for Tiles.  This will be the last thing I honestly will be working on even if it never gets done.

3.) Started working on Player Input, Updating Entities, and updates to the map in a well polished MainGameLoop().

4.) Started cleaning up my classes and using encapsulation to a way that I feel is good.

5.) My map generator now deletes excess walls.

6.) Started working on The Title Screen and Character Creation Screen

7.) Started working on my Stats Class both Monsters and the Player will share this class.

8.) Worked on the Panels so I can show and hide them when needed. And made a Class that they inherit with the same functions.

9.) Started a better version of my input engine.

Monday, July 18, 2011

Some Cave Generation

This weekend I was struggling trying to create my map generation, so I finally researched the topic and came up with a few algorithms to use.  My cave like tunnel maps are going to be using my own version of the Cellular Automata algorithm.   After some tweaking and some different ideas I came with something that I can say is quite feasible.  

Here are some of the maps it generated:

   As you can see I still have some rooms that are not reachable but I am happy with the random "Tunnel look it gives.  Next steps:
  1. Find access to those pesky little rooms.
  2. Start creating support for the rooms add events.
  3. Start adding doors to areas that look food for it
  4. Adding lakes and rivers - bridges
  5. Find larger areas in the map and maybe create monsters fortresses.
   The possibilities are endless

Saturday, July 16, 2011

Map Generation First Idea Failed Time for Plan B

   My first plan in creating a Room Styled Dungeon was to create a map with random sized rooms and place them within the maps bounds.  This created maps that looked like this:

   Now granted this is random I didn't like the fact that the rooms where always squares and rectangles.  What if I wanted to make a L-shaped room bend around another room?  Also the way I did this was just making a text room and fill it in the map buffer.  The only way I could add doors and or corridors within these maps would be constant rereading of the map to find plausible places for doors and cooridors.


   So I created a Room class that holds tokens.  Tokens will be the connectors from one map to another, doors from one room to another, and other special events that can happen in a map.  Maybe a pit? A treasure chest that holds items?  And the Tokens placement within the room.  I am planning on adding scripts in Eracia later on, each room could hold multiple scripts, storyline, and epic battles.  
   The Room class will have an ID in the map it is within and the door tokens will tell the map which room the player is within.  This could help intelligent Monsters "hear" the player and run to stop our hero from achieving victory.  I could also add path nodes within each Room, so these intelligent monsters will know exactly where to go to stop our "noisy" hero.  The possibilities are endless! /brainstorm
   This is Plan B generation idea.  Start with one room givae it an ID of 1 and add the connector token from the map to the new one.  Place the Player Start token there so the Player don't start at 0, 0 or whatever other placement on last map was.  Maybe add some random items and or Monsters.  Now find a random place on the map, give it a shape add some noise to it so its not a perfect square or rectangle and place it in the map.  Write down some coordinates where its walls are and find a wall to place a door token.  Create another room with the door token from Room 1 and give it ID 2, again maybe add some random items or Monsters, maybe have it bend around room one?  Maybe create another Room to bend around Room 1? Or maybe start at Room 1 again and go another way?

   That is my next approach to this.  I hope to work on this tonight and have it finished by Monday.

Thursday, July 14, 2011

Update V0.0.2a And Map Templates

This is a small update of what I worked on yesterday.  Its not much but at least it is a small step forward:

  1. My Player now has a viewpoint where he / she has to map out the Maps.
  2. Started working on my Random Map Generator about .05% complete.
What I am thinking about is creating a data class that has information about the current map I wish for it to create, Im calling this class TemplateMap.  Within the class it will tell the generator:
  1. The Map Type such as: A dungeon, a cave, a forest. There are more
  2. The Map Look such as: Create the map looking like a circle, a square, or a long horizontal but small vertical map. There are more
  3. Map Tone: The major colors to use for the current map.  Should the map have more greens than blues?  Maybe the character is deep underground and hes starting to see lava?  Or maybe he is walking through a burning forest?
  4. The characters to use for Walls, walkable tiles and Tiles that will block the player's view such as pillars.
  5. The min and max size of the map.
  6. To add Rivers or lakes and how many.
  7. The Player's viewsize in this map.  Outside maps view should be much smaller than in a town.
  8. The min and max amount of rooms to add to the map.
At the moment the TemplateMap class holds these values and I am having the Map Generator read the values and deal with the data that the TemplateMap tells it.  I wish to add some more to the TemplateMap later but I want to really dive deep into the Generator first.

Wednesday, July 13, 2011

Slow Few Days

The last few days I've had no time to work on Eracia.  I will be getting back to it as soon as I can.

Friday, July 8, 2011

Code Clean-up Friday

Well I think I'm going to dedicate Fridays to cleaning up Eracia's code.  I believe this is a good idea.  ATM I have 13 different classes with many different calls to each other.  Even though the game runs well with the 1500 - 2000 lines of code; I want to find the bad ideas before I have 10000 - 20000 lines of code to traverse through.