matriax's Recent Forum Activity

  • That should work for Canvas, but you have to make sure it has a transparency before you draw, or paste into it.

    There is no export except with the Browser object using either invoke download, or download of string using Canvas.imageUrl

    IS there any .capx example that how to do that?

    Obviously i'm not want to do a "phosotshop" is simply a program for create some shapes and all do it with sliders,etc... and after finish i want to export the result in a .png with alpha.

    At first is for my needs but if looks usefull the idea is upload to be used for anybody.

  • Nothing? So, there is no way to do it?

  • I'm thinking to create a 2d tool program.

    So, my questions is, how can i export the graphic i do to .png with their alpha? Is possible with construct2? How?

    I mean, I finish my draw, now how export the thing i created into .png with their alpha?

    I looked in plugins and the unique that seems to helpme to draw and do things is the "canvas" plugin, but i can't see the "export" options or similar, or i'm missig something?

  • Some inventory plugin for adventure games like the ones on Monkey Island and similar games.

    A plugin that creates a rectangle on the game layout and on you have some parameters like:

    Size of boxes, number of rows/columns and align left/center/right of the object in that box. All this parameter are "virtual", the rectangle box created is for a example a "tiled Background" with one box, so you resize to desired to fit with your game and fill the parameters to get all look correctly.

    Events to move through inventory like: "On click 'X image' -> Move Inventory 1 columns/row right". Or 1 down or whatever.

    So the object in the game have the "inventory behaviour" and when the object is clicked -> Add to inventory, and will be added to the first empty box or the same thing for drag&drop method.

    At the end is some plugin that do an inventory system easy to use without DDBB, jsons, xml or arrays in the user part. I search but all them has a lots of events or things that do all this too complicated :S . or maybe i not found the right one? What's the the easiest inventory systems for construct2? maybe i missed it.

  • Things like this one: https://www.shadertoy.com/view/Xl2SRd , For fade in/out.

    Also the typical horizontal/vertical bars or the diagonal dots,etc... or the basic ones like simply showing the image from up to down in 1px with at a time.

    Examples:

    https://i.ytimg.com/vi/wO5LP5lqxxs/maxresdefault.jpg

    http://i.imgur.com/8lMX9X7.gif

    https://0.s3.envato.com/files/1409260/R ... 90x300.jpg

    Here a game that uses a lot of them:

    Subscribe to Construct videos now

    So, will be great some plugin/effect or whatever to do this effects on layouts or simple images.

  • I had another idea but maybe i'm falling again in the sync/async problem, but if not's the case here is:

    A temporaly LocalStorage, or maybe saving in memory while the game is playing, as variables that we can add/substract or some like that. I prefer Storage Variables so we can manipulate them and change more easily.

    Then an event to save to the real Local Storage like:

    Read TempStorage/Storage Variables > Save to Local Storage

    This "Save to Local Storage" event willl do:

    --------------------------------------------------------------------

    Get item Key1

    On item Key1 get - > Set item "Key1" to Temp.Key1

    Get item Key2

    On item Key2 get - > Set item "Key2" to Temp.Key2

    etc....

    In the same way now we do that, only that he will do automatically for us starting to get the first key defined until the last one. Same thing for the load.

    So, we have a Storage Variable like Global Variable that we can manipulate, if we change his name, in all the sites appears in the even sheet will change (like global variables), the option to add/substract for numbers and all this things.

    In the GUI we have that variables in X order, and set in case of missing what number/text set to default when load.

    The event mentioned to load /save like the Dictionary/Json's trick for all the keys and the option to load/save only one of them in case we need that.

  • The request could be separated into two parts,

    1. enumerate the variables in GUI like global/local/private variables

    2. save/load in synchronization mode

    Using a dictionary like Ashley said, could solve request2 only.

    For point 1 i was thinking in something more like "instance variables" on you can add/remove, select position, set an initial value,etc... like the examples, something more visual/easy to manage.

    About the sync, i'm not a coder and after read some about that i'm still not understand very well XD(also english is not my native language), for that reason i'm using C2(Thanks for this great program!) ,my code skills are 0 so local storage, json's, arrays and similar things simply i can't with that and always i get frustrated to get something working, and maybe i finally got something but when i finish the game and go to another if i need to use it again, simply remember all the time i will have to invest to understand again and get it working i lose the motivation or avoid that feature.

    My first game using C2 was AsteroidX (https://www.scirra.com/arcade/shooting- ... roidx-4511) , was made in only 2 weeks. The unique time i get a bit stucked was using the Parse plugin for online Scores but finally i got things working great with more features that i planned in a first moment so this one worked great and was intuitive/easy to use.

    Now i'm trying to do a basket game cross-platform desktop/mobile/tablet using only the html5 version, this one: https://kronbits.itch.io/basket-prototype . And my idea was create some player stats of wins/loses/draws , gameplays, % of accuracy and lots of achievements but after see all i have to do for get working only one, to load the local storage keys and manage.... well i think i will do only the best score that is already working and maybe the wins/lose/results <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz"> .

    Seems the way i planned have a problem with the sync, but sure there is a way to make it, if not more simply, more visual/intuitive on you can see in a first look how many keys you have in the local storage and manage them, load all integrating with the LocalStorage without using another plugin (the dictionary) and learn how json's works.

    So well, i don't know if this finally will be improved/redone or whatever, but thanks for the replies and the interest guys! <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

  • I don't think any of that changes the basic fact that you can't pretend asynchronous code is synchronous. It breaks assumptions like the events will run in any particular order, which the existing system makes obvious by making you use triggers in a separate event. Anything which looks like a simple comparison/access but really is asynchronous in the background would be even worse than we have now - it would just silently break or fail to work as you expect in random situations!

    I wrote up an idea for a "then" event to try and make things like this easier, but it's not supported and I'm not sure how much it would really help anyway: https://www.scirra.com/forum/idea-make-async-easier-with-quot-then-quot-event_t128870

    Then a trigger on the event sheet on you say "load storage" and this event loads all the keys and sets to the variables you previously defined and in the case they are missing (first time running) sets to 0 or whatever you defined previously.

    And for save another unique event. Now i have to do "get item" event and after a "set item" event, or there is another way to do in a unique event? . If not, will be great simply when X happens set Key.BestScore(The local storage) to BestScore(Global variable).

    This is what i'm doing, is correct?

    There is no way to save the "get item" event? and in the comparision say something like:

    LocalStorage.key.BestScore

  • A common technique is just to load and save an entire Dictionary object's JSON which covers most of this.

    LocalStorage is asynchronous (i.e. setting/getting fires a trigger after a moment, rather than being immediately available) which means it can't really be mapped to anything synchronous (like setting/getting global variables). If a "get global variable" or similar turns in to a "get localstorage value", that value is not immediately available, and may fail as well. So that's not actually possible, without some kind of internal caching mechanism, which is basically the same as doing the save/load dictionary object technique.

    Then, instead of using linked global variables use Storage Keys as variables to use in events.

    So i create a key called BestScore in the storage. In events i can say that when the Player_score is greater than Key_BestScore set new.

    And the load/save/if missing,etc... the Local Storage keys is already covered in properties without events or use any other plugin like Dictionary or create events to load/save json,etc...

    Or if not is possible either the Local Storage variables add a instance variables properties in the Local Storage object that can be loaded/saved with some basic options as in my pics. And as always if somebody needs more deep things can use events.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So, there is no other option to do it more simple?

    -

    I posted a feature request to improve this:

  • The idea is save all the events possible and do all in the properties and in an interface similar to the "instance variables".

    Every time i have to use the Local Storage plugin i have to read the doc and the examples, not's much intuitive at least for me and a bit frustrating to do some things.

    I want to do some kind of achievements/trophies to my game , i posted here () but put here a pic of what i mean:

    So, why not if we can get all in a "Local Storage" interface like the "instance variables" and properties in the object to automatize the process and avoid all this events.

    I made some interface using the actual things to show the ideas:

    So, we can add variables and set what value in case of missing, maybe 0, maybe a text saying "locked" or whatever and the moment we want this one gets saved.

    In the properties we have when load the storage keys. In this case on start the layout "Gameplay" load all the storage keys, in case some ones are missing we already have set the number/text. Other possibilities can be added, and if somebody needs to be more specify always can continue use the events. Or if there are some keys that we don't want to load maybe add another tab in the interface for each key saying "Yes/No" to be loaded using events for any reason.

    So, we have all this configured in a moment and without events, now is time to set/save values in the local storage... or not!. If we are using a Global Variable called Best_Score , we can link/pin to a Key in the "local Storage" and in their interface we already set when save it like On Change/On Start Layout/Every tick , etc....

    If you link a Global Variable to a Key in the local Storage, when the Keys in the Local Storage are loaded they also set the global variables. After that, when a global variable changes will change the key linked.

    Maybe there are things that can't be done for some reason, but as i said the idea is avoid all this events of: Read if exists, get item, set value, if key missing, blablabla.... get something more visual/intuitive and easy to access/use.

  • Actually i have:

    [quote:18fl4in3]

    On start layout > Check "key_trophy1" exists.

    On Item "key_trophy1" exists > Get item "key_trophy1"

    On Item "key_trophy1" get > Set "trophy1" to localStorage.ItemValue

    On Item "key_trophy1" missing > Set "trophy1" to 0

    And that only for the start to check if exists and set a value in case of missing, after that in case i unlock a trophy i do this:

    [quote:18fl4in3]

    On trophy1 = 1 > Get item "key_trophy1"

    On Item "key_trophy1" get > Set item "key_trophy1" to 1

    So, There is no other way to do this thing more simple? Or i have to do it for each trophy i create? :S

matriax's avatar

matriax

Member since 22 Jun, 2015

Twitter
matriax has 114 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies