Planet Roguelike-Dev

March 23, 2017

Roguelike Radio

Episode 134: Randomness

This is episode 134 of Roguelike Radio, where Darren Grey and Mark Johnson discuss the role of Randomness in roguelikes.

Read more »

by Darren Grey ( at March 23, 2017 07:03 PM


Dynamic Item Generation

This week I've been fleshing out the dictionaries for my dynamic item generation system.
I made a few changes since it was first designed, like simplifying the materials and making them less exotic. Now there are a lot of normal materials (like COPPER and GLASS) and some exotic or magical materials.

Items are generated with a number of attributes. Which ones they get depends on the type of object, its quality and its material. Here are a few examples:

I think it's going quite well so far, though I'm having to generate a lot of items and check their attributes so I can fine tune the dictionary rules.

You can see the "CLUB$1" up there, which is a rare, ivory, toy club.
I think children's club would be a better attribute than toy. That sounds strange in some cases.

There's a ugly, copper long-sword, which is both blunted and corroded. Items can have several damage attributes, depending on their quality. As they get used in game and pick up more wear and tear, they can also pick up more damage attributes.

There's still work to be done to avoid strange combinations, though i may just go with it.

The enchanted, ancient cooked eggs made me laugh. Since they are not a weapon and can't be equipped as jewellery their item modifiers (skill and aim bonus) don't have any effect, but you can imagine they would have some in universe use (they would have a higher cost because of their attributes, so you can sell them for a good profit).

In the game I'm going to keep item images to a minimum. I'm relying on the text elements to tell the story of these items, combined with your imagination. Just look at those items up there, whatever you can imagine about them will be much more interesting than any half baked procedural graphics a I can cook up.

by Pickledtezcat ( at March 23, 2017 07:53 AM

March 19, 2017


Object storage re-design

In the current engine game objects are stored in "raw" lists on Level class, a list per each object type. 2D maps have pointers to these objects. There are other ways to do it, like concentrating everything on a tile which means the tile owns all objects on it. The reason why I have a list for each object type is that when I was designing the system I had difficulties to understand how a base class list would work, but of course it's pretty trivial.

I'm planning to re-design the system with a container class that "hides" the base class list of objects and then has everything needed to work with the list. Then I could create an array of those classes each with a type of game object. I could even try tile-based approach or possibly a mix of both with stationary objects owned by tiles.

I know this is one of the things that people may get right the first time, but I wasn't that lucky. Even so, the re-design is not very big actually, because all it has to do is add and remove objects in the list, with couple of other routines. These days I'm quite careful not to reprogram things just because, but this one seems to be quite important to get rid of the object id confusion I'm having at the moment. If there is anything I have learned about programming it's to break large pieces of code to smaller pieces that then can be managed.

by Krice ( at March 19, 2017 07:43 AM