Sethmaster's Forum Posts

  • In game, I am using a combination of arrays and dictionaries to keep track of all the data in my SRPG.

    To load external data into those data storage, I am using csv files which is load straight into the arrays.

    Here's a expert tip, don't ever compute long formulas (such as sorting or attack formula) straight using variables from a sprite object, especially when you have many of them presence.

    Get the values from those variables, put them into arrays, global/local variables or dictionaries before calculating it.

    Even better is if you don't put any computation variable on sprites and just put them in arrays/dictionaries beforehand.

    You will find everything will run far smoother.

  • Learn how to do git.

  • Thanks lucid , the new features (color palette and export palette-changed new project] really help me out in diversify the amount of customization available in my game by making it incredibly easy to create color swapped clothing and skins.

  • I hope they improve NW CPU and memory usage further.

  • Use arrays to save what your players have bought.

    You can read up on arrays and their usage either on scirra own tutorials or any coding sites.

  • Hi all,

    Bit of a strange one, but I'm wondering if anyone has experience of using a lot of arrays in a C2 project? By a lot I'm talking around 1,000 - 1,500.

    I'm working on an RPG style game and this number of arrays is due to the number of items in the game that will need an inventory and/or outcome text (to clarify this is for desktop, not mobile).

    I have everything working with a few objects and 100 arrays, so just wondering if I'm going to push things too far having thousands? I'm thinking that as it's only text data then it shouldn't really be an issue on performance, but my main concern is around saving, as all of this array data will need to be saved to a local storage fairly often (via json strings in a dictionary that is then saved to local storage).

    Any wisdom or experience would be appreciated, thanks

    I use arrays quite a lot since my game is SRPG and it's vastly faster to parse through bytes of data than parsing through megabytes of sprites and I don't have issue yet with anything connected with saving/loading nor arrays.

  • Like I said, use LiteTween or Move.

    You will find it to be quite different and does not have lag issues.

    Also, understand that an object can be attached to more than one family.

  • Just finished more stuff.

    This is what that have been completed after the last update.

    As usual, the updated demo is available here:

    https://furiousgamer87.itch.io/street-posse-showdown

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's pretty redundant when Move and LiteTween behaviors and families already existed.

    Just group all menu tab objects under a family and give the entire family a move or litetween named appropriately (MoveToView, MoveOutOfScreen etc.)

    It's also more flexible and adjustable

  • I think your question will be better answered if you post it in their own forums instead of here.

  • I use variables and arrays and I usually keep a word document to remind me what each do aside from the normal UI comment.

    This is because having a single document telling me all the available variables and arrays I have created and their existing usage is pretty helpful to avoid redundancy which in turn reduce the amount of work when you maintain and improve your project.

    I don't use dictionary since array is more useful to me due to official support and their functionality and speed is nearly similar.

    >

    > I am adding to his statement with the fact that you can simply use the official save and load functionality for your own custom save files. Without much hassle.

    >

    > How?

    > Pretty easy.

    >

    > For saving, as indicated in the manual, on saving complete, save a copy of the save json into your own custom file that you created for this purpose. Remember to use a marker so you can identify if the json is a new one or will it replace an existing one in that file.

    >

    > When loading, just parse through the file and load the correct json using the load from json function which is provided officially by Scirra.

    > There you go, easy as it can be. And you can have full cloud support with your own custom files.

    >

    The built-in savestates are an awesome alternative for more "simple" games were saving certain global variables doesn't matter that much.

    However, if you have a game were you want to save variables only, I prefer using webstorage (my modified version with encryption inside), I just recently changed to local storage because it is technically save from any way of manipulation. (To be honest, waiting for localstorage to do its work is still annoying and I consider to go back to my old webstorage saving method in future.)

    So to sum it all up, if I would make a custom saving system to a file, do I have to encrypt the variables saved into the file?

    I appreciate all kinds of links to existing separate file saving methods, sorry that I went off-topic here!

    (I know that the most of the users who subbed to this topic only want to know news about greenworks and not things like this. )

    I don't get the snide remark about simple games since my game is far from simple but let's not pursue that any further, for courtesy sake.

    Now, since you already have the required saving information in variables, it is a simple matter of reading the previous information in a custom file into a string variable and then parse it to see which of the new information will replace which or be added as new. After all the computation is done, simply write the variable containing all the saving info into the same custom file (e.g. settings.ini).

    If you want to add some encryption to the mix, simply do it inside the game event sheets for decrypting after reading the file and encrpyting just before writing the data into the file as just another part of the computation.

    This is not hard at all, just very tedious.

    > glerikud , if you want add achievements, you need plugin else for trading cards or cloud a plugin isn't needed

    >

    MadSpy You say that a "cloud" features inside the plugin are not required, in fact how would you for example store savedata like localstorage to the cloud anyway?

    So far I don't know much about the game SDK or how certain features like that work.

    (My guess is that Steam's cloud system works with relative savedata paths that you have to mark out in the SDK.

    However even if it would work like that, what would happen if future NW.js versions would change the localstorage-data path?)

    I think since NW.js + Steam are going to be a "big" thing in the next couple of months with the stable

    release of NW.js, things like this should be in the manual. (I'm sure that Ashley will do that, just a little heads up anyway. )

    I mean you're able to create your own save logic in files with nw.js without localstorage (e.g. "%userfolder%/documents/mygame/save.data") and you're able to set a path in steamworks partner web for cloud save so you don't have to use a plugin to do this.

    I am adding to his statement with the fact that you can simply use the official save and load functionality for your own custom save files. Without much hassle.

    How?

    Pretty easy.

    For saving, as indicated in the manual, on saving complete, save a copy of the save json into your own custom file that you created for this purpose. Remember to use a marker so you can identify if the json is a new one or will it replace an existing one in that file.

    When loading, just parse through the file and load the correct json using the load from json function which is provided officially by Scirra.

    There you go, easy as it can be. And you can have full cloud support with your own custom files.

  • so Sethmaster - all your street posse characters are made using Spriter then? Apart from the workaround for instantiate time, have you noticed any performance overhead issues like Colludium? I'm thinking that maybe, since your animations are instant instead of tweened, that might cut down on some resources. Is that the case?

    (sorry to high-jack this post..)

    Yes. all of it is made from Spriter.

    Regarding overhead, I do know that the last time I created over 10,000 Spriter objects at one time (because I tried use Spriter haphazardly for everything including tiles), there is a lag. The reason so many is created at once is because most of the tile Spriter instances have around 50 objects in them due to my mistake in creating a unique for each different tile in Spriter despite the fact that tiles usually don't have animations and this amount can be reduced to merely one via charactermaps.

    By using charactermaps not just for the characters but also for other objects as well, I manage to reduce the amount of objects present at any time significantly. Though for the tiles, I am still not using Spriter for them due to aversion after the last mistake.

    Yeah, all the animations are instant and not tweened due to the pixel art. So my experience might differ from others who used tweening. I recommend you try Spriter yourself to see whether the performance ovehead affect your game or not.

  • It depends on the effect you are after.... Spriter permits blending between different animations and give a smoother animation effect than sprite sheets can (in most situations), so the final animation appears of a high standard but uses up only a small amount of memory. However, Spriter has a performance overhead - you can't have a large number of Spriter objects running even on desktop without performance being impacted. There is also an instantiate time for Spriter objects, so that they might appear up to a second after the layout starts (work arounds are possible, though, by delaying fade-in etc). The best thing to do is give Spriter a try and see if you like what it can do.

    To remove the instantiate time for Spriter objects, just create the first instance for all of them in the first layout during your game intro using an out of screen coordinate.

    Remember to stagger their creation to avoid any bugs.

    You will find any further creation and usage of all Spriter objects in the game to be super fast and have no issue whatsoever.

    For a demonstration of what I just said, just play my game demo and see for yourself.