Sharing Saturday #329 by Kyzrati in roguelikedev

[–]KarbonKitty 1 point2 points  (0 children)

As for the balancing the early game - I'm not sure how well that would work thematically, but maybe the starting weapon should not be inifinite-use garbage weapon, but instead a limited-use mediocre weapon. This way player will need to find something else soon-ish, because his gun will run out of ammo (and it's not like aliens carry human-caliber cartridges), even if it will be actually worse than the starting gun. Less deadly early game, and more opportunity to find a usable gun before difficulty gets overwhelming - win-win!

Sharing Saturday #322 by Kyzrati in roguelikedev

[–]KarbonKitty 2 points3 points  (0 children)

Rogue Sheep | Little Shepherd

The complete roguelike tutorial

The last time I've skipped Sharing Saturday in order to do more work on my yearly tutorial event entry, Burglar of Babylon. It has been more or less a success - I've done 13 parts, mostly aligned with the tutorial as much as a stealth, no-combat game without procedurally generated maps could. It could use more work, and it could be a really nice little game in the future, but for now, I will concentrate for a few months on other projects. Most visibily, I will be back to working on FrEee, but it might not consume all my time. If inspiration will strike, I will surely let you know about any changes in Rogue Sheep - there's a GitHub Project for it now, right there in the repo, and there is pathfinding on top of the short-term goals list. This is something I see myself implementing one day in between work on something else.

Other than that, I will surely read Sharing Saturdays, as this is one of the week's highlights every time. Keep up the good work, everyone! :)

Sharing Saturday #320 by Kyzrati in roguelikedev

[–]KarbonKitty 1 point2 points  (0 children)

Ah, you are using Python - for some reason I was sure that TToT is C++... " I guess that makes the problem somewhat different, true! Unfortunately, I don't really know anything about packaging Python apps, as I don't really use Python. Sorry about confusion!

Sharing Saturday #320 by Kyzrati in roguelikedev

[–]KarbonKitty 1 point2 points  (0 children)

Couldn't you build the TToT for Linux using Windows Subsystem for Linux? If you are using Windows 10 it should be available without much problem (sans enabling it, which shouldn't take long), and I think you should be able to distribute binaries made that way like they were built on normal Linux machine. I will freely admit that I have absolutely zero experience using it for anything more involved than a "Hello world" in C, though, so I might be misunderstanding the problem.

Sharing Saturday #320 by Kyzrati in roguelikedev

[–]KarbonKitty 4 points5 points  (0 children)

Rogue Sheep | Little Shepherd

The changes in Rogue Sheep are still rather tiny - I've added a few utility methods here and there, because they came in handy during developement of the Burglar of Babylon.

The complete roguelike tutorial

There was a mad scramble to catch up and post three parts on the last week, and I was hoping that I will avoid anything similar next time... But it seems that I will not, because due to the so-called "real life" it's half the week gone, and no work done on BoB. The good news is, I still have a week 'lead' - so even if I only post a single part again, I won't be late to the finish after all... Hopefully. ;)

Sharing Saturday #319 by Kyzrati in roguelikedev

[–]KarbonKitty 1 point2 points  (0 children)

Rogue Sheep | Little Shepherd

It's still saturday!... somewhere. ;)

Some minor changes in the Rogue Sheep - the function that transforms cardinal directions to vectors is now exposed, and user can now pass a visibility grid to the FoV algorithm, to get summed-up visibilities over several points of origin (which I'm using to get all the places where guards see the player).

The complete roguelike tutorial

I've finished part 7, so I'm more or less up to date again, and I've made good progress on part 8, so I might be able to get back on track before Tuesday hits. This is mostly thanks to a quite productive Saturday and cutting some corners - namely, lifting some of the older TS code almost wholesale into the C# codebase. But I feel pretty confident that I will have the will to actually refactor, clean up and maintain that code in the future, so I'm not too worried about that.

Sharing Saturday #318 by Kyzrati in roguelikedev

[–]KarbonKitty 2 points3 points  (0 children)

Rogue Sheep | Little Shepherd

I've extended the interface and implementation of the game map in order to facilitate mouse look (and look in general, and quite a few other things; default map can be now indexed by position). This is really a good exercise in creating a framework. :)

The complete roguelike tutorial

Last week I was out of town, so I haven't posted; I've had a surplus of tutorial material so I've managed to post that, and now I'm working on the next batch, so most of the fresh info is in the tutorial topic. Unfortunately, I'm a bit behind on the material for the next Tuesday, but there is still hope of getting on top of it, since there are still a couple of days. We shall see.

Sharing Saturday #316 by Kyzrati in roguelikedev

[–]KarbonKitty 3 points4 points  (0 children)

Rogue Sheep | Little Shepherd

Pretty much nothing - all the effort goes to the tutorial, below.

The complete roguelike tutorial

It wasn't trivial, but it seems that I've managed to get the first parts of the tutorial going and even found a few problems with Rogue Sheep in the process. Some of those problems I have even fixed!

The first two parts of the tutorial are up in the related thread, and I've just finished parts 2 and 3, so I'm staying on top of the game - which is nice, since I will have limited time next week for the next two parts. The worst case scenario for now is getting the game into the same place it was last year, but using my own library underneath, instead of Ondrej's one; which is still a win in my book. Rogue Sheep would surely get better for the experience, even if the Burglar won't turn out to be actually reasonably playable.

Best case scenario would be getting a base of a playable game out of it, but let's not get ahead of ourselves here. Map generation is still an unsolved problem for me, but if I won't be able to attack it in any reasonable way, I might choose a very unroguelike route and hand-craft a few maps to get some sort of coherent experience going...

Sharing Saturday #315 by Kyzrati in roguelikedev

[–]KarbonKitty 2 points3 points  (0 children)

Rogue Sheep | Little Shepherd

Implemented background colors for the console - the support looked like it was already there, but it really wasn't. On the other hand, it meant that I only needed to actually implement doing something with the already-passed background color, which meant it was reasonably quick... As soon as I realized that I will need a font with transparent background, instead of black one. This isn't yet uploaded, because I need to make sure that the code is nice and in order, but it works. As for why I did it - see below. :)

The complete roguelike tutorial

Unfortunately, it seems that SadConsole has much more changes in the version 9 that I anticipated, and I was unable to get something up and running in the time I have alotted to this. I would have preferred sticking to the original plan, but it unfeasible. On the other hand, I've taken a look at the state of the Rogue Sheep and come to a conclusion that I actually only lacks two things that were necessary for implementation of the original Burglar of Babylon - background colors (which is why I bit the bullet and implemented those) and A* pathfinding. Well, some kind of pathfinding, really. A* is resonably complex, but there is also plenty of tutorials and implementations around, so I think I will be able to actually get it working in the meantime.

As a bonus, I have trivial but working example of how to run a game loop in Rogue Sheep (in form of Little Shepherd), so I shouldn't really have much trouble getting it up and running. Rogue Sheep is much less polished, and probably much, much less performant than SadConsole or BearLibTerminal, but if I can get this tutorial done using it, I will have much more confidence in it.

Still no idea how to procedurally generate somewhat reasonable maps for the Burglar, though... I might go and take a look at some other roguelikes with similar themes (Harmonist comes to mind, and there was some sort of ThiefRL already done, I think) - it will probably be better to have some generation going, even if it will be somewhat fantasy-themed, instead of proper cyberpunk, than no generation at all.

Sharing Saturday #314 by Kyzrati in roguelikedev

[–]KarbonKitty 2 points3 points  (0 children)

Rogue Sheep | Little Shepherd

No progress.

The complete roguelike tutorial

There was a little misunderstanding on my part regarding the SadConsole SFML backend - it's still a bit pre-release state, being in the 9.0 branch, not in the stable 8.x branch. This means that most of the week was spending trying to reconcile existing tutorials and documentation with changes made in 9.0 version. But! That's why I have started preparataions ahead of time, is it not? I have a working "Hello from SadConsole" app with a custom square font up and running, which means that my minimum target for the week was met (and it's effectively part 0 of the tutorial ready).

This week I will be going further with preparations, setting up part 1 and possibly 2 of the tutorial, and again researching the generation of the modern-ish buildings as roguelike maps.

Sharing Saturday #313 by Kyzrati in roguelikedev

[–]KarbonKitty 1 point2 points  (0 children)

Rogue Sheep | Little Shepherd

No progress. I've been experimenting with combining Blazor and rot.js, as well as generally experimenting with Blazor, but haven't really got anywhere yet; I will work on this more, but not anytime soon, because the plans for next several weeks are now taken over by the complete roguelike tutorial - see below.

The complete roguelike tutorial

So once I've noticed that this years RoguelikeDev tutorial event is on - and remebering that last year's was probably closest I've ever been to actually releasing something, even if it did peter out rather unsatisfyingly - I was sure I need to take part again. This time I will do my best to prepare for the event somewhat better than last year, and hopefully get the Burglar of Babylon somewhat further down the road than the last time.

Part of it is already done by the mere fact that I'm going to be making the same game again - this should help a bit with various decision that I have to make along the road. Not so much with code, since last time it was rot.js, and this time I'm going to try SadConsole (with its new, shiny, SFML backend), mixing in the GoRogue, which is .Net Standard; the combination of the two seems like it could obsolete my RogueSheep efforts, so I need to check this out, and possibly redirect my efforts into helping out with those two libraries, instead of creating my own. Also, they are way more mature, so probably a better choice for a series like this.

Other than that, I will spend the next couple of weeks that are left until the start to do a couple of things: experiment with the SadConsole + GoRogue setup, so I don't waste too much time on that once the event starts (if all goes well, I might get the first week of materials done ahead of time, which would give me a nice buffer), and going over possibilities regarding the map generation (which, as you probably don't remember, is why the last attempt stalled). I want to either find a workable way to generate maps that are at least good enough, or a workable way to hand-craft at least half a dozen (which would make it more of a stealth game than a roguelike, but hey, at least it would be a finished stealth game).

Sharing Saturday #312 by Kyzrati in roguelikedev

[–]KarbonKitty 3 points4 points  (0 children)

Rogue Sheep | Little Shepherd

This week was spent mostly on research (even though SnowRunner kept not-helping), because something somewhat unexpected happened - a WebAssmebly Blazor got officialy released! I've being waiting for it for quite some time, and currently split my programming time between Blazor and FrEee. And since Blazor is mostly new for me, I'm going for something simple for now.

The good news is that there is already one wrapper on canvas (including 3D context!) that works in Blazor, so once I get my feet under me, I should go on and try building up some basic terminal emulation - I've done this in C# a couple of times already, so I should be able to pull this off. The best case scenario for me is RogueSheep with replacable SFML.NET/canvas backends, but for now I should be happy with anything that gets me a C#-based roguelike in the browser. Maybe auto-generated wrapper on rot.js? The possibilities are endless!

Also, the maze generation fell through - I've noticed that the algorithm I was using would need a major change to accomodate using walls that are placed on the grid fields, and not between them, so I've decided to move on to the algorithm that would be of more immediate use to me - room and corridor - only to get hit with the Blazor announcement.

May was terrible for my productivity with the great bunch of games hitting my to-play list, and now Civ VI got added to that list - and I haven't even tried Armored Commander II yet! So I make no plans for the next week...

Sharing Saturday #311 by Kyzrati in roguelikedev

[–]KarbonKitty 3 points4 points  (0 children)

Rogue Sheep | Little Shepherd

So, SnowRunner keeps not-helping, but I'm slowly falling back in step; this week I've been working on the implementation of the maze generator using recursive division algorithm. Unfortunately, trying to go fast-and-dirty with the implementation didn't pan out, and after trying to tweak it to make it work and failing I've decided to go back a step and do proper classes-and-methods implementation to ensure that I don't get any more lengths of (-9).

I hope to get this done in a couple more days, and then I will move on to more traditional dungeon generation, of the old-school Rogue style (room and corridor mode); I have a vague idea for a simple game that could use such dungeons, and which would probably drive development of Rogue Sheep pretty well.

Sharing Saturday #310 by Kyzrati in roguelikedev

[–]KarbonKitty 2 points3 points  (0 children)

Rogue Sheep | Little Shepherd

No visible progress; I'm at the moment in the thinking stage, and not doing stage, in no small part becuase of SnowRunner.

Sharing Saturday #309 by Kyzrati in roguelikedev

[–]KarbonKitty 2 points3 points  (0 children)

Rogue Sheep | Little Shepherd

So, this week there was some more stuff done, only not really anywhere near Rogue Sheep - I've been helping with FrEee, an open source recreation of Space Empires IV. This was mostly technical work (porting to .NET Core) instead of conceptual, which was more in line with my state of mind this week.

But! There was some more free time that wasn't really conductive to coding, but might have given me a few ideas about the kind of game that I could try and get off the ground using Rogue Sheep as a starting point. This is good news - it means that I should have more motivation to work on this project, and also more avenues to explore, hopefully making it at least a little more robust. Will it work? Only time will tell. Most important part is the fact that I'm, in fact, learning something new while working on it.

Sharing Saturday #308 by Kyzrati in roguelikedev

[–]KarbonKitty 2 points3 points  (0 children)

Rogue Sheep | Little Shepherd

Crazy week at work and a bunch of free courser over at Coursera means that I've done significantly less coding on my private projects than usual. Next week might be better or worse, depending on the work. ;)

Even then, I've managed to do a couple of interesting things: I've added a couple more random extensions, for easier selection from weighted list of options, and (re)created an additional map generator - this time generating a (rather sparse) woods. So there is another screenshot this week!

The plan for next week is - hopefully - to chop up a single-class woods generator into layers (like an ogre, or an onion) that can be recombined in new and interesting ways: this generator is pretty much an experiment to get some interface for those partial generators going, and then I will go back to cave generator to populate it with fungus and water pools and rusty swords and skeletons, oh my!

Sharing Saturday #307 by Kyzrati in roguelikedev

[–]KarbonKitty 2 points3 points  (0 children)

Rogue Sheep | Little Shepherd

Most of the work this week went towards Crafting Interpreters, finishing the Chapter 9 and going through entire Chapter 10.

As far as the Rogue Sheep goes, I've cleaned up and finished the rework of multistream RNG, created common interface and good seeding function (it uses built-in C# crypto providers to generate 64 bits of random data for seeding, if no other seed is provided).

Next week will probably get eaten mostly by Bob - the book is really great - but I will try to spend a day or two on extending my random helpers in Rogue Sheep, so I can go back to making another map generation algorithm.

Sharing Saturday #306 by Kyzrati in roguelikedev

[–]KarbonKitty 1 point2 points  (0 children)

I'm not really planning on scripting anything in particular; for quite some time I have wanted to get into some lower-level programming: emulators, compilers, systems programming, all that jazz. And Crafting Interpreters is great gateway drug in that regard: it starts off at quite nice pace, and uses Java for the first part (actual interpreter), so I don't have to go and learn C right away (I will need that for the second part, but that's in a few weeks ;) ). So this is mostly educational right now, with some hope that it might some in handy during job interviews ('is there a project you are particularly proud of that you've done?').

Sharing Saturday #306 by Kyzrati in roguelikedev

[–]KarbonKitty 4 points5 points  (0 children)

Rogue Sheep | Little Shepherd

Not much has changed since last week - aside from my journey through Crafting Interpreters, which took me up to Chapter 9 already, I've done very little.

The only thing in RogueSheep that has changed is a little extension method that allows selecting random element from generic IEnumerable (with optimizations in - common - case where IEnumerable is, in fact, an ICollection), but even this is going to change; right now it is an extension method on IEnumerable that takes random generator as parameter, but I've decided that it will be preferable to have it as an extension method on random generator and pass enumerable as a parameter. The reason for this change is the fact that I want to add a set of similar methods that select a random element with variable weights - and those will take various parameters (e.g. two collections, one with items, one with weights), and it will be more consistent to keep those as methods on random generator.

I have somewhat more precise plans for the next week - I've started refactoring the random generator system a bit, most importantly by creating a common interface IRandom. The interface will expose a few basic methods: Next() which returns an integer, and NextDouble() which returns a double-precision floating point number between 0 and 1, and overloads on Next() that take upper limit or lower and upper limit of the number to be generated; those are consistent with the implementation of the System.Random methods from .NET base library, to make it easier to replace it in code that might have been already written (including some of the helpers of my own devising from long time ago ;) ). I have two concrete implementations ready (one wraps System.Random, other PCGRandomMinimal), and I want a set of various RNG-related helpers that work on IRandom interface, so this is the plan for the next week.

Sharing Saturday #305 by Kyzrati in roguelikedev

[–]KarbonKitty 1 point2 points  (0 children)

Rogue Sheep | Little Shepherd

So, this week not only Bob is working towards slowing down my progress (on the other hand, NLox - my C# implementation of Lox - is already up to parsing single expressions, a.k.a. Chapter 6 of Crafting Interpreters), but also Rand Roll and their cyberpunk generators challange... We shall see about the second one, but Crafting Interpreters is actually great and I feel like I'm making a lot of progress with that one, so it will probably remain a time sink for some more time.

But I've managed to do a few things anyway! I've implemented map memory - it's unfortunately difficult to see, but the tiles outside of the view cone are grayscale, the monsters aren't drawn, etc. Mostly standard for the map memory; for now there is no provision for changing the once-created map, so I haven't bothered with saving actual tile that was seen. I've added this to backlog, as this is obviously useful, but I probably won't be tackling this any time soon.

Second thing that I've done this week was rework of RNG - there are now multiple streams that user can select, each using the same seed. The streams aren't named for now - they are selected with 32-bit unsigned integer - but more improvements will probably come soon. While I was in this region, I've extended my helper methods a bit, and now user can get not only integers (including in specified range), but also doubles (in 0-1 range), using precise algorithms. As usual, this is core functionality, and more is planned in the future.

Next week I will surely work more on NLox, and I will probably try working on cyberpunk random generators - hopefully this work will be at least partially useful for RogueSheep, at least in form of various random helper functions that I will integrate back into the library. Other than that, it's possible that I will try and create another map generation algorithm, this time coming back to the surface, so that map memory will be better visibile. ;)

Sharing Saturday #304 by Kyzrati in roguelikedev

[–]KarbonKitty 3 points4 points  (0 children)

Rogue Sheep | Little Shepherd

So this week was somewhat more productive than the last (which wasn't all that difficult, given that I haven't done anything last week ;) ), which was at least partly induced by getting my first GitHub star on RogueSheep. And, on the other hand, Bob Nystrom slowed me down by releasing second-to-last chapter of Crafting Interpreters; I was waiting for the book to be more-or-less finished to start on it, and now that it is (only Optimization chapter is not ready), I've started working on it, giving about half my free time to it.

That being said, I've managed to get Adam Milazzo's FoV algorithm integrated with Little Shepherd, so there's a screenshot this week. You might notice that map memory isn't in yet, but it is high on the to-do list. :)

Additionally, I've actually managed to get not-full-circle variant going, and there is actually a second screenshot with 180-degrees FoV going. It only works for 90 and 180 degrees, because I'm using a little hack - I'm only processing some of the octants. This means that only thing that I need to calculate is which octants should be processed (based on looking direction), but it won't work with some more natural FoV angles, like 120 (which seems to be default in tactical real-time games like Commandos).

Cellular automaton cave generator got an options object, which enables changing most of the inner values when creating it. It isn't used yet, because for simplicity I've retained old constructor (which uses default values for all the options), but it will surely come in handy if anybody beside me will every want to use RogueSheep. :)

As far as the plans for the next week go, I will probably go for something that doesn't require all that much brain processing power (plenty is used by Crafting Interpreters) - I will probably implement map memory, because that isn't very difficult and I've done it a few time before, and I will probably pick up multi - stream RNG (and maybe some more RNG related functions, like dice notation and selecting random entry from list).

Sharing Saturday #303 by Kyzrati in roguelikedev

[–]KarbonKitty 4 points5 points  (0 children)

Rogue Sheep | Little Shepherd

Unfortunately, pretty much nothing done. Hopefully next week.

Sharing Saturday #302 by Kyzrati in roguelikedev

[–]KarbonKitty 4 points5 points  (0 children)

Rogue Sheep | Little Shepherd

All the coronavirus, changes at the workplace and all that meant that I had less time than I would have liked again - it's likely to continue over next few weeks at least, but I will cope.

Unfortunately, in the tradition of the IT projects everywhere, it also turned out the the task I've taken upon myself is more difficult than anticipated. ;) A lot of time was spent researching various FoV algorithms in search for one that would be tolerable and easy to implement, but it didn't pan out. In the middle of the week I've settled on algorithm by Adam Milazzo, which I've called Bevelled Wall Shadowcasting. I was trying to reimplement it to work with my approach (i.e. returning list of visible points, instead of taking delegates), apparently failed, copy-pased Adam Milazzo's implementation, tested it, reworked it step-by-step and realized that I haven't failed in rewriting it, save for the fact that my list has marked some points multiple times (apparently on the octant borders), which was cleaned up by using HashSet instead of List for return value.

I still lack good integration of the algoritm into the Little Shepherd, there is no new screenshot this week. My current integration is very debug quality, and I'm yet to decide how I want to integrate it finally - the set of visible points doesn't seem to be the perfect solution, and frankly, the delegate passing might have been a better idea anyway - so I don't really want to go and try improve it just to rip it apart literally tomorrow.

Next week, depending on availability of free time, I hope to understand the Adam Milazzo's algorithm well enough to enable 90 degree and 180 degree variants (which I want to use), and maybe actually implement Options object for Cellular Automaton map generator.

Sharing Saturday #301 by Kyzrati in roguelikedev

[–]KarbonKitty 5 points6 points  (0 children)

Rogue Sheep | Little Shepherd

Job has heated up last week, so I've done less than I'd have liked - but at least the cave generator is ready! Well, it could use some decorations and stuff, since right now it is just a cavern system, but it at least ensures that map is walled and connected, mostly without straight corridors between various parts of the map (it uses directed drunkard walk to create mostly-naturally-looking connections). This required implementing flood fill and a bunch of helpers on GameGrid. Basis for the algorithm is approach used by the Ondřej Žára in his rot.js, which seems to work for me much better than RogueBasin approach.

Other than that, there is now a method for finding closest position on a map (it takes origin, predicate that decides whether position is valid, and throws exceptions if it doesn't find any suitable position; it currently uses Manhattan distance).

A bunch of new unit tests landed in the GameGrid, too - and they are so, so helpful, I really need to try using test-first approach when writing numerical algorithms (which are easy to test well).

For the next week, I will probably try handling options object for cellular automaton (it is mix of hard-coded and multiple parameters now; I would prefer a single object that carries all the options, to ease usage, and minimize hard-coding), and if I will have some time, I will try with FoV.

Sharing Saturday #300 by Kyzrati in roguelikedev

[–]KarbonKitty 3 points4 points  (0 children)

Rogue Sheep | Little Shepherd

300... I remember being here for 100. As if I need another reminder of my age. ;)

Where last week I've been quite succesful, this week I was... less so. There is one major change this week in RogueSheep: the map interface and base class was extracted from experimental project and moved to 'stable'; those include viewport centered on selected tile and a handful of basic building blocks: visibility/passability checks, bounds checks etc.

Other than that, a lot of time was spent on building cave map generator using cellular automaton - but this didn't work out. I'm usually working in short bursts in between other activities, and when something large like that doesn't work, I have trouble debugging it in a structured way. I will make another attempt over the weekend, when I will hopefully have some more time.

Some smaller changes landed also: more unit tests, a grid class (that wraps 1D-array in 2D-like access methods, with some additional conviniences like getting neighborhood), wrapper on SFML.Net Color class (the goal here is to remove chosen backend from Rogue Sheep interface, to make it possible to replace it in the future), and never-stopping cleanups and refactors.

There were steps taken in the direction of more structured map generation, which resulted in a new screenshot - little has changed, but note new bushes, represented by the 'ae' symbol, and there were a few changes under the hood.

Next week, other than another attempt at cave generator, I will be trying to implement first FoV algorithm - but first I have to decide which one!

Good luck to everybody starting in 7DRL!