Sunday, April 30, 2017

The ADOM event system

This week I've been working on adding more ADOM soundtracks by Lucas, and thought you might want to know what triggers them to be played in-game. There's a cool yet simple (or complex? :p) underlying mechanic called the event system.

During the early integration phase of ADOM and NotEye (which was around the end of 2012) we needed to find a way to control NotEye from ADOM (e.g. to show a specific screen or play a sound effect). We also decided to integrate ADOM and NotEye very loosely, so that we could easily switch to other frontends (if required).

NotEye provides a Curses like interface which is used by ADOM to deliver the screen contents (text and colors) which NotEye then renders (in ASCII mode). It also provides a keyboard/mouse interface which ADOM uses to get the player input.

Additionally ADOM provides a (quite complex) JSON data structure which NotEye can access to retrieve information about the whole game map (e.g. monsters, items, tiles, traps) that is used in "graphical" mode.

But this still wasn't enough. What if we wanted to play an animation or sound effect when the player used his weapon? After some discussion we decided to use an event system: the idea was to trigger events from ADOM and then let NotEye decide how to react to them.

We use events for a lot of things (e.g. to control NotEye, play music/sound effects, show animations). You can find all event definitions in the file <ADOM>/games/adom-tables.noe ("gameeventids").

Each event is represented by a JSON object (we really like JSON) with one or more properties.

For example, this is an event that is triggered whenever the player uses his weapon:



It contains the weapon type, the hit type (either a hit or a miss), the direction of the attack and other values that might be useful (the game_event_id is required for all events).

So, how is this event handled by NotEye once it is triggered from ADOM? NotEye loops over every event it receives and hands it over to every "module" (e.g. the animation module, the sound module). Each module then can decide to either react to the event or to ignore it.

The animation module reacts to the weapon event, we use it to play a "swish" animation to indicate the attack (the line is taken from the <ADOM>/gfx/adom/anim.cfg configuration file):

event=GE_WEAPON_USED, direction=SE, hit-type=NORMAL_HIT | CRITICAL_HIT, ...

This line describes what animation should be played once the GE_WEAPON_USED event is received (more on that in another article).

Additionally the sound module reacts to it, we play a sound effect (taken from the <ADOM>/sound/sound.cfg configuration file):

event=GE_WEAPON_USED, item-weapon-type=IWT_SWORD, file=weapon/sword_1.wav

So one event triggered from ADOM results in two actions: an animation is shown and a sound effect is played. As you can see, the event system is very flexible and extendable.

With all this in place handling new events, like playing a sound after loading a game, or triggering animations is a breeze. Hopefully we'll get more of those soon :)

Until next time!

Sunday, April 23, 2017

The physical side of ADOM

Today I'd like to provide some insides into the physical side of ADOM. Before the Resurrect ADOM development crowdfunding campaign there did not exist any real tangible assets for ADOM - which changed during the crowdfunding campaign where I promised things like postcards and pen & paper roleplaying games & boxes.

Saturday, April 15, 2017

A Glowing Example


Actually, I mean the title literally. There's an example of how glows work in ADOM inside :)

But before we move on to some nasty (but cool-looking!) Steel Horrors and Molochs, I'd like to take this opportunity to wish you all Happy Easter from the entire ADOM team.

We hope you'll be able to get some time off, create amazing plans and fantasies, and find courage and dedication to make them happen. But just getting some time off will be great :) Happy Easter everyone!

I was looking for a suitable picture to mark the occasion...I know of a few Easter Eggs (haha) in the game, but I didn't want to spoil anything, so here's some bunnies instead. One seems kind of odd. Ah well...



...read on to check out the new glow animations :)

Sunday, April 9, 2017

ADOM crowdfunding progress

Hi everyone!

Quick update from me about the current happenings regarding ADOM:
  • The past two weeks I have been focussed on moving ahead with the stuff that needs to be done to finally fulfill the still open crowdfunding rewards. Specifically we have been working on the remaining physical stuff (the poster map was updated for printing for the great folks that pledged for the limited ADOM rpg box), I have started writing the ADOM Lite RPG Arcana booklet (another 32 page booklet just for those box donors), Krys has provided a cover for that, and we have laid put a roadmap to work on the remaining virtual rewards (e.g. ADOM extensions). Jochen has been busy working on the ADOM community server code (shared highscores and more surprises for the future).
  • Next week should finally see wave 2 of shipping ADOM Lite RPG (mailing about already shipped copies as well as your statet on Tuesday, actual shipment probably by the end of the week or on the Easter weekend) and a lot more work on finishing the RPG boxes.
  • In parallel I am still working on the largest batch of new features in a long time (volcano quest, lots of new levels, staves - a new category of rechargeable magic items, primeval beings and more). This task actually is somewhat annoying as I started it before I broke my arm and before we had GIT. The code changes now are so entangled that we still can't use the GIT advantages as I need to get this huge batch finished.
  • That next batch will go to the prerelease testers as there are so many new features that we need all your talents battling bugs and the Steam release will be somewhat later.
  • After this huge batch we will move to much smaller updates in order to finally profit from GIT as our new version control system.
Behind the scenes more is going on but I still need another probably 3-4 weeks to be able to talk about that (hopefully at the beginning of May). You won't be disappointed - I promise :-)

(and I had yet another sickness phase - one more horrible cold - 2017 hates me - I have been sick for more days than in my while life before and by now am deeply frustrated)

Luckily Spring finally has reached Germany and all the sun has been very good for my mood. The hand mostly is ok again (as far as programming goes) although I still feel intense pain in the joint after prolonged typing. But that's something I can get by with.

So keep alert for the RPG lite shipping mails if you are still waiting for your copies (on Tuesday) and the actual shipping notice on the weekend.

Stay tuned!

Saturday, April 1, 2017

A Glimpse at ADOM Worlds!


Greetings ADOM™ fans. We'd like to talk about something special today - you'll be pleased to know that we are moving forward with another ambitious project under the ADOM™ brand name. Say hello to ADOM Worlds™!

As a team we decided to move where nobody has gone before and create a Minecraft-inspired 3D roguelike with various influences from many other genres.

The core idea behind ADOM Worlds™ is to build the largest,  most imposing Cthulhuoid Castle. It's a race against time versus four other opponents in local and online multiplayer.

Each game takes place on the barren PlAnE oF cHaOs, which means that incredibly strong monsters, scarce resources and an ever-shifting ground plane will make the game a suitable challenge for roguelike fans.

The winner is determined based on scores for the Castles' volume, mass, real estate value and overall corruptive effects, as well as the average number of cHaOs tendrils per cubic foot. All this assuming the owner survives until the end of the round. The cHaOs PlAnE is indeed an unforgiving place.

Of course block-based Castle building isn't the only focus of ADOM Worlds™. As with any respectable roguelike you'll be able to level up your character. learn skills and abilities, gain items and gold and so on. It's not ADOM™ without all of that, now is it?

All these elements put together should create a volatile mix of "easy to pick up" but "difficult to master" gameplay.

Expect a full list of features soon, and in the meantime enjoy our first teaser image of ADOM Worlds™!