oosyrag's Forum Posts

  • That is one third party program that can create JSON files.

    But I want to reiterate that you can do the same within Construct itself for free.

  • Like I said, the creator of the tutorial probably did it ahead of time.

    After setting up the array as you like, you can use the Array Download action to save as JSON, or use the asJSON expression to get a string with the contents of the array. You can then use the Array Load action to load that same string or file.

    To set up your array manually the first time, you'll have to either parse in a .csv spreadsheet, which I recall describing to you a while back, or you can set each array cell with the Array Set At actions in Construct.

  • As you described, the solution is to use nested loops and loopindex - For "x" from 1 to 29, then For "y" from 1 to 31 as a sub event. Your action would be to create a tile object at x, y where x is loopindex("x")*gridwidth and y is loopindex("y")*gridheight. You can add a constant value to each of these to offset the start position.

    In terms of optimization though... I personally would not create a potentially unused object for all the empty spaces and only create them when needed, in the right place.

    General words of wisdom - Never fear running into a dead end. In the process of doing so, you will learn exactly why and how a dead end can occur, and how to work around it. Also, there is no such thing as starting from scratch, as long as you have the experience of going through whatever you did previously. A program that takes you a month to write the first time, even if you were to lose everything, you could probably recreate in just a few days the second time you do so.

  • Don't try to read the JSON. JSON is a simply a data format for storing an array. You generally don't want/need to directly edit it, or to learn how to write JSON.

    Basically, you can set up an array in a program and save it as JSON, and load it again later back into your array.

    To generate the JSON, he probably prepared the array ahead of time and saved it as a file for easy use for his tutorial.

    Simply - An array can be saved as JSON, and when that same JSON is loaded you'll get the array that you saved. You don't need to understand the JSON format itself.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've heard bitballoon and weebly floated around. There are tons of options, just run a search for free web hosting on google.

  • More info from the creator of that video. http://blog.mimeoverse.com/post/5814677 ... d-minimize

  • you can simply use replace(src," "," ") to turn double spaces into single spaces.

    (The forum auto corrects the double spaces between the first set of quotations, so make sure you have two there, or however many you want.)

  • Subscribe to Construct videos now

    Is a gold mine of information regarding camera logic.

    Basically, you do not want to use scrollto on your player object. You'll be using an invisible helper sprite, lets call it "camera" and scrollto that. You will be moving the camera object around with constraints (min(), max(), and clamp()) based on player position and your preferred logic.

    But from the video you can see how much consideration goes into having excellent viewport camera logic.

  • Break up the http://www and the rest of the link to post long URLs without rep.

  • As far as I know, you'll need to write a bit of code or use a plugin to encrypt/decrypt your json when you save/load it. One of the simplest ways is a character shift/replacement. It can be cracked, but if you have the luxury of worrying about the tiny population that would go through the effort, you probably have a wildly successful game already anyways (And then you can just change the method if you REALLY care that much. Which you probably won't.)

    Loading the files from a server is indeed the most secure method. At the very least, a user would not be able to change the file.

    If you think any offline game can be safe from hacking, that is simply not true. Effort and time is best spent improving your game rather than worrying about hackers, or you will never get to the point where you make a game worth hacking to begin with.

  • Here is an example to get you started. https://www.dropbox.com/s/0ru37dkgyhqvi ... .capx?dl=0

    It will take some rather advanced artistic skill to make it actually look like water though.

  • It works exactly as described and expected. You should post a capx.

    Sprite 0 moves downwards ever tick until it passes 786, then gets destroyed. Then myvariable increments every tick, and will run the last action every tick after it gets past 50. So what is in your last event in the [do something] part?

  • I have no idea what you want it to look like.

    Generally if you want it to look good, as in traditional animation, the entire swing should be drawn out frame by frame and collision boxes applied per frame as an animation, rather than moving and rotating a static sprite.

  • The exact way to achieve what you asked is to store the mouse x/y values in a variable every tick, and compare the current location of the mouse vs the stored value as a condition before updating the variables with the new values.

    This won't be much different than every tick though.

    A more efficient method would be to have an update event run with the mouse button is down and every x seconds conditions.

  • https://www.dropbox.com/s/zqa1oylpr0hxw ... .capx?dl=0

    A rough draft. You'll have a lot of tweaking to do with the angle of motion to get it to how you like. You may want to try using an imagepoint on the sword rather than the player origin to base your angle off of. Also the speed and acceleration (deceleration in this case) can be tweaked as well to get the type of motion you want. A more complicated formula will get you the rapid decay or "eased out" motion as used in Zelda.

    Tebbo - Angle=Angle+180 would be inverted angle, variable=constant-variable gives you invertable values. Unless you had something else in mind for inverse()?