Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 4 5 [6] 7 8

Author Topic: Let's Make! (Dathida's Legacy, a graphical roguelike)  (Read 13447 times)

Lemunde

  • Bay Watcher
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #75 on: July 08, 2010, 07:59:00 am »

I got most of the command menu, inventory and item stuff in place.  If there's going to be any hard to find bugs it will be with those so I'm testing them extensively before I move on. 

As a stress test I added 10,000 potions to random positions on the map and didn't notice any slowdown.  So I pushed it up to 1,000,000.  Without placing any items this simply increased the time it takes to load the game significantly.  Normally the game loads nigh instantaneously.  Once the game loads it runs fine but makes the game use over a gig of system memory.  If I actually place that many items...well I'm sure it would load eventually.

The total number of items on the map should never reach 10,000.  To do that would require the maximum number of creatures to drop the maximum number of items in their inventory.  For gameplay reasons I don't plan on allowing creatures to drop more than a handful of items when they die.  Combined with items already randomly scattered on the map I estimate the most you'll ever see is around 2,000. 

Of course there's nothing to stop the player from dropping that many items and I'm sure some will try.  However it will start to look pretty ridiculous around the 100 mark when they start dumping items all on one tile.

I still have a few things to sort out with commands and inventory then I'm going to start laying the groundwork for save functionality.
Logged

Lemunde

  • Bay Watcher
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #76 on: July 09, 2010, 09:28:41 am »

Still squaring a few things away with command menus. Creatures are now dropping corpses when they die, which is essentially an item clone of themselves with some graphical modifications. The portrait gets replaced by crossed bones. I considered using a skull and crossbones but I thought that might look ambiguous with skeletons and necromancers running around.

For a little graphics enhancement I created a new GameObject array for VanishingObjects. Whenever a Creature dies or an Item is picked up it creates a graphical clone with a 1 second lifespan. As the vanishing object approaches the end of it's lifespan it's alpha value decreases making the object more and more transparent until finally it disappears. It's a definite improvement over the harsh instant transition from Creature to corpse.
Logged

Supermikhail

  • Bay Watcher
  • The Dwarf Of Steel
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #77 on: July 09, 2010, 09:46:46 am »

Does the corpse decrease in transparency, too? Also, I would think that 1 second is kind of longish... although, roguelikes don't exactly have dynamic gameplay, but still, items staying for a second can be kind of misleading.

Or maybe I'm MAD! Christsake, trying to start a debate over a difference of milliseconds.

By the way, maybe you would like to upload some videos of the game in action?
Logged

Lemunde

  • Bay Watcher
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #78 on: July 09, 2010, 10:10:24 am »

The durations seems pretty appropriate from testing.  Even though it takes an entire second to disappear it takes much less time to notice the alpha is dropping.  I was going to have item functions take up a round but that would get really tedious for the player.  But if I did have picking up an item take up an entire round this would be more of an issue.  Either way it's a matter of swapping out a number if I decide it's taking too long.

For previous projects I have made videos but I think I might have started making them too early in development.  So you end up seeing videos of the same game that look like two completely different games.  I guess there's nothing really wrong with that but all the same I'm going to wait a few more days before I upload a video.  But if you would like to see videos of some of my other projects there's a few videos on my youtube page.  http://www.youtube.com/profile?user=Lemunde
Logged

Supermikhail

  • Bay Watcher
  • The Dwarf Of Steel
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #79 on: July 09, 2010, 11:26:48 am »

Wow, this is amazing. I'm starting to regret that I'm not on Windows... or haven't got an xbox. To sum up, have no money. For some reason that "Xeno Arena" just took my breath away.
Logged

Lemunde

  • Bay Watcher
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #80 on: July 10, 2010, 07:58:39 pm »

Still getting a few issues out of the way with items and inventory. I knew items were going to be one of the hardest parts. Fortunately there shouldn't be much more left to do with them so I'll be moving on to more important stuff soon.
Logged

Lemunde

  • Bay Watcher
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #81 on: July 12, 2010, 08:00:44 am »

The save/load code is proving more tedious than difficult. There's a lot of variables that need to be dealt with individually. I had to make several functions to process saved data into something the game can read. Most of that is out of the way but I need to think about how I'm going to handle the save data as a whole.

Saving every individual creature, item and tile alteration would severely inflate the size of the save file, even for a single map. Currently I'm only saving creature information but that alone puts the save file at 200k. That's not too bad but I haven't even added items to non-player creatures yet.

There's several things I can do to lower the size of the save and all of them come with a catch.

First I can setup creatures and items to load all their information from a template. This would destroy any possibility of customized creatures and items and at the very least they require a position to be saved, plus stat changes for creatures. When a map is first generated this stuff gets all their information from a template anyway and modifies it. I could just save the data that gets modified but that is still a lot of data.

Second, I can let everything reset to it's original, randomly generated state when the game is loaded. This is obviously bad for several reasons. The player will have killed off a bunch of creatures in a dungeon and collected a bunch of loot, then load the game to find themselves surrounded by those same creatures and items.

The third option and the option I plan to use is a combination of the first two, except the player will only be allowed to save between maps. Much like in JRPGs where the player can only save on the world map. The catch is...well there's several.

Creatures and items will have reset every time the map is loaded. This can be good or bad depending on the player's tastes. To extend the replay value of a map I will set the majority of creatures and items to be randomized each time. For important creatures and items like non-hostile NPCs, bosses and special items, I will tag them as persistent. Persistent objects will not be randomized when a map is loaded but I will only have to save their dead/alive/picked up status. They will use the same seed the map uses to be generated. Other objects will use a random seed.

When all is said and done I should only have to save the player character's information and a few variables from each map.

I implied earlier that changes to map tiles may be a possibility. A handful of changes wouldn't be a problem but I also have to consider the possibility of the player tearing down every wall and tree he comes across. I may allow for some maps to be completely saved to the hard drive to let the player construct a home or something. That's going to be pretty far down on the list of added features so I'll cross that bridge when I come to it. For now expect any map changes to be discarded when it's loaded again.
Logged

Supermikhail

  • Bay Watcher
  • The Dwarf Of Steel
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #82 on: July 12, 2010, 08:34:59 am »

That's good. Only few, if any, RPG's have figured out a way to save everything on the map. I'm not sure, but I think, Diablo does.
But then, the monsters there are preset and don't really carry any items.
Additionally, you could allow the player to build only in some safe areas. After all, building or terraforming in any way is a time-consuming process, so, maybe, for it to have reasonable speed, there shouldn't be any interruptions.
Logged

G-Flex

  • Bay Watcher
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #83 on: July 12, 2010, 04:22:28 pm »

"Preset"? The monsters in Diablo are randomly spawned after the dungeon level is generated, and their locations are definitely preserved between visits.


I've probably played at least a dozen RPGs where items and NPC locations/status are saved between visits to a given map. The Fallout games did, as did Diablo, most games similar in style to Fallout, quite probably Morrowind, and... I'm not sure how many else, but I'm sure there are enough.
Logged
There are 2 types of people in the world: Those who understand hexadecimal, and those who don't.
Visit the #Bay12Games IRC channel on NewNet
== Human Renovation: My Deus Ex mod/fan patch (v1.30, updated 5/31/2012) ==

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #84 on: July 12, 2010, 06:28:04 pm »

G-Flex is right.

Especially Morrowind.

I laid out every magical, expensive, shiny, rare things I found on top of the Balmora guild buildings,
 and I had nearly covered the rooftops of both before I reached the limit.
Once the limit is reached, the game stuffs your things into "loot bags" while you are away.

EDIT: I acknowledge the terrible grammars of this post.
« Last Edit: July 13, 2010, 01:52:28 am by Outcast Orange »
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Supermikhail

  • Bay Watcher
  • The Dwarf Of Steel
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #85 on: July 13, 2010, 01:48:26 am »

That was stupid of me. :) I should have said the RPG's I've played (or better nothing at all), as when I had money to buy games I stayed with few but for a long time. That's why I probably feel like I've played a lot of RPG's.
By preset I meant only that they aren't randomly modified in their anatomy, so there are preset species of monsters on a level.
And I haven't played Morrowind, but assumed that it followed the same scheme with Oblivion, and in Oblivion at least cells were reset from time to time. Did items dropped by you in the wilderness stay there?
Well, then, Oblivion was pretty generous with its save files, as far as I remember. Morrowind must have been, too.

Good thing about randomly resetting a map when the player leaves it is that you don't need to simulate the events in the absence of the player, I think. At least when it's only wildlife that inhabits the map.
Logged

Lemunde

  • Bay Watcher
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #86 on: July 13, 2010, 10:19:33 am »

Yeah, both Morrowind and Oblivion are pretty liberal with letting you leave items lying around.  Their save files are also pretty big but not as big as they could have been if data had to be saved on individual items beyond their position in the world.  I'm anticipating that other variables on items and creatures may change during the course of the game, so sticking to templates may not be feasible.  There's also the fact that data loading is a total pain in the ass to debug.  The fewer variables I have to save the better.  Saving and loading between maps cuts the required save data down to one creature, one inventory and a few miscellaneous variables for the world.

I very well could rework it to allow more stuff to be saved.  I have a few ideas on how I could make it work.  But I think saving between areas will work better for my goals.  And there's still nothing stopping me from adding a handful of special areas later where changes are persistent.
Logged

Chutney

  • Bay Watcher
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #87 on: July 13, 2010, 10:35:10 am »

I'm not sure if you've been encoding your saves, or just leaving them as .txts the Huffman tree ( http://en.wikipedia.org/wiki/Huffman_coding ), when we made it for class, successfully reduced files down to around 1/3rd of their original size and got more efficient as file sizes increased (ie, a 3kb file would reduce to 1.25, but a 30 would reduce to 11.33). It was also pretty fast (I think at most it was around 2ms? for like a 20mb file, but I could be thinking of a different algorithm and most likely am).

only downside(if it can be called one  8) ) is if you don't already know a lot about trees or working with bits, you'll have to learn something new to use it.
Logged

Supermikhail

  • Bay Watcher
  • The Dwarf Of Steel
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #88 on: July 13, 2010, 10:41:08 am »

Yeah, work those bits!
I haven't read the article, but I've always thought that some space in programming could be used more efficiently, I mean soon everybody is going to only work with long long variables, it seems.
Logged

Lemunde

  • Bay Watcher
    • View Profile
Re: Let's Make! (Dathida's Legacy, a graphical roguelike)
« Reply #89 on: July 13, 2010, 11:29:44 am »

C# actually has an included GZip routine that uses a combination of Huffman and other compression methods.  Once I get closer to a release I'll look into implementing it but for now I need the save files in a visually readable format for debugging.  It shouldn't be too hard.  There's a code example in the documentation that should plug in nicely.

I started work on generating buildings.  I got a function that generates simple, rectangular buildings with a doorway.  I'm currently working out a concept for expanding it into more complex buildings with multiple rooms.  The idea is you start with a single, large room that acts as a hub and add more rooms around it. 

It gets more complicated as you try to make the extra rooms play nice with each other so you don't end up with some weird overlap.  I may need to make an extra function that goes through and cleans up any mess that gets left over.  Or I could make it where generation fails in case of an overlap.  This will take a bit of experimenting to get it working the way I want it.

Spoiler (click to show/hide)
« Last Edit: July 13, 2010, 11:41:50 am by Lemunde »
Logged
Pages: 1 ... 4 5 [6] 7 8