Monday, May 31, 2010

Oh yes, I have pictures

Changes, ahoy? Alright, first we've got animated water... it's not perfect yet, but basically you will be able to see a river flowing or a fountain gushing. Because my cleverness occasionally rivals my ego, this effect actually adds very little lag to levels. Still needs tweaking, but checky:











Alright, next we've got a map that resembles something... oh hey, it's a giant keyboard. Each key is a room... but what will be inside? What could this be for?


Finally, we have a lobby of a hotel... officially my new focus. The chandelier will swing, that's a fireplace to the left, and an elevator to the right. So what's the deal with the hotel, anyway?

Well, some guests in Cyphen seem to cling to their old memories a bit too much... this is dangerous for them, according to the conspirators. The hotel does everything it can to 'accomodate.' So the best the staff can do is keep the guests trapped in a time loop... they re-live their last 24 hours of life over and over and over... your job is to break this pattern. So you talk to them, slowly unravel their memories and the secret of their death (don't forget, Cyphen is a purgatory for suicides...) by following them, discovering mementos, and ultimately triggering total recall by interrupting their routine. Roguelike elements remain... hopefully I can get their paths, memories, stories, and locations randomized. Also, there will be much fighting in the randomly-generated hotel rooms and "boss battles" with staff members who fight to maintain their guests' delusions. I have a great many ideas for floor layouts and room designs, of course, and I will be posting screenshots as I get them translated from paper sketch to ASCII. I also hope to have the maps online and accessible sometime tomorrow.

So you can't say I haven't been busy.

Sunday, May 30, 2010

Don't feel abandoned

I just haven't been awake or home. My schedule grows ever more sporadic. I feel bad for the lack of updates yesterday, so I've improved the lighting/field-of-view effects. Only trick I haven't managed just yet is colored lighting... The masterpiece of interactive fiction called Phototopia proved how well color influences mood. The player's shadow may do the same, particularly in a desolate hotel's twisting hallways.. Any overhead game risks losing mystery since so much of the level may be seen at once, and proper lighting can remedy this. I am frantically sketching drafts of our future home... Then even when you leave your room, you will never be able to leave your room, eh?

Friday, May 28, 2010

On the seventh day

He shall rest! Mostly because I'm going out with friends. Rest assured, late last night after my analytical mind had dozed off, my creative came alive and furnished my idea of Cyphen's hotel with a plethora of fantastic ideas. I'm going to experiment with the gameplay style of Earthbound... combat's quite present, but exploration and storyline and puzzles are just as vital. Attacks won't go to waste, but since nothing is well-balanced yet, leveling and grinding is not a focus at all. More later.

Thursday, May 27, 2010

Map Editor

I do think I kept my own bet o_O. Go grab the latest update, then check out tools/editmap (run it from tools, aka cd tools and then ./editmap). Your maps will be saved to saved_maps (go figure) in the same directory where perlrl/ and mnemonicrl/ and the rest stay. Should be very self explanatory. Copy over Cyphen's map from mnemonicrl/content/cyphen.map to the saved_maps directory and try playing with that. Basically I have a few features left to add to make editing faster for us humans, but it's perfectly usable. It'll be completely done in an hour or so. Huzzah!

Targeting

Through the magic of non-blocking input loops and POE, targeting works great -- even if the thing you're targeting moves. Pressing capital H, J, K, or L will quickly fire in that direction, since that's often what people intend to do.

So as usual, I'll be busy later, but I'm making a bet with myself... can I find and fix up the old map editor by tonight? The old one got a bit convoluted... messing with the different layers is annoying. New things I want:
  • Easy resize command
  • Menu for opening/saving files
  • A way for players to go play on their map
  • Perhaps -gasp- online editing while they're on the map?
  • A mode to simply freely type in the symbol layer
  • A way to select a chunk of map and make some change to it
Sounds reasonable enough. I have ideas for maps I want to quickly try out; this'd help. For moving obstacles or anything fancy, a BDSM::Agent::Sprite is ideal. If it's movement pattern is periodic (hence pattern), there should be a simple way for a non-me (yes) to specify it. Perhaps letting them control it, recording the movements. Then asking if they want similar timing or not.

Wednesday, May 26, 2010

Sixteen Days

Slightly over two weeks after poking at year-old code, I have finished recovering all of MnemonicRL's old functionality. Attacks weren't bad once I had the revelation to standardize networking and graphical patterns. All of them seem to work fine -- do pipe up if one doesn't -- including my favorite, the Alchemist's flood attack. I'm rather worn out, but I just wanted to post to encourage people to go play. It'd be great to have some company.

So what are my next priorities? This is new terrain...
  • Find mappers for static areas or just to make an example of a level so I can randomize it. Gotta clean up the old map editor, make it easier to use.
  • Play with my idea for a hotel dungeon set.
  • Work on monster behavior and decide -- just for starters, to avoid making the turn-based/real-time debate a prerequisite -- how quickly an initial batch of them should move in multiplayer and singleplayer.

Tuesday, May 25, 2010

Attacks and a Theme (Of the Literary Sort?)

Sorry for the slow pace. Basically, I've figured out how to separate attacks properly. The BEFORE stage (fullsim only, recount) merely handles checks, intelligently serializes the data, and the ON stage shall now handle range-resolution (finding targets) and damage calculation. This is simple, actually. Now timing can be internally implemented with my snooze() function, a little POE trick to blockingly idle inside a subroutine. In the client or singleplayer mode, the View may inject its code to draw animations. Anywhere that's fullsim (server or singleplayer), the appropriate snoozing will occur and then the attack is executed as usual.

The short of it, though: I'm off to visit friends. If I make it back before the A.M. (dubious), I'll have it working.

My other idea... I want a themed dungeon set as soon as possible for people to seriously play. Aether Plains is a grand idea, but cloud generation and elevators and such is incredibly tough. It still works from last summer, but improvements will require rethinking and... you should all know about how long that takes now. So I'd like to expand another idea, instead: the Hotel Asymptote (probably to be renamed) in Cyphen. My jumble of ideas:
  • Players may create and furnish their own rooms
  • Playing with the concept of height / moving between floors
  • Messing with your conception of whether you are inside or outside... which walls may be hollow? Why assume walls do not slide, rotate, pivot...?
  • A fully trained staff to cater to your every needs... but do you remember what it is you were looking for...?
  • A way to use your attacks and gain experience without fighting monsters... per say.
  • Parties. The sort  with music and dancing.
  • Visually, light will become a much more valuable commodity than it is in the perpetually lit (or unlit?) Cyphen.

Monday, May 24, 2010

Server down tonight

On account of me physically bringing it somewhere. Sorry. I haven't forgotten about attacks either, don't worry.

Sunday, May 23, 2010

Sunrise of Bugs

But they're all fixed now. There were numerous issues with logging errors, timers, snow, and even one client changing maps and causing everybody else's client to run naughty code as well. All fixed. Thanks to the one tester who invoked these errors; I remember your name from last year. I did not wake up with a magic solution for attacks yet, but then again, I haven't really thought about it yet. Work soon and a quest to acquire a second monitor, so wish me luck. More updates tonight, mayhaps.

Saturday, May 22, 2010

Rethinking Attacks

So it's been a quiet release day, especially considering the time I posted. I cleaned out the 'EventDB' class which used to handle the wacky reaction dispatch as well as POE timing. Now it's just the latter. I had started a crappy attempt at a turn-based mode as well last summer, but I've cleaned all that code out. I'll start fresh later. It's easiest to think in terms of normal time... action order will easily translate; take the "2.5 second lag" after casting a spell and compare it with the "0.9 movement lag." Presto, a priority queue.

But right now I want to think about attacks, the last thing left to "fix," and also the thing that's keeping cool tricks like the explosion effect working. I'll talk about what exists from the old client-server days, and that process will probably help me realize how I should design it now.

Attacks have effects aside from immediate damage... draining a stat, preventing a stat from regenerating, preventing movement or attacking, stealing an item from the victim, suicide of the attacker, summoning more monsters, cursing an item... really simple stuff, actually. Some of them entail things happening on the clientside, which gets confusing of course when client and server are technically one (the standalone/singleplayer version)... but that just means take out networking and run "fullsim" (full simulation) and graphics code.

The tough part seems to be my stage system. Right now, actions are split into 4 phases... PRE occurs only for human players, that's to figure out an action entirely, as in choosing what to drop or what ability to use. BEFORE happens only in fullsim (server or standalone, not multiplayer client) and ensures the action is valid. I also cheat a few times and perform fullsim-only things. Then ON and AFTER happen everywhere. Most graphical things occur in AFTER's, my new trick is to "inject" these actions into the appropriate object rather than muck about with a wacky event dispatch system or if (we're supposed to draw stuff) { then draw it }. So anyway, the stages presently:

stage 1: transform 'aim west' or whatever into a list of targets. "ranges" could be: adjacent, custom (for fun fireball effects), a straight line that terminates or continues as it hits targets, and a block shape. The challenge is that most of these ranges, even if the attack fails or doesn't hit anything, entail something being drawn. Stage 1 is called in BEFORE, so it's a tad messy to just send a list of map tiles to update if we're the server, yet... we do that! I'm thinking of determining targets in stage 1, serializing that information intelligently, and simulating stages 2 and 3 in ON and AFTER like normal.

stage 2: Ah, I remember why I split these. What about delayed attacks? We calculate targets as soon as the attack is requested, but we don't want to deduct HP and print messages until the attack would hit the right target. The timing right now is completely graphics-based, but it actually makes sense to separate this out a bit.. graphics and damage both depend on timing, which is a game-state concept. (The fireball travels at 1 square per 0.25 seconds) Confusingly, stage2 / ON also calculates damage.. That's problematic. Damage calculation involves random numbers often, so it's too late to distribute more information. But since all stats are maintained by the full-sim component and sent to the client if we're networking... things should still work out.

stage3: Pretty much run through effects. Oh, and this is where I was printing damage messages. Hrmm.

Well it's late now, but I have a better idea of what to rehaul in the morning, and I've given you a startling insight into my thinking process. My apologies.

Alpha Re-Release

It's here! You should play. There are still bugs galore, but the Windows port works just as well as the native after some help from cygwin. I was considering swapping the current "download code and unpack" update system for version control like bzr (which I use internally), but then I have to assume source users have bzr and get it working in cygwin. No thanks. Besides, the project encompasses about 4 separate source trees, and I haven't tried a super-tree yet.

Anyway, I'm exhausted from work (my job relates to one of the playable classes somehwat... guess which one?), so I'll bugfix later. Hopefully everything will be as it used to be (but with proper design internally!) in a few days. Then I can work on recruiting gameplay balancers to make this fun...

Friday, May 21, 2010

The Frustrating Things are... Frustrating

Well, I actually spent most of the day so far fixing the code more, so that makes me happy. Attacks still don't work, but there are fewer and fewer regressions since the peak of MnemonicRL last summer. As promised, I've worked on deployment today as well. I've got the Linux/source version running exactly how I want it. The Windows version is going to be fickle, but I'm pretty much borrowing most of the setup from last summer. That nasty 27MB download and install is pitiable but unavoidable... Cygwin. Pity building Curses.pm on Windows is nigh-impossible, and POE::Wheel::Curses depends on some odd select() wizardry that Windows can't handle. Ah well.

I've decided to publicly announce the re-release tomorrow if I can get Windows built, but with the disclaimer that things are probably still broken. People with high expectations can just stuff it; this is hard work. All the same, I enjoy it, and it is so worthwhile when the first player logs on...

Thursday, May 20, 2010

Don't attack, Pacifism reigns

Work has kept me busy today, but I've still managed to bugfix like mad. Everything seems to work equally well on both versions of the game... except attacks. Admittedly, these're the fun things to play with... even items like bombs with an exploding effect use the attack system, so it is a great priority to fix these!
As promised, I will stop wherever I'm at tomorrow morning and haggle with cygwin for a few hours so I can have a release ready for Saturday. I'm conflicted about where to announce the re-release, however. I don't want too much attention before I've got something really new to show off. Does the public understand how busy I am and how quickly I try to get things done?

Wednesday, May 19, 2010

Three Faces, One Mask

Client, server, and standalone are now properly separated. Components include graphical bits, hooks to fully simulate game-state, and client/server networking, thanks to the awesome Perl modules POE. Basically the release this weekend will have something new -- working singleplayer. Fighting monsters and stuff will still be buggy, but that is my next focus. Well rather, I will find a way for you to help me with the gameplay side of things. I'm rather fatigued, so later.

Ahead of Schedule

When have I ever been ahead of schedule?! I've allocated today and tomorrow for simply rehauling the code and getting old things to work again. However, last night I finished separating the bulk of the UI/networking code from the gamestate stuff. During a walk, I also had another thought -- why stop there? In the future, if I write lots of code related to item-handling, why not group it in a file? The Character object is responsible for drop/grab/equip/unequip, and the item is responsible for whatever it does, but it makes sense to have the code in one spot. There's no reason I can't use the same simple action injection trick (fancy wording for "switch to the right package and declare a new subroutine") I am now for the other components.

Anyway, I have to serve the dusty overlords today (I work ^^), but I've got all of the old MnemonicRL content working again... that'd be the playable classes, monsters, and items. Being ahead of schedule perhaps means I will have time to get the single-player game working before the release. So at the front menu, you could change your online character and connect or start a temporary game. Exciting!

Tuesday, May 18, 2010

On Separating Minds from Caffeine

Why am I not working on new gameplay right now? What could be more important? Well, the problem I ran into last time was simple: I can't balance a roguelike to save my life. What factors determine how much damage a weapon-based attack does? The player's strength, skill with the weapon, the weapon's power, the enemy's armour, skill with the armour, and their defence. Oh, and aside from balancing those stats relative to one another, also note that the distribution of healing items and equipment is relevant. And of course when you throw in multiple players or make the dungeon real-time... oh, the details, how they pile.

So that's the part of game-making that I absolutely loathe. However, I have friends who love to critique games for being too easy or difficult due to over- or under-powered items, monsters, etc. After all, wouldn't you enjoy helping out? I'm working on a way for players to edit the game as they play. You guys are going to help make this.

On the technical side, online editing of game content isn't that tough at all. It is a hefty addition of code, though. Since I've decided to allow for both multiplayer and singleplayer gameplay, I have some code to organize. Everything that happens under the hood in Cyphen either consists of this abstract game-state with tons of interactions; graphical nonsense so it looks pretty on the screen; and networking code to make sure the client and server are properly communicating. Slapping 'if we're the server, do this... if we're the client, do this.." everywhere gets... ugly. So I'm engineering something better.

Game actions have always been split into parts, so that the server might check to see if a move is permitted before wasting all 30 players' time with the information. I'm uninventing one of the wheels I reinvented last summer... multimethods. In traditional object-oriented programming, methods may be overloaded based on the caller. However, the action of an Artist quaffing red paint juice could be different than a Historian downing green paint. Rather than my nasty old event-reaction table, I've reverted to callbacks for the direct objects of actions. This simplifies things.

So, status update: I'm making great progress with my changes. I said a release by the weekend, which means I only have another day or so to rehaul code before I dig up the old Cygwin nonsense to get you Windows folks your executable. Wish me speed.

Welcome

I started MnemonicRL in the summer of 2009. My previous roguelikes were all duds; EmotionRL had a mildly amusing demo that some people actually took the time to beat, and HalloweenRL would later become Rigor Mortis Online, an unrelated game. However, it only took about three months to release a multiplayer roguelike. The trailer caught attention, and the debates about permadeath in a non-MMORPG MMORPG on rgrd began. Meanwhile, August arrived, and I suddenly had to concentrate on life again.

So I apologize for my length delay, but I am back for another summer, at least. With college in the fall, I can't make any promises about time, but I will try my best to keep the project running.


My current goals are to get the game running again and released so the players that were kind enough to playtest last summer may return. At present, I am in the middle of overhauling much of the code -- I'll talk about that in other posts. Once things run, I will ensure that they run in the client/server multiplayer mode and with a singleplayer option. The best way to appease traditionalists who want a coffeebreak game and role-players with the desire for permanence is to support both gameplay styles. This isn't that hard to do, actually. Another debate I haven't settled yet is when to employ real-time vs turn-based gameplay. I think both are useful in different situations, so I'm working to support them.

Well, I'm going to add more pages to the blog. If you'd like to support me, comment on my ideas -- this is a game for you, after all -- and play when I get the release out. I'll see you soon in Cyphen (or perhaps Uben)!