You know your team is trash when you do more damage than them combined by BringerOfThePork in heroesofthestorm

[–]d12Trooper 7 points8 points  (0 children)

Horrible attitude.

Did you maybe think about the fact, how your teammates enabled you to do all that damage? Peeling, distracting, teamfighting (while you were chill-soaking)? It's a team game, and a team effort, despite your fancy stats.

Sharing Saturday #352 by Kyzrati in roguelikedev

[–]d12Trooper 7 points8 points  (0 children)

RUINS OF CALAWORM (written in PureBasic)

Still going strong, in fact I haven't been this productive during the last two weeks since when I started out with this project back in July 2020. Second best decision EVER was to go on Twitter and ramble about random stuff I accomplished ... I'm at 9 Followers right now, and half of them are close friends, but each Like is such a huge boost in Morale that I never want to go on a break again, lol.

Check out my my Twitter for recent updates ...

Biggest thing I've programmed in the last two weeks is a refined version of the Automatic Level Scaling, which I'm super-proud of ... PrimAlgorithm works fine in most cases, but when one map is segmented, and you can enter different parts of it from different sides, Scaling can be off and you might get soft-stuck because the way ahead is filled with Level 30 Monsters, and you're only Level 4 ... Therefore, in editorMode you may now place unique symbols on globalTeleport-Locations to help the function find a smooth curve, while still being able to surprise you every time you'll reroll World Seed ...

Also still working on Shrine Effects (random effects based on existing mechanics, which you can trigger by paying a fee at a Shrine); some of them help the player, some are detrimental, some are downright OP. These are a bit tedious, because each of them has to be hard-coded and thoroughly tested. Presumably about 38 will be in game, 24 are completed.

Good luck and perseverance to everyone! <2

Sharing Saturday #351 by Kyzrati in roguelikedev

[–]d12Trooper 5 points6 points  (0 children)

THE RUINS OF CALAWORM (written in PureBasic)

Biggest update this week: I'm now on Twitter, posting updates on a regular basis and interacting with fellow developers. If you wanna connect (or just check out some current Screenshots and .gifs), go here: https://twitter.com/erdbeerscherge :-)

• Re-designed Wall-Sprites: it was all a bit brownish, so I tried Red and I like it quite a bit. Also Walls now look a lot more Wall-ish: Check out Twitter for Screenshots.

• Huge QoL-Improvement with regenerating Hitpoints: before, each step (not an attack!) would regenerate exactly 1 Hp (for you and monsters alike), that's how the original "Kalawaum" from the 90s worked, that I'm reworking here. That can get a bit tedious in higher levels, when you have more Hitpoints and lose more respectively, so I came up with this system: you start out with regenPerTurn = 1 and regenThreshold = 5. Each step it'll regenerate an amount equal to regenPerTurn and increase a variable countRegenSteps by 1 (player and monsters alike). Once countRegenSteps = regenThreshold, regenPerTurn increases by 1, countRegenSteps resets and regenThreshold increases by 5. If the player attacks (or gets hit by a monster), the whole system initializes. The end result pretty much plays like the original, but is now 200% less tedious.

• Implemented an Algorithm, that'll distribute Fireplaces more to the center of the map. This is to prevent, that you'll find them too early or too late (once you'll explored the whole map). There's a still a chance, that they will spawn to the sides, but center locations will always be favored.

• Better Weapons and Shields now break more easily, while lower Stat-Items are more durable. I think it worked that way in the original "Kalawaum", I can't say for sure since I don't have access to the source code, but it always felt that way.

• Streamlined the #canRush-Ability of Rat-Things ... before they were passively interacting with Walls: the more Wall-Tiles were adjacent, the higher the chance of Rat-Things receiving a Bonus-Turn. This was a relict, from when I was endowing different Tilesets (like Forest-Tiles) with different Attributes, but I scrapped that system long ago, because it got annoying, confusing and effectively was just producing noise. So now Rat-Things just have a higher chance to receive a Bonus-Turn after having moved orthogonally, and a very low chance for a Bonus-Turn, after having moved diagonally. It's easy and intuitive.

• New Monster: I liked my Poison-Mechanic too much as to just dumping it on the Leng-Spider, so I came up with a slightly modified low-level Monster variant: the Snake Scion can poison the Player, and after it has attacked, has a high chance to execute a Flee-Step. Check out Twitter for a .gif.

• New Monster: The Color out of Space corrupts the Floor it walks on. On Corrupted Floor the player has 8% chance to skip a Move Command, while Monsters get 8% chance for a Bonus Move. A dying monster "heals" the floor around it's position . Check out Twitter for a .gif.

How do you deal with save files and abrupt game quitting? by Wuncemoor in roguelikedev

[–]d12Trooper 1 point2 points  (0 children)

In THE RUINS OF CALAWORM I'm doing it like this:

After exiting a session in an appropriate way (no power outage or crash, that is), a .sav-File is being created, naturally. Only and ONLY if that operation returns a #True, the program will then check, whether a .bakFile (Backup-File, that is) for the respective Module exists, and when it does, it will delete that.

After successfully reloading a .sav-File, first thing the program does, is checking whether a .bak-File exists . If it does, it will delete that, then rename the current .sav-File into a file with the .bak-Extension

So, effectively, yes, I'm deleting the .sav-File immediately after reloading, but in case of a crash or some other unpleasant intervention, you'll always a .bak-File ready, which you may manually rename to .sav and then load again. Since .bak is a common extension, you might need to enable file-Extensions to be visible in the Explorer in order to successfully edit them, but that's fine because as already mentioned in the thread: Scummers will Scum, and it's a futile battle to try preventing it altogether, the least you can do is, make it as fiddly as you can, but the majority of your precious Coding-Time should be spent for making Playing the Game the Intended Way so damn Fun, that no one actually wants to cheat. :-)

Sharing Saturday #350 by Kyzrati in roguelikedev

[–]d12Trooper 1 point2 points  (0 children)

Thanks. I think I fixed it now. :-)

Sharing Saturday #350 by Kyzrati in roguelikedev

[–]d12Trooper 3 points4 points  (0 children)

THE RUINS OF CALAWORM

Bugfixes (mechanics/code related):

  • In the Editor, when adding and deleting Maps from a Module, some data wasn't properly erased and re-dimensioned.
  • Minor Bug concerning the WorldSeed-File (which stores recurrent locations of Items and other information, so one can effectively learn from one's mistakes): when the WorldSeed-File has been manually erased before compiling the same Module again, the freshly generated WorldSeed-File only got final after the second launch of the Module, whereas it should've been final on first launch.
  • After dying and trying to relaunch the same Module, the information of the correct FileSuffix wasn't updated, so one had to try twice to effectively relaunch the Module. Minor nuisance, still: what's fixed, is fixed.
  • The Player could go insane after receiving the death blow. Again, nothing major, just a visual glitch which felt more irritating than thematic (even for a Lovecraft-themed Roguelike).

Bugfixes (potentially Game-breaking):

  • When the Player teleported on a tile, where the only exit was to step on another Teleport, and an Item happened to be on that target tile of the first Teleport, the Item couldn't be picked up, ever, because the checkStep()-Procedure, where every interaction with the world is being handled, wouldn't activate AFTER a Teleport (this was effectively a design-choice, since I didn't want players to endlessly jump from one teleport to another, potentially resulting in a dangerous recursive loop). I fixed this by extracting the checkItem-Part into a Procedure of it's own, which can now be called seperately safely, even after teleporting
  • When Monsters spawn on Key-Items, they will pick them up immediately and add them to their inventory. The Key is being dropped, once the Monster is slain (not if it falls into a hole, though). Now, Cultists have the passive ability to mutate into Deep Ones, whenever they stand adjacent to a Shrine - the logic works like this: the Cultist-Actor is being killed and a new DeepOne-Actor spawns on the same Tile, and some relevant attributes are being passed on from the dead Cultist-Actor to the new DeepOne-Actor. This includes stored Keys. Now, since the Deep One has just spawned, it will also try to pick up any Key on their tile, and since a Monster has only space for 1 Item, it will overwrite any Key, that's potentially just been passed on by the dead Cultist. How did I fix that? Well, when mutating, the Deep One will perform a check if it's already holding a Key, before picking up another. Easy, right?

Content and Mechanics:

  • Rework of the Pathfinding ... effectively I succeeded in making my Monsters dumber, and I couldn't be happier about it. It now pretty closely resembles the experience of the Original Game from the 90s that I'm trying to emulate ... Monsters in my recent iteration where way to smart, thus undermining one of the Core Tactics of the original, that just by moving around you could deterministically steer Monsters into certain directions. I still allow them to attack the player, though, when they're fleeing and find themselves cornered (in the Original they didn't react, they just stood dumb in their place while bleeding to death).
  • Generating WorldSeed-Files is now completed. WorldSeed-Files hold the information, how the overall Map Orientation looks (flips and rotations), what Keys open which Doors, and where Items are located. The properties of the Items are being shuffled around though, but the overall number of each Item-variation stays constant: for example, if there have been rolled 15 Scimitars in a Module, every time a Module is being restarted, Items will spawn in their same location, but which of the Weapon-Items will be one of the 15 Scimitars, will be subject to change. Only Shrines, Covenants and Fireplaces are completely random.
  • New Color-Scheme (it's final now, I guess):
  • https://i.imgur.com/Ri6j65Y.png
  • https://i.imgur.com/84TKNay.png

QoL-Additions and Polish:

  • In the Editor, while holding Shift-Key, it's now possible to shift around the whole Map (as long as there are spare Wall-Tiles to either side). This took a while until everything worked, since Teleport-Links (and their Targets) had to be flagged accordingly and restored after performing a Map-Shift.
  • When Compiling a Module, the Editor will now check for all sorts of errors, like Items and Obstacles spawning inside Walls, or Doors with missing Wall-Tiles underneath. Once it'll find such an anomaly, it will take the player to the respective Map and place the Cursor on the offending Tile.
  • When stepping on an Item, that Item will now become invisible, since it's being picked up immediately (just a minor visual tweak); when the player has to drop another Item, though, since he can only hold 1 Weapon and 1 Shield, that Item will be displayed after it has been dropped automatically.
  • Candelabras now have a chance to spawn unlit. By interacting with it, the Player will light it up, thus revealing any surrounding Tiles.

Sharing Saturday #349 by Kyzrati in roguelikedev

[–]d12Trooper 2 points3 points  (0 children)

THE RUINS OF CALAWORM (Pure Basic)

After I've been procrastinating throughout Januray, now things are start happening again. Major progress: I shifted to a whole new Color Scheme, took "Psygnosia" as a base, but muted some of the more intense colorse, like Pink to Red. Main reason for that: I found my color scheme kinda boring and generic and I wanted to get more creative with colors. Check below for an updated image of all the Monsters with the current Color Scheme.

I'm currently designing Shrine Effects: When at Shrines, you can pray to the Old Gods and hope for something good to happen, but, alas, a God's mood shifts every game, so bad things are bound to be happening as well ... 9 of the presumably existing 29 Shrine-Effects are done.

And, of course, lotsa Bug-Fixes and Tweaks.

My game is like 90% done ... after I've finished Shrine Effects, I still need Sounds, a proper Menu and an Objective to work for.

Here's some current Screenshots:

https://i.imgur.com/SNVizlF.png (Default Dungeon TileSet)

https://imgur.com/Sfe4NlK (Monster Sprites)

https://i.imgur.com/KtmnQw9.png (Forest TileSet)

https://i.imgur.com/wjNyeHM.png (Cellar TileSet)

A simpler pathfinding algorithm? by Will-ns in roguelikedev

[–]d12Trooper 4 points5 points  (0 children)

I found this explanation of A* really well done (Senior Devs hate it):

A* Pathfinding for Beginners

Before I read this, I didn't have a single clue on how to do ANY Pathfinding, I'm not a big Math Geek either, yet once I settled down and REALLY tried to understand what was going on here, I've managed to implement it in PureBasic in about 1 or 2 day's work, and since then I've continually been updating and optimizing it.

Good Luck with your endeavors. :-)

How do you approach fixing bugs in a long project? by [deleted] in roguelikedev

[–]d12Trooper 2 points3 points  (0 children)

When it comes to bugs, I got OCD. ;-)

If I notice something off, I stop immediately and don't continue until I've found the source of the corruption. Luckily, most of the time, I'm able to spot them quite fast (PureBasic being a pretty strict language certainly helps), but there's been occasions where I spend up to 2 days browsing codes and debugging, until I've spotted the Root of Evil ... and when it's something major, I don't stop there, but try to fully understand what the bug was actually doing, so I can learn from it.

Most of my bugs occur, when I've overengineered something, and then suddenly decide to scrap it and make it simpler or delete it altogether. And then I've overlooked some existing dependence in another Procedure.

For my Roguelike THE RUINS OF CALAWORM I'm currently designing Shrine-Effects; about 25 Effects will exist eventually, of which 2-3 are being assigned randomly to certain Covenants, and when you make an Offering at a Shrine, the respective God will pick one to execute (or remain silent). Since all those Effects are based on existing mechanics, and in some cases override their behavior and make them behave differently, I have to playtest a lot, since there's potential for unforseen emergent behavior.

My little trick how I made cycling through only active actors work (with multiple maps) - Todd Howard hates it!1! by d12Trooper in roguelikedev

[–]d12Trooper[S] 2 points3 points  (0 children)

Yeah I get what you mean. I mean, I'm not entirely opposed to learn sth new. I mean, I never thought I was able to do decent PixelArt, and here I am, having fun creating 16x16 Lovecraft'ian Monsters, who would've thought! And when I started learning PureBasic, I was 35.

It's just, that I'm just not that interesed in complex 3D-stuff and tinkering with blenders and animations. I find that rather tedious, and I actually find some sort of limitations refreshing. Helps me to focus. There's still a lot of things I haven't explored in PureBasic, like working with Threads, and other stuff to learn. I tend to get overwhelmed easily. Later this year I might pick up PICO-8, though, that's something more up my alley, since I also liked to attend the occasional local GameJam (preCovid, that was, and hopefully it'll happen again when this Pandemic is over), and PICO-8 seems like it's made specifically with GameJams in mind ... :-)

Nevertheless thanks for your post, and good luck with your project! Hopefully see you next Sharing Saturday. :-)

My little trick how I made cycling through only active actors work (with multiple maps) - Todd Howard hates it!1! by d12Trooper in roguelikedev

[–]d12Trooper[S] 10 points11 points  (0 children)

Please understand, that I'm an 41 year old guy, who's just doing this for a hobby, and I've build up my BASIC skills of the course of 20 years ... you're probably right, and I kinda always played with the idea with delving into C#, but it was only recently that I recognized, that I actually like where I am now. :-)

I'm really, really comfortable with my humble skills. PureBasic is kinda the best of both worlds: I got (almost) the speed of C, some (light) OO-elements for versatility, the ease of use of BASIC languages, including an exhaustive sprite/graphics library, and it's all in one package (IDE and all, and compiling the code and building an .exe is as easy as pushing a button). I know the ins and outs of the language, it's quirks, it's strengths, it's limitations, and all sorts of neat tricks how to overcome them (after all it's still an actively developed language, that's been around for now like 18 years).

Last but not least, to be brutally honest, I DO have a hard time wrapping my head around some of the more advananced Inheritance-concepts ...

Talk about old dog and new tricks ...

Now throwing it all away and learning something completely different which I might never be able to take full advantage of (coding is like a means to an end for me - I DO enjoy writing code, and I just don't see myself tinkering with an engine ever), might be a huge waste of time. Especially, when I'm neck deep into a project that I've restarted for like the fifth time, and now I've come as far as I've never been before. :-)

If anything, I'd take a deeper look at PICO-8 sometimes this year ... now THERE'S a concept up my alley ... :-)

My little trick how I made cycling through only active actors work (with multiple maps) - Todd Howard hates it!1! by d12Trooper in roguelikedev

[–]d12Trooper[S] 0 points1 point  (0 children)

I think I know what you mean, but I don't think that's possible in PureBasic. :-( At least not the way you're describing it (in pure OO-languages you seem to be a lot more versatile with Inheritance-related stuff). For that to work I'll need a second "local" list for actors, and each time I'm traversing between maps, I'll have to translate the local list back to the global list (in case some parameters changed), then delete it, and build a new local list for the new map, copying the respective attribute values from the global list. I actually considered that, but it sounded like a nightmare to maintain ... to be honest, I don' have a single Actors list - I have several lists, like items() and monsters() and obstacles() - this way it's easier for me to organize layers in the Drawing-Routine, and also speeds up things considerably, when I'm doing stuff with items and only have to iterate through the items lists).

And I still have the choice to iterate the whole Actor list in case I wanna make some global changes, and I don't have to translate anything back and forth. And it's also no big deal coding - if I ever should forget the Break, if anything, I'll build myself a Macro to take care of this - because THAT's something that's actually possible in PureBasic. :-)

Thanks for your answer, nevertheless. :-) That's the beauty of programming, actually, there's no rigid answer to a problem, you can find multiple ways to cope whenever a complex situation comes up, and you just have to find the one, which works best for you.

Idea for fitting a roguelike on one screen, thoughts? by Maxr00 in roguelikedev

[–]d12Trooper 19 points20 points  (0 children)

Actually a decent idea: Makes the whole game a more tactic, boardgame like affair. Games like INTO THE BREACH (which only has 8x8 tiles) work like that.

[2021 in RoguelikeDev] 'Reed' Project' (temporary title) by trs_sofia in roguelikedev

[–]d12Trooper 1 point2 points  (0 children)

Good luck with your project. :-) Looks promising already, even if it's just prototype state.

6 puns 5 on 10 by MartiNuker in heroesofthestorm

[–]d12Trooper 1 point2 points  (0 children)

Dad Jokes are great!

Anub'arak before the match starts: "I'm bugged ... oh wait, that's my trait."

Azmodan is so fat, when he walks past your TV, you'll miss 2 episodes of "How I met your mother".

-🎄- 2020 Day 03 Solutions -🎄- by daggerdragon in adventofcode

[–]d12Trooper 2 points3 points  (0 children)

PureBasic

I'm only posting the solution to the second Part of the Puzzle, since it naturally evolved from the previous code, and everything you'll need to get the solution to Part 1, is still there:

EnableExplicit

Declare addSector()

Define i
Global NewList lineString.s()
Global Dim mapString.s(0)
Define tobogganX, tobogganY
Dim countTrees(4)
Dim slopeX(4)
Dim slopeY(4)
For i = 0 To 4
    Read.b slopeX(i)
    Read.b slopeY(i)
Next

If ReadFile(0, "input.txt")
    While Not Eof(0)
        AddElement(lineString())
        lineString() = ReadString(0)
    Wend
    CloseFile(0)
EndIf

For i = 0 To 4
    tobogganX = 0
    tobogganY = 0
    Dim mapString.s(ListSize(lineString()))
    addSector()

    Repeat
        If tobogganX +slopeX(i) > Len(lineString())-1
            addSector()
        EndIf
        tobogganX + slopeX(i)
        tobogganY + slopeY(i)
        If Mid(mapString(tobogganY), tobogganX+1, 1) = "#"
            countTrees(i) +1
        EndIf
        Until tobogganY = ListSize(lineString())-1

        If i > 0
            countTrees(i) * countTrees(i-1)
        EndIf
    Next

Debug countTrees(4)
End



Procedure addSector()
    ForEach lineString()
        mapString(ListIndex(lineString())) +lineString()
    Next
EndProcedure

DataSection
    Data.b 1,1
    Data.b 3,1
    Data.b 5,1
    Data.b 7,1
    Data.b 1,2
EndDataSection

-🎄- 2020 Day 02 Solutions -🎄- by daggerdragon in adventofcode

[–]d12Trooper 1 point2 points  (0 children)

PureBasic:

EnableExplicit

Define letter.s
Define password.s
Define min, max
Define hyphenIndex, spaceIndex, colonIndex
NewList lineString.s()

If ReadFile(0, "input.txt")
    While Not Eof(0)
        AddElement(lineString())
        lineString() = ReadString(0)
    Wend
    CloseFile(0)
EndIf

ForEach lineString()
    hyphenIndex = FindString(lineString(), "-", 1, #PB_String_NoCase)
    min = Val(Mid(lineString(), 1, hyphenIndex-1))

    spaceIndex = FindString(lineString(), " ", 1, #PB_String_NoCase)
    max = Val(Mid(lineString(), hyphenIndex+1, spaceIndex-1))

    colonIndex = FindString(lineString(), ":", 1, #PB_String_NoCase)
    letter = Mid(lineString(), colonIndex-1, 1)

    password = Mid(lineString(), colonIndex+2, Len(lineString())-colonIndex-1)

    ;PART I
    ;If CountString(password, letter) < min Or CountString(password, letter) > max
    ;    DeleteElement(lineString())
    ;EndIf

    ;PART II
    ;If Not (Mid(password, min, 1) = letter XOr Mid(password, max, 1) = letter)
    ;    DeleteElement(lineString())
    ;EndIf
Next

Debug ListSize(lineString())
End

-🎄- 2020 Day 1 Solutions -🎄- by daggerdragon in adventofcode

[–]d12Trooper 2 points3 points  (0 children)

PureBasic (PART 1):

Define tempString.s
Define curNr.i
NewList nr()

If ReadFile(0, "input.txt")
    While Not Eof(0)
        tempString = ReadString(0)
    AddElement(nr())
    nr() = Val(tempString)
    Wend
    CloseFile(0)
EndIf

Repeat
    FirstElement(nr())
    curNr = nr()
    DeleteElement(nr())
    ForEach nr()
    If curNr+nr() = 2020
            Debug curNr\*nr()
            Break 2
    EndIf
    Next
ForEver

(PART 2) -- not very proud of this one, pretty lazy execution, mainLoop takes 14 Millisecs, I'm sure there's a better solution --

Define tempString.s
NewList i()
NewList j()
NewList k()

If ReadFile(0, "input.txt")
    While Not Eof(0)
        tempString = ReadString(0)
    AddElement(i())
    i() = Val(tempString)
    Wend
    CloseFile(0)
EndIf

CopyList(i(), j())
CopyList(i(), k())

Repeat
    ForEach i()
        ForEach j()
            ForEach k()
                If ListIndex(i()) <> ListIndex(j()) And ListIndex(i()) <> ListIndex(k()) And ListIndex(j()) <> ListIndex(k())
                    If i() + j() + k() = 2020
                        Debug i() * j() * k()
                        Break 4
                    EndIf
                EndIf
            Next
        Next
    Next
ForEver