Are we there yet? Are we there yet? Are we there yet? Are we ther...

Published December 02, 2012
Advertisement
I have been making good progress on the "demo" I'm planning on releasing. The demo won't be very long or content heavy, just one or two quest and a few NPCs. What I have done is making the things around the gameplay work nice.

chainmailitem.pnghelmetitem.pngsworditem.png



The player can change gear. Armor, weapon, helmet and shield. This can sound easy to implement on paper but when figuring out how to have different equipment showing on the player avatar things start to get hairy. Especially when having 2D sprites and not actual 3D models which sorts by them selves. I solved it by rendering the player sprite at runtime when the player changes equipment in the inventory screen. There are a few special cases where the sprite objects had to have some exceptions to the rendering order but most often I could just render the sword at the expected location. For instance if the player is walking to the left the sword would always be rendered behind the player, if walking to the right the sword would always be rendered in front of the player. A special case would be when the player swings the sword in front of him but he is facing left.

This seemed like the most efficient way... however, first I tired to render the player sprite with its different gear directly to the frame buffer. This was not very practical and did not look so good. I want the gear to blend nicely with the base sprite. It looked weird when I faded them in and out of view. The head would for example be partly visible through the helmet if the helmet started to fade out. I want NPCs to fade away to simulate that they are out of sight. Another benefit is that there are less texture bindings per frame when pre-rendering the sprite gear to a single texture. I could go on forever about this topic but I am sure you all would get bored eventually ;)


legend.png



View world and local map. The world map is a rather straightforward, just one big image showing the game world. I will print out location names as the player discovers them.

The local map is on the other hand a little bit more complicated. The map is viewed top-down like any old map. I generate it after the map data has been loaded into memory. First I loop through the world objects, skipping the objects that I consider "ground objects". These ground objects have the characteristic of being rather flat; wider and deeper than its height. If the object is not a ground object I render it onto my map texture. I use a simple codex to distinguish different items on the map. If the object is a door I render it red, if the object is a tree top I render it with a round shape and make it green and so on... This makes for a rather simple looking map, but I think it suffices. The player location will be marked with a cross or an arrow of some sort. This has yet to be implemented.

Writing and looking in the journal. Adding entries is accomplished by scripting. Quests, information, thoughts the avatar might have, etc... all are recorded inside the journal. The entries in the journal are stored in chronological order, there won't be any way to sort or search the entries and there shouldn't really be a need to either. I don't want it to be too convoluted. Each journal entry can have an image associated with it. This image can be used to set the mood of an entry or it can contain vital information. How to solve a particular puzzle or some scribble of an important location. I have thought that I might make the images personal to the player and reflect what's happening in the world, maybe some kind of mental state of the player avatar.

Hmm, well that's what going on I guess. =) Time to get back to it!

Thanks for reading, take care until next time.
Previous Entry Testing testing testing
Next Entry Ordering woes
2 likes 2 comments

Comments

Bacterius
I really like the sprites, very neat - did you draw them?? I like the journal system too!
December 04, 2012 10:13 AM
O-san
Hello and thank you! Yes I have drawn the sprites. I painted them with my drawing tablet in a larger format then shrunk them to fit in the different inventory slots, just did some smaller retouching afterwards. I think I get out more details that way. Glad you liked the journal too.

[img]http://members.gamedev.net/osan/images/biginventory.png[/img]
December 05, 2012 03:58 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement