Game Development Community

dev|Pro Game Development Curriculum

Geographical Delight (Large Images)

by Gareth Fouche · 04/05/2007 (1:54 am) · 6 comments

Ok, so you might remember me saying, in my last post, something like "now I just need to hook up my effects system to my items". That was a mistake. Murphy is a bastard, and he has good hearing. It wasn't as trivial a thing to do as I'd hoped.

The problem is, items need to be "instanced". What does that mean? Well, consider a scenario where you are wearing 2 rings of fire protection. You need a way to distinguish between the 2, and the effects they apply to the player. You need an ID for each item. I can't just use the items name as the ID, if you do, when you remove one ring the effect of the other will also be removed.

So obviously it needs a unique key for each instance. But this affects my inventory system. As it was, if you have 2 swords, it was stored in the database as "Longsword" with an amount of 2. No way to distinguish them. Blah.

The change was conceptually simple, but required lots of little tweaks and suchlike around the code. But now, after working till midnight last night, it's done, haha! So if you equip an item with a magical enchantment, it is automatically applied to the player, and removed when he takes the item off. The item effects integrate seamlessly with the normal spell effects, so if you have a ring granting you enchanced strength and you cast a spell which does the same, only the best is used. The other bonus to this change is now I can implement items getting damaged and needing repairs, since I keep track of individual item stats.

Here we see myself, "Evil Jim" and "Bob the friendly". Both Jim and I are using the same type of magical sword, so we have the same aura thingy. I also get the effect icon. Unfortunately for Jim, the enchantment wasn't enough to save him when he tried to attack old Bob there :D. If I loot the item from his corpse the effect will disappear, its all swanky.

i99.photobucket.com/albums/l300/nakedninja_2006/screenshot_038-00003.png

On the other side of things, coming back to the name of the post (no, I don't have cool landscapes to show you, sorry), I have been having fun making a map of my gameworld. I love looking at maps. Even if I have no idea what they are showing, they spark my imagination, hinting at possibilities for exploration and adventure. Its a work in progress obviously, but its coming along nicely I think.

(Image and Names copyright Gareth Fouche 2007)

i99.photobucket.com/albums/l300/nakedninja_2006/map.jpg

Don't you just love Photoshop filters? A bit of playing around gives me this :

i99.photobucket.com/albums/l300/nakedninja_2006/map2.jpg

#1
04/05/2007 (2:02 am)
Nice maps. 8-)
Photoshop rules them all!
...well when you own it.
#2
04/05/2007 (4:58 am)
Great work Gareth :) We struggle with the same kinds of issues, always enjoy reading your posts.
#3
04/05/2007 (1:02 pm)
Yea, maps can really jumpstart the imagination and let you get further scope of where the development is going. I find myself foundly gloating over the map of games many times sparking new ideas and grasping how I will break up my game and its structure. Games that I have worked on without maps feel so naked. Even if I know where everything is, I at least like to visualize the levels out in actual worlds.

That ingame shot is looking good, if you can just set the objects to fade in the distance your done! ship it.

(oh, I would immediately head towards a'Zenahuatl because I love me some lava levels... lol)
#4
04/06/2007 (4:14 pm)
man that world is way behind ours, they're using swords in the year 2000, they should come check out our guns :-).

It's looking very nice. I've started working on a simple (although I don't think anything is really simple with this) rpg for a project to learn some things and was planning on picking up the AFX when I have the money. Reading your post has made me realise I need to do some heavy thinking on how to do items right.
#5
05/02/2007 (6:13 am)
@ J Sears : Hehe, yes, the clock is a bit off, thats just the defaults it loads with. You can set the time/calender system up as you like. Once I have more "fantasy sounding" names I'm load them into it.
#6
08/10/2007 (6:10 pm)
nice work, nice indeed like the colour map over the brown one too dark