Thursday, September 18, 2008

Field of Vision

The past two nights I've spent some time on my Field of Vision algorithm. Last night I wrote the initial algorithm, and got it running inside the game. Today I fixed a bug in the algorithm (hard to believe there was only one), cleaned up, and comment the code. I'm using both the Midpoint Circle Algorithm and the Bresenham's Line Algorithm together to calculate the field. It stores the field with each point keyed based on how far away from the original point the field was calculated for. This will turn out to be extremely useful when I want to apply effects to different points based on how far away they are from the origin.

The algorithm is built as a grid worker. This allows it to be used by any other object in the system, and fields that have been calculated that may never change can be reused without recalculating. The grid worker class has grown to be immensely useful, and is now probably the most common base class in the system.

I'm writing this post because I don't know where I'm going to go from here. There is still a lot of ground to be laid, but I'm trying to figure out what gives me the most bang for my buck. The current goal is to get a basic working game going, so with that in mind I'll probably work on dungeon depth and persistence. Hopefully that goes as well as the field of vision code did!

Tuesday, September 16, 2008

Some Progress

I've been working on the game every now and then, and in the past week or so quite a bit. My new laptop is helping out with this increased productivity, as I can now code while watching television!

The main thing I've been focusing on is getting my code ready for being placed on a repository. As I may have mentioned I plan on open sourcing my code. Since I'm writing my game on the skeleton application that comes with the SDK I'm using, it has required me to rewrite a lot of things in skeleton application that don't really have much to do with the game. Mostly I'm talking about player saving and things like that. I'm happy to report that all the code in my game is now my own so it's ready to upload when I decide.

As far as the game itself I've only gotten hit detection to work. This was actually only a one line thing, and I'll need to revisit this one line later on. For now it's nice to see this working and it feels much more like a game. Now that I have a bunch of boring code out of the way I'll be able to add more to the actual game. There are still a few things I want to add before I make the code available to all. Once those are added I want to do a small code and comment review before uploading the first version.

Once it's uploaded I won't be publicly telling anyone about it, for now it's mostly so I have the code backed up on another server. Once I have a better represented game I'll probably point people in the direction of the code as well so they can see how it works. I'm hoping people can provide some feedback on the code as well, as I'm sure there are ways of doing things that I don't know about.

Monday, August 18, 2008

Back!

Summer has been quite busy. The last post I made was sometime before I went to Australia and since then I haven't had much time to work on Mirage. I have worked on it a little bit in the past week or so, and my interest has been revived.

A big problem I had earlier on was that I was being too ambitious and trying to think of everything I wanted to end up doing. This resulted in me not being able to focus on the little parts that I did need to do. I'm sure this will happen in waves but for now I've refocused on some smaller chunks that I can get done without having to think about the big picture.

The current state of the project is pretty good. I have a solid engine created that I can work off of and add to. Everything right now is very simple, but I have player and non-player characters working. The non-player characters that I do have just move around aimlessly, but that is something that I can work on later when I have a better base game worked out.

I've finished a cavern algorithm which is working very nicely. I still want make some tweaks to it because
occasionally I get maps with very small caverns. I might make some variables on the algorithm so I can set a minimum and maximum cavern size. This will give me more flexibility in the future if I want to re-use the algorithm for multiple types of caves.

I'm also working on a simple dungeon algorithm. Work on this one is very preliminary, but it's coming along nice. My plan is to work on many different dungeon generation algorithms so I get a lot of variety in the final game. Since I plan on open-sourcing the engine as well I feel the more different types of algorithms I have the better. The system is set up so that adding new dungeon generation algorithms is a breeze.

I have a short list of things that I want to implement next. They shouldn't be overly difficult but I just have to find time to do them. Everything is listed in the order I want to complete them.

  • Collision detection

  • Line of sight

  • Dungeon Connection

  • Dungeon Persistence


There are also a handful of other things that I want to implement as well. For the most part I have been doing whatever comes to mind, but I want to implement enough to have a playable game. Hopefully I find time to work more on the game once the summer is over.

Friday, March 14, 2008

Emotional Schools

I decided to come up with names for all of the possible schools of magic. This is just a first draft, but I think I did pretty good. As always, thoughts welcome!

Anger + Anger = Rage
Anger + Fear = Hatred
Anger + Sadness = Devastation
Anger + Love = Jealousy
Anger + Hope = Enmity
Anger + Joy = Malice
Fear + Fear = Terror
Fear + Sadness = Shame
Fear + Love = Anxiety
Fear + Hope = Distress
Fear + Joy = Hysteria
Sadness + Sadness = Anguish
Sadness + Love = Sorrow
Sadness + Hope = Pity
Sadness + Joy = Apathy
Love + Love = Adoration
Love + Hope = Lust
Love + Joy = Ecstacy
Hope + Hope = Desire
Hope + Joy = Bliss
Joy + Joy = Rapture

Tuesday, March 4, 2008

Emotional Magic

Long time no post! I've been pretty busy lately. I'm currently taking care of a bunch of things in preparation for my upcoming vacation. Australia here I come! I'm pretty excited, but there has been a lot that I've needed to wrap up around here before I can leave with an empty head.

I've still been thinking a lot about Mirage, and I've come up with a loose model for my magic system. I wanted to have a unique magic system that would still be familiar to those used to normal magic systems. What I decided on was to model my magic system against emotions. The magic users in the game would have to embrace a type of emotion to be able to use particular spells. Embracing different emotions could also affect your character, through status effects or stat modifications. A magic user could embrace up to two types of emotions at a time. The more someone embraces a particular emotion the better they get at using it. Higher proficiencies in a particular emotion would unlock new spells and either decrease or increase the way in which it effects them. High proficiencies in multiple schools would unlock spells that could only be reached by a mixture of emotions.

I decided on six basic emotions. They are Anger, Fear, Sadness, Love, Hope, and Joy. They create a wheel of emotions, with natural opposites. The mixed emotions would also have names as well. So if you mixed Anger with Sadness you would get Betrayal. Betrayal spells would only be active once you've reached significant proficiency in both Anger and Sadness schools. You would also be required to embrace both emotions. Certainly spells in these mixed schools would be more powerful than their base emotions.

Once you've reached a particular level in a particular emotion it's name might reflect that. Anger would become Rage, Fear would become Terror, and so on. I'm not sure if this particular twist would be too complicated or not. It might end up being confusing.

I mentioned that embracing emotions would effect your character in some way. If a player chose to embrace Anger, they might gradually lose hit points. If a player chose to embrace Love they might gradually gain hit points. Embracing both emotions would counteract each others effects, but the spells coming out of the mixture between Anger and Love might not be as strong as those coming from other emotional schools.

I designed the system in mind so that there would be benefits and losses to each emotion. It was also designed for a great amount of variety in the types of spells available to the player. The player would also have to make a decision on what emotions they are going to focus on, and this decision could impact them through the entire game. I'm curious to see what other people's thoughts on this type of magic system are. As always comments, suggestions, and improvements are always welcome!

Monday, February 18, 2008

Achievements

I've mostly been working on some miscellaneous things lately. I've implemented attributes, resistances, modifiers, and I'm starting to work on items and inventory. There is nothing really groundbreaking to say about any of that, but I may highlight my implementation in the future. For this post I'll be talking about what I plan for my achievements system.

I mentioned in a previous post my idea of the library, and how it would fill up independent if your current adventure. It would persist through all of your characters. Adding to that feeling is my achievements system (tentative title).

If anybody reading this has played any games on the Xbox360 you will notice every game has achievements. These are things you can do during the course of gameplay that give you some gamer points. Gamer points are pooled from multiple games, and each game has a hard limit on how many gamer points they can give out. This is nice in several ways. First it gives you tangible evidence of how much of the game you've experienced. It gives you goals that are independent of just finishing the game. They may highlight parts of the game you didn't know existed, or never thought about. They encourage you to play the game in different ways, or on higher difficulty levels. All in all they cater to the completionist in everyone that plays video games.

The most obvious achievements are those that are story related, beat a specific boss, finish the game, etc. These can easily be transferred over to mirage. I can have achievements related to the library as well. Find a certain book and get an achievement. Unlock the entire bestiary, obtain 75% of the library's knowledge, or even discover the library itself (since it won't be accessible from the beginning), and get an achievement. The possibilities are endless!

This system will provide tangible evidence to both the casual and hardcore player that they are indeed accomplishing something within the game. One of the primary complaints against roguelikes are that they are too hard. Most people lose patience and can't seem to progress very far into the game. With an achievements system it would push those types of players to achieve many small intermediate goals, which would naturally lead them into some of the harder to obtain achievements. If a player knows that if they kill 5 more goblins, or finally manage to unlock the power of the cursed ring and be emotionally awarded for that accomplishment, they will be more excited to continue playing.

There are several things I have to watch out for however. I can't add too many achievements or it will become overwhelming. Also, I can't add some super complex achievements or people may become frustrated. It's also my opinion that I can't have any "hidden" achievements, because if nobody knows about an achievement they won't strive to get it.

I'd like to hear people's comments about this system, and what they think its implications will be upon the game. It's a system that can be easily added to any game, and is basically completely independent of any actual game related code. I'm excited to see how it ends up working out.

Tuesday, February 12, 2008

The Library

I've still been too wrapped up with real life stuff to be able to do any heavy development (my girlfriend just left for Australia!), but I've still been kicking around some design ideas in my head. These ideas are mostly feature related at this point as I'm still trying to flesh out what the initial game will encompass.

The subject of this blog post will focus upon a mechanic I like to call the Library. As in the real world the Library will be a source of knowledge. It will contain information on enemies, items, spells, locations, and other yet to be determined topics. These will be categorized into different books within the Library, and will only be available if they contain some information. There will also be a book recounting the history and legends of your ancestors (previously played in game characters). There will be hidden books throughout the world that you can return to the Library to gain some benefit towards character.

So far the Library sounds pretty straightforward, so you might be wondering if there is anything unique about it. There is! The Library will be persistent across all of your characters. Information uncovered on one character will be available to all future characters, and discovered books will remain discovered. To gain the bonuses from a previous character you'll have to locate their burial place (where they died) and pray for them. You will then become imbued with their knowledge.

This will serve a few functions. It will add a sense of history to the game, and provide the feeling that your characters actions persist through generations. It provides an intermediate goal to the game, because if you find your previously created character you will instantly become more powerful. It also provides goals to any character, since finding a book inside or at the end of dungeons can be a powerful motivator. Also, it provides a different mechanism for improving your character and a collecting mechanism that may attract some gamers. The collection mechanic will tie into my achievements system, which will be the subject of a future post.

There you have it. I haven't gone into any specifics one what the books will contain, mostly because that hasn't been decided yet. Some surprise is always good I guess. I'd be interested in knowing other's thoughts on this game mechanic, and any additions people might find interesting.