Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411275 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 09:16:31 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsCogmind (sci-fi robot-themed roguelike) - BETA RELEASED
Pages: 1 ... 45 46 [47] 48 49 ... 71
Print
Author Topic: Cogmind (sci-fi robot-themed roguelike) - BETA RELEASED  (Read 234566 times)
Moriny
Level 0
**


View Profile WWW
« Reply #920 on: March 31, 2017, 06:43:27 PM »

It's very cool. I understand what I read, but not when I look at the gifs. Shame on me!
Logged
Kyzrati
Level 10
*****



View Profile WWW
« Reply #921 on: March 31, 2017, 06:51:49 PM »

Heh, it just doesn't click with some people is all. Everyone's different, which is why we can have such a vast array of different games. Pretty amazing to think about the sheer variety that exists these days!
Logged

Kyzrati
Level 10
*****



View Profile WWW
« Reply #922 on: April 04, 2017, 05:26:28 PM »

Music for Cogmind?
[Cross-posted from the devblog here--follow link for better formatting and light-on-dark style.]

For a while the whole music thing was something I was going to start dealing with in mid-2016, but last year Cogmind just kept increasing in scope as it felt like there was enough funding to justify adding more Fun Stuff while still on the route to finishing off the story. And my intent all along has been to wait until the main game is complete before tackling the issue of music, to be able to better gauge the full extent of what's needed. With the upcoming Alpha 15 being story-complete, this can wait no longer!

Most roguelikes don't even feature sound, much less music. Of course, "most roguelikes" are also non-commercial--nearly all the commercial roguelikes do have their own music. That said, these commercial roguelikes also have nowhere near the same soundscape that Cogmind already does, so there's an argument to be made for not bothering with music in this situation...

I'm a huge fan of video game music, and have been since the 80's. Yes, the 80's, back when I'd record NES tracks on cassette tapes to play back later. VGM is almost all I listen to--every. single. day. :D To me music is a big part of the gaming experience as well, and I've always thought it accounts for much more of the experience than most people gave it credit for, though that public perception has certainly changed over the past 15 years. On both the development side and among players, nowadays game music is afforded a much greater importance than it once had, and is more widely appreciated. Yay!

So naturally I'd love to have music in Cogmind. That I'd one day be all grown up with my own game that could have its own professional OST? My 7-year-old mind would be blown Tongue. But in the end I'll have to put aside my personal preferences and do whatever works best for Cogmind, for which there are a number of different options that don't necessarily equate to a full-on "music music" OST.


Music vs. Sound Effects
Cogmind is rather unique in that it already includes a detailed soundscape providing lots of audio feedback for everything that's going on, both interface-wise and surrounding actions. Different beeps and bloops for anything you do, material-based sounds for a variety of actions, unique sounds on talking to each major NPC, distance-based volume for explosive and other special machines, of course hundreds of weapon-related effects, and much more supported by an array of more sound samples than almost every indie game out there. If it happens, there's a sound (or three Tongue) for it.


Zoomed out view of all Cogmind sound data to date, 821 of them (even more if including the additional samples layered in).

These sound effects do a pretty good job of creating the right atmosphere on their own, though there is still potential room for a separate continuous layer of music or ambient tracks to enhance that atmosphere and mesh it all together. The question is whether it's necessary or desired, and what factors play into that decision.

Music is certainly tied closely with pacing, and in roguelikes pacing can vary greatly from player to player, or even from moment to moment in the same run. You might be making rapid decisions that could involve either combat or simply inventory management, or you could be in a pitched battle during which you suddenly choose to cautiously and intentionally make every little decision only after some thought. This makes dynamic music not quite as appropriate for turn-based games. Instead, sound effects work better as a way to match the player's pacing (problems associated with animations and large battles aside, which I've tried to mostly head off with faster animations). In this way the sounds themselves are together a type of "dynamic music," with the added benefit of each component offering its own feedback to the player.

While over the past couple years Cogmind has gotten along just fine like that, let's examine some other possibilities.


Form
There are multiple potential approaches to music here, each with their own benefits and drawbacks.

Music Music
Music with strong melody (and a variety of instruments?) makes for good listening on its own, but would steal too much of the attention from the existing soundscape. This is also the kind that players (especially roguelike players) would tend to simply turn off anyway, and is the only category I believe should probably be out of the question for Cogmind.

Of course, like any of my claims in this post, an individual composer's talent could very well prove me wrong under certain circumstances. Regardless of type, the best video game music eventually doesn't even register while playing--despite being a part of the experience, as an integral part it is absorbed into the whole. Ideally players can focus on it and it sounds good, or not focus on it and it fades into the background. I'm guessing it's harder to achieve this effect with less ambient forms of game music, so again it's a question of skill.

Semi-ambient
One step away from music with a strong melody we have that which borders on ambient, but still uses a recognizable yet subtle melody. This more subdued type could be appropriate for Cogmind, having the advantage of using continuous music to "unify" everything in the existing soundscape without overtaking it, while also possessing its own identity.

Pure Ambient
For a while I've imagined that this will be Cogmind's best option, though it's also harder to find and judge who might be good at this, since it's a very game-specific, atmosphere-specific approach. For someone to do this well, they would also ideally have personal experience with each respective area in Cogmind's world, because a lot of that feeling comes from playing rather than from visuals (by contrast the latter would be the case in most other games). I guess I'd end up just trying to do my best via descriptions Tongue

Any music should definitely strongly reflect the area in which it's heard, in line with Cogmind's overarching design goal to maximize immersion, and pure ambient tracks would have the easiest time helping to achieve that goal.

As a test, for a while now Cogmind has already included two tracks that fall under this category, relatively monotonous looping drones used in the cave areas as well as Command. Not the best examples, but they work okay. In all these months I haven't received any feedback as to whether they actually add anything / enhance the experience.

When I think pure ambient I also think there could be other faint/distant sound effects playing in there, so better than the samples above, although it's challenging to have a looping track in which such elements don't stand out every time they come up! That might need to be dynamic--random effects layered on top of a continuous looping background.

Local Ambient
Very similar to the previous pure ambient option, this one may be able to achieve the same effect. It takes the "sound effects create the ambience" approach to an extreme, relying on numerous localized ambient sounds sourced from machines producing looping effects. However, in its pure form there is no unifying continuous track throughout a map.


Visualizing the sounds emitted by select machines. I've written about the system behind this before.

The advantage here is that it's something I can do myself, meaning it's both cheaper and gives me more control over the feeling I want. (I don't have the skill to do any of the other types above.) Finishing it would probably take at least a week, so technically it's something I could try before going with any of the other options. As seen in the screenshots, only a handful of machines in Cogmind currently produce sound--like the ambient samples they were just a test.


They're dynamic! Ambient sound changing as a door is opened or wall destroyed.

In the end, machine-based ambience and any kind of music are going to be mutually exclusive, unless that "music" is extremely subdued, as with the cave/Command samples.

Outside roguelikes, there are some examples of games that have taken this route, and for similar reasons, too. For example, The Witness doesn't include music. Nor does Duskers. Like Cogmind, both place a heavy emphasis on immersion, and have been praised for it (random example, one of many I've seen). Interestingly, since it came out I've heard more than one account of direct comparisons between Duskers and Cogmind.


Style
In a general sense there are two ways to go about music style, either something bold and experimental, or "safe"/"just there in the background." Hard to choose between the two! Especially in a game like Cogmind which already has its own audio identity to an extent.

Movies and games are rather different mediums, but the same general principles apply across them--check out this video (the point is summarized from the linked 12:04). Lots of games go with safe music, which is otherwise not very interesting in itself. But more and more games have proven it doesn't have to be that way. Of course, taking a pure ambient route misses out on the value of having music which is memorable and associated with the game, as well as a draw for anyone listening to trailers or gameplay videos for the first time. (That said, I've also noticed people dropping into streams and immediately being awed by Cogmind's existing combination of animated terminal aesthetics and its accompanying sound effects, so I guess that much already comes across...)

As for specific style, I don't think there's any argument that Cogmind music (assuming there is any) should be electronic/tech-ish in nature. No pianos or acoustic guitars here. One common reaction might be "chiptune!," but to be honest as much as I like that style myself I don't think it fits the theme of immersion and realism which we already see with the mostly realistic sound effects. Chiptune has more of a gamey, less atmospheric feel to it. Cogmind probably needs something more gritty and sci-fi than that.

We can make further inferences about what Cogmind players expect and enjoy by checking out what they're already listening to (see addendum at the end of this post).


Money
Music is expensive. Well, okay, it can be very expensive, or even not too bad, depending on the composer, style, and volume of work required. Cost is the biggest reason I'd even hesitate to at least try out a soundtrack.

Music is obviously not necessary for Cogmind, but how much would it add to the experience? And is that cost worth it? The answer will vary greatly by individual player and whatever style and format are chosen. Taking it as a trade-off, a professional composer to do a full OST for Cogmind would come at the cost of at least several months or more of time I could afford to spend adding extra content. That's because I'm willing to work very cheaply on my own game, but the pros are not Tongue

I'm not looking to buy the full rights to the music, meaning a composer could certainly sell a Cogmind OST, and Cogmind is not exactly an unknown game (I can see it being fairly popular once it's out there), so maybe that counts for something? A lower rate perhaps? Smiley For a composer that only makes sense at the more musical end of the OST spectrum, but that's also the type of music which is more expensive in the first place. (Ambient work is generally cheaper per minute.)


Assets
How much music do we really need, anyway? I can't show a full world map here because spoilers, but I can say that at an absolute minimum there would need to be 6 different tracks. But that's woefully inadequate in a world with nearly 40 maps divided into about 30 types.

The problem is that as soon as one or two of the more specific map subtypes get their own music, it would seem odd that others don't have their own as well. A more realistic minimum would be 10 tracks, which still merges a number of areas with unique meaning, gameplay, and/or atmosphere. As I've divided it up, a more ideal number hovers around 16.

The total cost will also depend on the precise length of each track, which itself could vary widely depending on style, composer, and what turns out to work the best. I'd say a minimum is probably 2-3 minutes per track, putting the minimum combined length at 12~18 min (low end, unlikely), 20~30 min (realistic middle ground), or 32~48 min (better estimate). Preferably they'd be longer, but then some of those in quicker areas would naturally also be shorter to mostly compensate.

Then of course there's the consideration that new maps added in the future will likely require their own music, and that any additional asset requirements placed on new content slow the addition of said content while also reducing the total amount which can be added further down the line. This is one of the unavoidable annoyances of taking roguelikes commercial and adding higher production values overall Tongue


Composers
There are countless qualified pros out there. I spent a good bit of time researching potential candidates a couple years back, and over the past two years of alpha others have contacted me directly expressing interest in doing the OST. I've never specifically contacted any of the composers I researched, but all of those on the short list below have gotten in contact with me at one point or another. I'll introduce each below, but know that I have not all that recently spoken with them about the possibility of doing an OST, so they may not even be available these days, or simply too expensive.

(Of course, as my luck would have it, all these composers live in expensive countries, which makes it harder for me to come up with the rates necessary xD. I've seen some pretty good composers in cheaper countries who work for lower rates, but no one yet that I think would be a good fit.)

Alex Yoder
Alex did Cogmind's Alpha Trailer music, which has received a lot of praise (no surprise there--it's wonderful!).


A trailer music's format is different from what one hears in a game, but Alex has done work on games before, including the well-known Crawl. His style involves some pretty interesting sounds. It'd be neat to see what he could come up with for Cogmind. You can hear more of his sci-fi-ish stuff here, here, and here.

Ben Prunty
As composer for the famous FTL, Ben probably needs little introduction. It's hard to say what he'd come up with for Cogmind since he's got a wide variety of styles, but he did mention being interested in doing the OST if given freedom to experiment.

On top of the skill factor, Ben also brings up the potential value of having a recognizable name attached to the OST, and by extension the game. That fame can be a drawing point itself, something that isn't as easy to quantify and factor into cost vs. benefit.

Neon Insect
A composer-plus-Cogmind-player, Neon Insect sent me a track inspired by the game. You can listen to it here. It doubles as as good example of what I was calling "semi-ambient" above.

This particular track isn't amazing, but then it was just a quick fun thing he did one day a couple months back, not a final version. I played through a whole run with this going in the background and it did a nice job.

I have more composers on my list--these are just the first few that stood out so far. If you yourself think you've got a style that could work, or would like to recommend some other composer, I'm happy to listen to suggestions and submissions :D


Addendum: What are Cogminds listening to?
People have so much of their own music these days, or access to it via the net, that it's been easy for players to insert whatever they feel is appropriate while playing. It still seems better to provide something official if possible, which can then be muted if desired. But if we can know that a large number of players will just turn off the music, then it's kind of a waste, eh? Tongue (That money can be put towards feature dev!) At the moment it doesn't really feel like anything is truly missing without music, as it would with other games, though the fact that many players are usually playing to their own music implies that there's space for something there.

Looking back at what Cogmind players have reported listening to over the years...

The Deus Ex: Human Revolution OST is popular, which together with the

is what I've played to the most. The

is also popular. Other OST recommendations from players: Frozen Synapse, Hackmud, A New Dawn (MW2 covers).

What do you listen to while playing? What direction would you like to see Cogmind take in terms of music, given your experiences and the considerations I've run through in this post? Discuss here, on the blog, or over on the forums.
« Last Edit: April 04, 2017, 05:39:33 PM by Kyzrati » Logged

Kyzrati
Level 10
*****



View Profile WWW
« Reply #923 on: April 07, 2017, 06:34:48 AM »

This week I had some free time one evening and added an experimental feature I've been wanting to do for a long while: visible sounds :D

"Seeing" a battle between my allies and a patrol backed by garrison forces around the corner, including an exploding machine array:

Sounds heard by the player are shown at their precise location, and color-coded by type.

Another recording of that situation without the map background:


I may not leave this feature in, but I'll let everyone use it for a bit and see if and how it affects strategy.
Logged

Zireael
Level 4
****


View Profile
« Reply #924 on: April 07, 2017, 07:11:26 AM »

This feature is excellent, I wish I had Cogmind (guess it's time to save some money) - being able to see where sounds are coming from is a lifesaver when your hearing is bad Tongue
Logged
Kyzrati
Level 10
*****



View Profile WWW
« Reply #925 on: April 07, 2017, 04:06:39 PM »

True this could help those who can't hear the sounds as well, something else I should point out about it in the release notes I guess Smiley

It's already possible to turn off distance-based volume to make all sounds more audible, but then you'd lose that bit of information; having it restored by being visible helps there.

In addition to this I've been thinking about adding a sort of "close caption" feature that actually writes out the names of the sounds, though that would probably be rather annoying for general use--complicated to handle in a nice way and not very easy to follow when a lot is happening...
Logged

rj
Level 10
*****


bad, yells


View Profile WWW
« Reply #926 on: April 08, 2017, 01:14:16 AM »

aw man i think i submitted my music for consideration for cogmind yyyyyyyeeeeeaaarrrrssss ago but i've been a pro music man for a decade plus now, am pretty well known across some swaths of the internet for doing music for homestuck ( know) and i've been following cogmind for threeish years.

i can totally send more than these examples (and i can do way more styles thna this!) but these are all mine and run the gamut of techy music from dubby electronica 90s excursions to hardcore drillnbass to modern synthwave to analog 80s vibes and ben pruntyish ftl-y stuff even, all stuff that imo may fit cogmind well, but the only way to really get something unique for your neo throwback (is that accurate) would be to do a test and try some stuff out. i basically just laid out moooost stuff i have online that's semi-relevant (in no given order either)

apologies for the giant dump, i'll likely delete later

 
https://spellmynamewithabang.bandcamp.com/track/null-void
https://soundcloud.com/spellmynamewithabang/gore-this-most
https://spellmynamewithabang.bandcamp.com/track/unhackable-ath
https://spellmynamewithabang.bandcamp.com/track/instructions-on-how-to-fix-the-future
https://soundcloud.com/spellmynamewithabang/boss-3/s-M27ib
https://spellmynamewithabang.bandcamp.com/track/game-over-3
https://spellmynamewithabang.bandcamp.com/track/music-of-space
https://soundcloud.com/spellmynamewithabang/realtitle/s-5Pi4y
https://soundcloud.com/spellmynamewithabang/level3/s-K1Nfe
https://soundcloud.com/spellmynamewithabang/numberstation-2/s-htki5
https://spellmynamewithabang.bandcamp.com/track/sbversive-jungle
https://spellmynamewithabang.bandcamp.com/track/parenthetical-excitation
https://soundcloud.com/spellmynamewithabang/listening-to-you-near-final-instrumental/s-5bxQC
https://spellmynamewithabang.bandcamp.com/track/battle-theme-for-the-lost-at-heart
https://soundcloud.com/spellmynamewithabang/7a-1/s-zNTTK
https://soundcloud.com/spellmynamewithabang/obvgen_friendship_never_endsv04
https://soundcloud.com/spellmynamewithabang/obvgen_t-a-l-e-n-t
https://spellmynamewithabang.bandcamp.com/track/bird-versus-bee
https://soundcloud.com/spellmynamewithabang/phantom-soulking-sketch-1/s-sY1Dm
https://spellmynamewithabang.bandcamp.com/album/stuckhome-syndrome-part-one-v1-years-in-the-past#
https://soundcloud.com/spellmynamewithabang/courtroom-pursuit/s-ejJUg

anyway yeah! and obviously i can do everything in between, move more ambient, less, whatever. i don't mean to sound Arrogant My Dude but i've been at this a bit and honestly i think i'd be suited for this, myself, so if you're at all feeling any of these tracks here definitely hit me upppppp
« Last Edit: April 08, 2017, 02:44:55 AM by rj » Logged

Canned Turkey
Guest
« Reply #927 on: April 08, 2017, 10:16:40 AM »

^^^^ ^^^^^^ ^^^^^^^^ ^^^
rj gets my immense recommendation
Logged
Kyzrati
Level 10
*****



View Profile WWW
« Reply #928 on: April 09, 2017, 05:56:40 PM »

Hey rj, sorry I didn't get back to you quicker, but it takes longer with music submissions since I prefer to listen to everything before replying Smiley

I like your music--very nice work! Although I don't think your style is what I'm looking for with Cogmind.
Logged

rj
Level 10
*****


bad, yells


View Profile WWW
« Reply #929 on: April 09, 2017, 06:14:03 PM »

yeah as i said probably none of this fits well as is. i'd loveeee to do a test for you but i get it if it's just not your bag for this game!
Logged

Kyzrati
Level 10
*****



View Profile WWW
« Reply #930 on: April 09, 2017, 06:16:21 PM »

Yeah, not to say you wouldn't be able to do it, but if possible it's likely I'll go with someone whose samples and prior experience are already closer to what sounds best for this particular project.
Logged

Kyzrati
Level 10
*****



View Profile WWW
« Reply #931 on: April 17, 2017, 04:09:20 PM »

I've lowered Cogmind's price to the final $19.88, the first change in almost a year as we approach the second anniversary of Alpha Access. All the main content will be finished with the upcoming release, and then we're headed to Steam, so it's about time to do this.

The release was going to be next week, but I won't make that deadline after deciding to spend a good chunk of last week adding yet two more endings to the game, for a total of seven xD. Seven animated ASCII endings to discover... yeah that messed up my schedule! But hey, players will get some answers and the kind of resolution they deserve :D


Anyway, the new price is up on the buy page, along with a link to purchase as a gift for someone else (a feature that's been requested a few times before--good thing to have when you're selling a game from your own site!).

Next month I hope to write up a financial review of the second year of alpha.
Logged

Kyzrati
Level 10
*****



View Profile WWW
« Reply #932 on: April 21, 2017, 06:38:34 AM »

I like optional challenge modes, so I just finished off another batch of them today--six more on top of the two we already have Smiley

Devolution: Start with 20 slots chosen randomly (from a weighted distribution), and lose 1, also randomly, at each new evolution. Base integrity never changes, always resetting to 800 with each evolution, and inherent heat dissipation (20) is also static throughout the run. If there are no free slots of the type that devolves, a random excess part is dropped to the ground. Bonus points are applied at each evolution: (500 * ([# slots you'd normally have at given depth] - [slots you actually have - 2])), meaning large negative modifiers in the early game and even larger positive modifiers in the late game. Incompatible with Inhibited Evolution and Unstable Evolution (Devolution takes precedence).

Sample devolution build starting out on -10/Materials Tongue


Gauntlet: All branch access is blocked, as are all main access points except the furthest from your entry location. Waste is still accessible, as are Garrisons, but both always bring you back to the same depth. Incompatible with Super Gauntlet. (Gauntlet takes precedence.)

Inhibited Evolution: Only evolve half as many slots as usual.

No Salvage: Destroyed robots leave no salvageable parts, only matter (and inventory items, for special events that include those).

Pure Core: No inventory slots for the entire run. Storage utilities are instead converted to matter when stepped on.


Super Gauntlet: All access points are locked, as are all but one garrison access. The only way to advance to the next depth is to find that one garrison and pass through it. Hacking open the entry is guaranteed, and leaving a garrison always takes you upward rather than back to the same map. Waste is still accessible.


Also, all active challenges will now be listed in the log at the start of your run, lest you forget what you've set yourself up to face Tongue


As usual, pretty much any number of challenges can be combined for mega points (and maximum pain!).

Other things I've been adding: a bunch of new items, some with completely new mechanics:


And the price change this week apparently went over nicely Wink
Logged

Kyzrati
Level 10
*****



View Profile WWW
« Reply #933 on: April 25, 2017, 05:10:12 AM »

Another "week of many little fixes and tweaks in preparation for a major release" is upon us...

In the process I got a neat-looking recording of mapping drones doing all the work for me :D
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #934 on: April 25, 2017, 05:20:21 AM »

Is that a giant snake chasing cogmind through the dungeon? Who, Me?
Logged
Kyzrati
Level 10
*****



View Profile WWW
« Reply #935 on: April 25, 2017, 04:48:24 PM »

Haha, but Cogmind isn't moving Tongue

Cogmind is... The Snake Handler!

Funny how I did this recording just for fun as I was testing something, and as people responded to it and I looked at it more and more, I came up with another really cool idea for a new feature we'll almost certainly see later on. Sharing stuff sure is helpful Smiley
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #936 on: April 27, 2017, 03:14:59 AM »

Oh dear

EDIT: To clarify, you sound like a happy Dungeon Master when I read that. And as a former D&D player, I know that when the DM is happy, you should fear for your life.
Logged
Kyzrati
Level 10
*****



View Profile WWW
« Reply #937 on: April 29, 2017, 05:37:39 AM »

EDIT: To clarify, you sound like a happy Dungeon Master when I read that. And as a former D&D player, I know that when the DM is happy, you should fear for your life.
Haha, nice clarification. I do get that a fair bit when chatting with players.
Logged

Kyzrati
Level 10
*****



View Profile WWW
« Reply #938 on: April 29, 2017, 05:52:13 AM »

So much progress!!! I love the weeks where I get to blast through many little features rather than slog through singular giant ones Smiley

Eye candy-wise, the new Transmission Jammer activation is probably one of the more interesting:

(I changed the mechanics a bit so it needed an animation that better reflected its new rules.)

And now all the former (destroyed...) wall/earth areas glow red, even without an active Structural Scanner, so it's easy to see where it's dangerous to walk! Here they're busy cleaning up my mess Tongue


(I posted a longer list of updates on r/roguelikedev, and even added five more showable features today which aren't included there, but all that stuff's going to be in the upcoming release preview anyway.)
Logged

Kyzrati
Level 10
*****



View Profile WWW
« Reply #939 on: May 01, 2017, 04:54:55 PM »

Working with Seeds
[Cross-posted from the devblog here--follow link for better formatting and light-on-dark style.]

No, not plant seeds.

As most fans of the genre are aware, a fair portion of a given roguelike run is determined based on values returned by a pseudorandom number generator, commonly referred to as the RNG. Before it can do its job, an RNG must be "seeded," or given a value that starts the entire chain of values to be returned beyond that point.

Certainly when a roguelike starts up all it has to do is seed the RNG with the current time (the most common practice) and then not worry about it after that--the RNG helps create maps, chooses what populates that map, determines the outcome of actions, and so much more. But it turns out there are many other seed-related considerations and applications when developing games with procedural content.

Important to all this is the understanding that the seed used to initialize the RNG doesn't have to be random. If manually set to the same number each time, the resulting chain of numbers it spits out will also be the same!


Cogmind's Seed Structure
For reasons we'll get to, Cogmind doesn't just store one seed. There is of course The One Seed, actually called "worldSeed," which is the single seed from which all others are derived. So in a normal run the world seed is simply based on the current clock time (meaning yes, players who start their run at exactly the same millisecond will technically be getting the same world layout!). And by reusing a specific world seed value in a future run, the exact same world can be generated again and again. Or by simply starting a new run at a different time, the world generated will be completely different.

But if that's true, then why do we need more than one seed? The answer in two parts: 1) individual maps are not generated until the player reaches them; 2) different players may visit maps in a different order. Therefore at the very beginning of world generation, right after the world seed is determined, it then creates the world layout and within the data for each potential future map it stores the seed to be used to create that map if and when the player arrives there.


Every map has its own mapSeed, generated by the worldSeed (some extraneous comments and code trimmed for clarity).

When the player arrives at a new map, the map generator loads the seed for that map before starting the process. This ensures that everyone visiting that map via the same world seed will also get the same map, regardless of how they reached it.


Development and Debugging
As you can imagine, the ability to force the world to generate in a predictable, repeatable pattern by manually setting the seed is extremely useful for perfecting a map generator like the ones I've talked about before.

My first use of seeds in Cogmind would have to be during early pre-alpha development, where much of the focus was on map generation. Being able to seed the generator to recreate the same map again and again when working out problems with the underlying algorithms saved a ridiculous amount of time compared to just waiting for specific problems to pop up. So I could keep skipping through procedural maps until finding an issue, check whatever seed led to it, force the generator to use that seed, then step through the process to find out what went wrong (or could be improved). It's really easy to track down isolated issues by simply putting a breakpoint in the debugger for a specific coordinate in question, and examine what's up with it.


I spent a lot of my time looking at maps like this, waiting for a "bad seed" to investigate.

After releasing the alpha, bugs either reported by players or that I discover myself are sometimes related to the initial state of a map, and in cases like that it's ridiculously useful to be able to just load up whatever seed produced that map and take a closer look. Being able to reliably repeat a bug is the first, and biggest, step to actually resolving it! The alternatives are not too pretty--if unable to guess the cause from a simple report, having to wait for it to appear again to get more details is an annoying drawn out process, not to mention much more difficult to do remotely.


A run's seed is output to run.log while the game is running, as well as added to the final score sheet.


Preserving Consistency
It turns out there are all sorts of places where a seed can go wrong Tongue

Ideally a world and its maps and all the little details within those maps originating from a single seed should be the same for each player using it, so there are important game-specific considerations aimed at preventing "divergence."

A simple example would be scrap piles in the caves, which are kind of like treasure chests that drop loot. If I didn't care about proper seed support my normal approach would be to simply generate the loot on the fly when the player steps on the pile, but each player will have taken different actions before that point, meaning the RNG will give each of them different items! For consistency, all players using the same seed should have access to the same "random" loot. Of course the brute force method would be to pre-generate and store all the loot when the map is first created, but this is wasteful in terms of both time and memory. Instead each pile just stores its own unique "loot seed," and when necessary that seed is used to seed an RNG which generates the loot on the fly. That way it comes out the same for everyone on the same map. (It also means that attempting to save scum to get different loot won't work Tongue)


Determining loot from scrap at the point of interaction.

An example of a system that required a more involved solution to ensure consistent game worlds is the unique encounter handling. While some encounters in Cogmind are generic and might occur more than once, many are unique and should at most happen only once per run. (It would be weird to meet the same named NPC and specific encounter more than once in the same run Tongue) But because maps aren't generated until the player reaches them, there's no way to know which map might use a certain unique (or otherwise limited-count!) encounter. A given encounter may be allowed to appear on any number of maps, but what if player 1 visits map A first and gets that encounter, while player 2 instead visits map B first and gets that same encounter. Their maps will generate differently! And they'll have even more divergent experiences if they then visit their respective "other map."

To address that, all unique or limited encounters are randomly assigned a valid map when the world layout is first generated, and they will be chosen from among the pool of encounters available for their map, which may or may not use them--it can't be sure because there may be other conditions required for that encounter to actually appear (conditions that cannot be confirmed until the map itself is created), but at least it's known that said encounters cannot appear on other maps and cause divergent runs from the same seed!

Seed-based map generation also requires explicitly separating out a number of components that factor into the initial state of a map, where those components are derived from player actions. Actions like bringing allies from one map to another, or plot-related content through which the player can affect future events, all need to be taken into consideration to prevent prior actions from affecting the base map, which should remain as consistent as possible aside from purely what the player influences. For this reason I'm careful to exclude anything player-specific from the map generation process until the very end.


Cogmind mapgen source transition from the underlying map to player-specific adjustments.

Other changes to the usual behavior are necessary when players manually seed their own run. This is to make sure that the handful of automated player-specific meta features are deactivated. These are features aimed at newer players, such as the tutorial map, which normally replaces the first map for a player's first three games. Another example is an encounter inserted only the first time a player enters a Waste map, wherein a Derelict says a little dialogue before running ahead and getting brutally crushed so the player immediately realizes that's not something they want to do Tongue


Bad things are about to happen.


Seed Formats
Seeds don't have to be numbers! Well, they are internally, but developers shouldn't place dev restrictions on players where unnecessary. It's time for more "ergonomic" seeds Smiley

Number-based seeds are boring, and not as easy to remember or share, so early on I made sure to allow any alphanumeric strings to count as valid seed input. Players can, for example, try out using their name as a seed, or some other interesting words or phrases. I've even had one player go through multiple runs, changing the seed to a new phrase each time, which when read together formed a longer message and appeared in the upload stats Tongue

Of course, internally these string-based seeds are no different from numbers. Each character is converted to its decimal value, all of which are multiplied against one another to create a final number the RNG can use as a seed.

So manual seeds have always allowed strings, but random seeds (i.e. the majority of seeds players are using by default) have still been represented by numbers. More recently I decided that I wanted to take this a step further and have even random seeds be expressed in words, but how would they be determined?

The solution was inspired by gfycat, which instead of generating a string of random characters for their URLs uses an AdjectiveAdjectiveAnimal format (see the end of their about page). My first thought was to go with lists of Cogmind-relevant words that I'd draw up myself, but that looked like it would be quite a lot of work--there had to be a quicker solution. And there is!

Cogmind already has a bunch of relevant adjectives and nouns in the game data itself, so why not just use those? Specifically, most items are named in a predictable Adjective + Noun format, and those words can be extracted for use in mixing and matching. Cogmind has nearly a thousand items, and the number of permutations if we pick three sub-words in a row gives plenty of variety. AdjectiveAdjectiveNoun it is :D

To create a seed, the entire list of existing item names is parsed according to various rules, creating a separate word pool for adjectives and nouns. Nouns are generally assumed to be the last word in an item name, and all the others are treated as adjectives. Other filters to keep some of the weirder items from creating seeds with odd formatting:
  • Word must contain at least three characters
  • First two characters must be different from one another
  • No words including punctuation or digits
  • Word cannot be entirely upper case
And finally no duplicate words are added to the pool (which would weight them higher). In the end we get random seeds like this:


Randomized "fake item names" as seeds--much better than something like "1477302648"! (see a longer list of samples here)

These fake item names are a heck of a lot more fun than numbers, and there's the added bonus of seeing words in there that you may not recognize, as a kind of teaser for other items that are actually out there somewhere. As mentioned before, the random seed used to create a run appears in the score sheet, and each is also listed alongside its run in the composite score history.


Scorehistory.txt, with fake item seeds.


Miscellaneous Applications
We're not done yet! Seeds have a surprising number of applications, so let's check out some more of them...


Community
Roguelikes are single-player games, but there are plenty of features with community-building potential. One of those is so-called "weekly seeds," where a single seed is played through by multiple people who can then share their experiences, or compete with one another for the best score, knowing that they are at least playing with the same fundamental circumstances.

Cogmind has had... semi-weekly seeds for the past couple years. Although not as popular as they were in the early days (when lots of the regular players were on the forums instead of chat Tongue), I'm sure they'll pick up again when the player base expands again this year. Some roguelikes such as Caves of Qud even have the weekly seeds built into the game itself (with separate leaderboards!), something I haven't done yet but probably should at some point.


Replays
One thing I've always wished I could to do is enable full replays of a run, which is most easily accomplished by combining a seed with the player's recorded input. But a couple of architecture road blocks have made that all but impossible :/. Cogmind's animation system is mixed in with the game logic, so features like adjusting the speed of animations (or canceling them altogether) are not possible. For replays to work there's also a need to use different RNGs for the game logic and any rendering-related functionality, which is something I didn't do. Essentially, this kind of feature should be built in from the beginning to make sure it works, rather than trying to tack it onto a sprawling 120,000-line code base Tongue

Obviously replays also add a lot of value with respect to learning and community-building. At least we always have streams and LPs, in any case.

Regarding that replay technique, it can even be used to implement saving. Instead of actually saving the entire state of the game, save all of the player's input from the beginning. Then when it's time to load, seed the RNG using the same value, followed by all the same input to get the same final result! I've heard that Brogue saves work this way, although "replays" are such a complicated thing that I've also heard Brogue's saves are prone to breaking in some cases, which prevents loading that saved game :/. Still, a very cool system overall!


Saving Large Worlds
Another type of seed-based saving is useful for large open-world games, in which storing the entirety of the game state isn't feasible (too much space!), nor is keeping every visited location in memory. Instead the world is divided into chunks, each with its own seed (essentially how Cogmind's map-specific seeds work), and a chunk is only generated when the player nears it. Storing that area on traveling elsewhere, or saving the game, is simply a matter of storing its seed along with whatever changes occurred between its generation and the time it's stored. So even games with destructible terrain and other player- or NPC-induced changes can take advantage of this kind of "delta map" system to keep system requirements within reason, despite having nearly infinite space to explore. (Literal space exploration games can use this same method. One such example was Infiniverse, but sadly its site and some relevant technical articles are no longer available...)


Seed Catalog
One of the more unique seed applications I've seen is the Brogue "seed catalog," which comes with the game and contains a list of every item found on each of the first five floors for the first thousand seeds.


Excerpt from Brogue's seed catalog.

Basically it's a meta-approach for adjusting the difficulty, or perhaps to look for a seed more suitable for a desired play style (since early-game items in that roguelike can have a significant impact on long-term strategy).

Have you heard of any other uses for seeds? I'm sure there have to be more out there...
Logged

Pages: 1 ... 45 46 [47] 48 49 ... 71
Print
Jump to:  

Theme orange-lt created by panic