LaDestitute's Forum Posts

  • There's not much options unfortunately for deleting or clearing saves, especially if you're using the system save/load commands. You can only load/save and sort of clearing a browser's cache, there's not much option, especially if you resort to using nwjs.

    If you want more control, you'll probably have to use localstorage and a dictionary or array, where you'll have to clear each variable/value by hand.

  • The best (and well, simplest way) to explain what nw.js is...it's kind of a shell/app runtime based on Chromium and node.js, so assuming that and the very likely-correct premise that it's just Chromium and node.js running in a shell so it likely stores 'savedata' (whether say said 'savedata' is methoded through the system save/load or via localstorage and dictionaries/arrays) in whatever is equivalent to a browser's cache, but a clear note here that the 'cache' for games with Construct 2 is seperate from a browser's cache but is the closest parallel, in terms of describing it.

    Given that, the savedata is likely stored internally in nwjs' exe.

  • I've written up a little .bat thing to display my Construct 2 project's debug-log .txt file in the form of a command/debug console, and two days ago, it was working fine until some sudden unexpected issue. As of now, it's behaving strangely on one front. The .bat is supposed to run a loop that display's my log-file's contents and would leave the log-file alone and let it stay put. I'm 100% sure it did that but now, it's deleting said log bizarrely despite showing the messages in the contents; and the file being deleted interferes with my project's C2 eventsheets (where it backups the log-file via nwjs commands). I'm not sure if the recent Windows 10 update yesterday broke my .bat or if I just accidentally fubared it.

    My .bat's contents:

    Echo off

    title A-RPG Gamekit Debug Console

    :loop

    if exist currentsessionlog.txt type currentsessionlog.txt

    if exist currentsessionlog.txt del currentsessionlog.txt > nul

    timeout 1 > nul

    goto loop

  • Some technical/debug work improvements. May need a bit of improvement soon, just implemented both things and only did a standard and not-deep stability test.

    Object debug data (will expand and add more data soon):

    cdn.discordapp.com/attachments/302500573742366720/491069245799661589/printout.gif

    Bounding boxes:

    cdn.discordapp.com/attachments/305515856107143168/491071361448411146/recordbound.gif

  • You can solve that via saving states/stats/variables/etc of objects in a level (such as whether pernemant collectibles are obtained, player position x/y, solved puzzles, etc) using a dictionary, json files and local storage.

  • If you want more control over what gets saved (which also by comparison means you'll have a lot of variables, etc to keep track of but that's the tradeoff, anyway) or want to have multiple save-files, it's better to make a save system using local storage and a dictionary or two.

    I have a capx that's made for sort of zelda-like games but it should pretty easily apply to any game that has more than one save-slot and has at least some kind of stats, items, etc to keep track of:

    dropbox.com/s/pfgclknuert64i5/Savefile%20System.capx

    Also, if you want to keep track of things like bought-objects (as example, I played a lot of the Zoo Tycoon games in the past, so let's use a random zoo or snack structure the player can buy and place as an example, ignore the object in this example) and have them restored upon reloading a save:

    To utilize this properly, you may have want to have a grid system built or at least track the x/y place of objects, which can be done easily by storing them to variables or a dictionary upon placement.

    For picking the absolutely right object...well, UIDs may not be the best solution here, since exiting and saving a game would mean that objects may not be permanent and with the exception of global objects, here's a more fool-proof method:

    Track where players can place structures, whether by X/Y or a grid system. Regardless, you may want to assign arbitrary spaces for your sanity's sake and tie a specific X/Y to them. Something like "StructureSlot1" = Empty/"<StructureName>"* and "StructureSlot1X" + "SturctureSlot1Y". This way, when a save is reloaded, you can have the game check through each grid-space, and spawn a structure on grid-space-x if one happens to have a defined value in the savedata dictionary as well as restore any metadata such as what the player set something like a food-stand to sell if they have multiple options of what they can set.

    *I'll get to this part in a bit, it's below:

    You could store all your structure models/sprites in one object and create new instances (remember to track them properly!) whenever a player buys and places a new structure, such as a popcorn stand, bench, etc. Have their names match the structure-names in your definition/structure-list and also have them match whatever formatting would be for your dictionary or such so when you spawn a new structure, set the animation and set it to use the name stored in "StructureSlot1" key.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Have you tried using "Go to next/previous layout"?

    If that doesn't work, try this method: Use a variable or dictionary key to store the layout name.

    Upon entering the current level (such as level 3), on start of layout, set the variable to "LayoutName", without the quotes. Then when you run your ad, at the end where it's supposed to return the player, add a "Go to layout (by name)" and use the variable you made in place of a direct name.

  • New devlog post! Combat improvements!

    ladestitute.itch.io/a-rpg-gamekit/devlog/48378/code-optimization-combat

  • I'm using nwjs and I'm not quite sure how I can access the console log compared to if I ran my project in chrome, firefox, etc. This actually works for me quite well, thanks.

    It's mostly because I'm working on a robust in-game debug mode/command console (like you see in Minecraft, Fallout/Skyrim, etc, that sort of thing as well along with general debug-utils) to sort of replace Construct 2's debugger partially, so end-developers who use my A-RPG Gamekit can debug their own projects to a large extent/usability than having to open up C2's own native debugger.

  • Have you tried the "For Each" condition? Also, if it is enemies you're attaching said light probes to, maybe put them all in a family and then "For Each <family name>".

    Also, for the probe itself, an every tick event that sets them to enemy.x/enemy.y. If the probe is also player-influenced, as if they can affect it (say, put out an enemy's light), also try "pick probe closest to player.x/player.y".

  • Thanks for showing that to me. I get how to properly format it now but I want to keep the cmd window open...like if I want to append additional messages while the window is still open (and therefore preferably keep it to one window), is that possible to do? Or would I have to append and do open shell again, which might open a second command prompt window?

    What I'm saying is that I want to append messages to the command prompt window (and have them show up in real time in the prompt window) while it is open and 'live' but I'm not sure if I can do that, based on my guesses of writing permissions. I could be wrong though.

  • I've been fiddling around with writing/appending to txt files via nwjs but want to take it a step further. I'm curious if what I want to do is possible and I'd rather use a cmd interface over a plain text-file if possible.

    I know I can open up command prompt up via nwjs' run shell in construct 2 and can also utilize write/append in text files to write log messages.

    Is there a proper way to format write/append text to said .bat file so it outputs correctly formatted log messages to the opened command prompt window? I'm trying to figure out how to properly add stuff like "echo" and "title" but cmd seems to ignore newline.

  • It's been a while since this has had any progress. My depression took a severe beating during early August and it became so bad I became a recluse for a full month.

    Anyhow, I buckled down to get some major legwork done and this includes:

    *Proper enemy stats metadata implemented

    *New damage calculation system that uses player DEF/ATK and enemy DEF/ATK

    *Overhauled item drop calculation + luck stat

    *Enemies now have health meters visible

    *Bow improvements (holding the use-item key charges the bow, player can now move using a bow, charge corresponds to damage so longer charge=more damage and added secondary arrows (fire) as a test)

    *Combat gamefeel tweaks and improvements, mainly: player now stops if they hit solid objects during receiving knockback, increased swing speed, added an 8x8 box to the end of player line of sight to to facilitate easier hit-detection and made enemies slower

  • I've reached the very end of combat overhaul, with a new damage calculation-formula, enemy metadata-json, damage number popups, overhauled item-drop calculation/stat and status effects implemented but the very last thing...I need some feedback on the collisions, damage, knockback and general gamefeel of the combat so I can tweak it to be a fair bit smoother and tighter.

    You can find a download for the latest playable demo here:

    gitlab.com/LaDestitute/A-RPG-Gamekit/tags/v1.1h1