R0J0hound's Recent Forum Activity

  • Have a look at the webstorage object for a way to save info across runs.

    https://www.scirra.com/manual/120/webstorage

    Also the browser object has a way to invoke a download to a text file, and The nodeWebkit plugin has a way to create a file when using nodewebkit export.

  • An effect could be made to do it, but I haven't seen any yet. One way to do it is using the Paster Plugin which allows you to specify the corners of a quad to draw on.

  • Here's a a way to do a line graph, as well as putting it on a box. Didn't use canvas.

    https://dl.dropboxusercontent.com/u/542 ... /plot.capx

    Minor

    I like how yours scales to the max value and labels the y axis. A very nice touch!

    edit:

    Just tried your latest one. Looks pro.

  • This post may help.

    Sampling pixels is a relatively slow operation that adds up when doing it multiple times. In javascript you can copy a whole pixel area to an array. The result is very fast sampling of any of those values. The expression in the canvas object is .AsJSON and it returns a json string that then can be loaded in the Array object.

    I added it as an experiment so it isn't very user friendly. For one the array size is [1, 1, width*height*4] and to access a particular pixel you have to do it with [0, 0, (width*y+x)*4+i] where i is 0 for red, 1 for green, 2 for blue, and 3 for alpha. Also all the pixel data is in the range of 0-255.

    With regard to performance, one rgbaAt() is faster than one .AsJSON, but .ASJSON becomes faster when you want to sample many pixels. Also the bigger the canvas the slower it is, so when you only need to check a smaller area you should paste the canvas to a smaller one and use .ASJSON on that.

    Also alternatively Another idea is to just copy the terrain to an array to read from and clear it manually when you clear parts of the canvas. Tedious, yes but gives good performance.

  • If my variable1 is 1 then the following conditions, actions and sub-events won't run.

  • Cool. Do you do any keyframe blending or is it just straight keyframes? Thought about adding rotation?

  • Here's an example that can get you most of the way there. You'll probably need to position the object overhead before pinning though.

  • Keeping track of what waypoint the car is on is a way to give a very rough estimate of the rank. You can get a finer rank by also considering the perpendicular distance to the next waypoint.

    So the event needed would basically look like this:

    For each car ordered by waypoint*1000-perpDistToWaypoint decending

    --- loopindex+1 is the rank.

    If the distance between checkpoints can be more than 1000 change it to some higher value.

    Ex.

    https://www.dropbox.com/s/y3xhf4wp2t6kh ... .capx?dl=1

    /examples26/laps.capx

    The perpendicular distance is the dot product between the waypoint line and the vector from the waypoint to the player. It can actually give us negative distances so we'll put it in a abs() so it's always positive.

    Player = {x, y}

    waypoint_to_player = {x-way.x, y-way.y}

    waypoint_line = {cos(waypoint.angle), sin(waypoint.angle)}

    perp_dist =abs( waypoint_to_player dot waypoint_line )=abs( {x-way.x, y-way.y} dot {cos(waypoint.angle), sin(waypoint.angle)} )

    = abs((x-way.x)*cos(waypoint.angle) + (y-way.y)*sin(waypoint.angle))

    vector

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, but from the best I can tell:

    solModifiers is the current selected object list state, or something to that effect. Basically what's picked.

    pushCopySol() Saves the current sol to a stack.

    popSol() Restores what was saved from a stack.

    More details about it can be found be poking around the source.

  • The most info you can find is from the manual:

    https://www.scirra.com/manual/26/runtime

    The function basically grabs the current position in the event sheet and runs the subevents from there multiple times. Once for each dictionary key.

  • Well you can't really disable it. The most you can do is change the "runtime" property (below the eye distance property) from direct-X9 to application. But then the game will have no graphics at all.

    Also if the server has a display then it has a graphics card. It sounds more like you need to install directx or something.

  • How does the eye distance have anything to do with the crash? Did it start crashing after setting it to 0? Eye distance is mainly for 3d objects and objects with ZElevation. Why do you want to disable it? If it's perspective you want to disable you can do it with the system action "set projection mode".