Sword Saint's Recent Forum Activity

  • Released this last year after a years worth of work. Hadn't noticed this 'completed creations' forum until now so I guess I'll post it here for completions sake.

    https://play.google.com/store/apps/deta ... eroflondon

  • Further experimenting has convinced me that storing the base64 encodings of then user's selected custom images is the way to go. It turns out the reason I was running into trouble was that I had WebGL enabled, and that seems to interfere with the base64 injection addon I was using. Turning off webgl made things run smoothly, and it seems that local storage does allow for strings long enough to store the encoded images. Even if they wouldn't fit, I could always chop the encoding strings into segments and store those to reassemble later.

    All in all, I'm satisfied with this solution.

  • Today I've been trying to make this work by storing the base64 version of an image into localstorage and then pulling it out to inject back into the image later, but now the problem with that seems to be that the storage doesn't allow enough space for a base64 encoding of an image...

  • It seems like you should be able to somehow just save a directory in C:\ style format the way it displays in the filechooser during runtime after you've chosen a file and then use that for later reference, but the appropriate methods to do something like that don't appear to exist. Maybe there's a plugin for that kind of thing?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm aiming for android, but it is good to know that there's an option at least for the desktop.

  • I'm working on a game concept that allows for the user to create a character, and part of this involves the user browsing their device for an image that will be used for the character. I have been able to select an image using the filechooser and then use the URI to lead a sprite just fine.The issue arises when I try and find a way for the image they selected to be saved for later game sessions. The URI code that the filechooser provides seems to expire when you restart the game, and using a savestate does not seem to preserve the image either.

    Am I just doing this wrong, or otherwise is there a different way to accomplish this?

    Edit: I settled on storing base64 encodings of the images in an array in the local storage, and then injecting those encodings into my sprites later. I consider this solved.

  • That sounds like making the data equivalent of a map editor. I could do that but yeah, it still seems like there should be a more direct way built in to set the starting values in an array.

    Loading a CSV would work nicely. I'll look into that plugin you mentioned.

  • So far I've mostly been happy with my purchase of a C2 license, and have created a few different simple games to get a feel for the workflow and tools available.However, I've been having a serious issue lately with arrays.

    I'm about to enter the last semester of my BS in CS, so it's fair to say I already know more than I ever cared to about arrays and how to use them. My problem is that there seems to be a distinct lack of a simple way to set the contents of an Array before the game starts.

    Here's what I mean:

    For the sake of argument and simplicity, suppose I have designed the name, stats, price, rarity, etc. for a list of 20 or so weapons in an RPG example. I don't need to change this data at runtime, I just need an efficient way to load this content into an array while still being able to modify it later for balance reasons and of course I need to be able to access that data at runtime for shops and combat and such.

    My problem is that unlike for all other objects or variables, there doesn't seem to be a convenient field anywhere where I can enter the data in.

    Maybe I'm missing something, surely there must be a simple solution to what must be a common problem. I'd really appreciate it if someone could point me towards the 'standard' way to initialize an array in this way in C2.

Sword Saint's avatar

Sword Saint

Member since 5 Oct, 2012

None one is following Sword Saint yet!

Connect with Sword Saint