R0J0hound's Recent Forum Activity

  • The project is likely being loaded just fine but no editor windows are opened. Construct saves the ui state when saving so it is possible to load with no open windows.

    My original post still stands as a solution.

    This is what I meant by project toolbar:

    http://sourceforge.net/apps/mediawiki/construct/index.php?title=Project_Bar

    Another solution is to delete the .persist files in the same folder as the .cap. All a .persist stores is the ui state so it can be safely deleted.

  • It is backward compatible, since it's just standard javascript. All Asm.js will do is more efficiently convert javascript written in a certain style into fast machine language. The code will work in older browsers, but it will take a newer browser that does the conversion to see any speed improvements.

  • GamesDev

    1. You change the speed by adjusting the target angle. In the example ang is set to point a bit above the target, to make it go faster just have ang point a little lower. If ang points right at the target the speed will be fast enough to reach the target in one frame.

    2. You could just position a sprite to the mouse.

    bon4ire use this modified equation:

    angle(posx,posy,mouse.X,mouse.Y-clamp(abs(mouse.x-posx), 100,1000))

  • Go to the project toolbar and open it from there after loading.

  • From r123 changelog this is the affecting change:

    pdated Google Closure Compiler to the latest version

    I don't think there is anything I can do on my end to fix it as the minifier just fails and produces a c2runime.js file with a size of 1kb containing only one comment. An empty project produces a c2runtime.js file with a size of 81kb.

    One solution would be use the minifier from a previous release. Just copy this file:

    ..\Construct 2\exporters\html5\tools\closure\compiler.jar

    from an older release over to a new.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is a way a bit different to what you were doing:

    http://dl.dropbox.com/u/5426011/examples17/selection_interface.capx

  • ut I heard that the performance is really bad on mobile

    It's always best to test it to see the actual performance as hearsay can be exaggerated.

    For moving objects you should take the manual into consideration:

    ou should also avoid pathfinding every tick, since this will cause extremely high CPU usage and also increase the amount of time it takes for other objects to determine their paths.

    https://www.scirra.com/manual/154/pathfinding

    You'll still end up having to calculate a new path periodically, but all you need to do is get it close enough to the player so it has a line of sight to the player. Then you can switch to a much less cpu intense behavior such as the bullet behavior, to close the gap.

    You could also try and do what gillis did and break the area up into boxes and make a list for every box of the best direction to get to any other box. It's a bear to setup as you'll basically be defining the path from every box to every other box, but once the game is running pathfinding will be very fast as it's just a simple lookup.

    http://www.scirra.com/forum/quadralant-pathfinding-optimization-solved_topic60379.html

  • I'm using the array as a queue. Values are added to one end and the other end is what is used and where values are removed.

    f either global variable is not equal to 0 --> add the angle expression to the arrayHere we know that some direction is being pressed, so the angle is added (pushed) to the front end of the queue. In simpler terms we are just saving the current angle pressed.

    f the array has 5 or more entries on the x axis (width) --> move to the back of the arrayYou have the first part right, but all it does is remove (pop) a value from the back end of the queue when there is 5 five or more values. This is limiting the number of angles saved to 4 by removing the extra values. The "back" is where we remove from since it's the oldest value.

    f sprite is moving in any direction ---> set animation to walk & int(add 360 to the back of the array, divide it by 360, and divide the remainder by 45) from current frameThis one is kind of two part. The bulk of the formula is converting an angle to the closest eight direction. Here is a topic that explains it pretty well:

    http://www.scirra.com/forum/sprite-movement-8-dir-troubles_topic47201.html

    The second part is what angle is used, which is the oldest value in the queue or the "back" value. The gist of this is we are effectively using the direction that was pressed four frames ago.

    f sprite is not moving ---> set animation to first sprite in animation, and then reset/empty the arrayWhen the sprite is not moving we want the animation to reflect this. Without this event the sprite would just walk in place. By setting the animation frame to 0 we prevent animation and use the image for standing. The effect of resetting the queue to be empty is not really noticeable and that action could be removed. I just thought it logical to fill the queue new every time instead of reusing existing values from a previous motion. But considering the time it takes to fill the array: 4 frames *dt ~= 0.07 seconds it's pointless as that's faster than human reaction time.

    And yeah that's the main character from Earthbound.

  • Since you can't change the collision polygon for tiled background objects, a solution would be to use a separate invisible object for collisions.

  • It does that since it's hard to release two arrow keys on the same frame.

    One possible solution would be to use the angle from a few frames back. The idea being that it's easier to release two arrow keys over a few frames than one.

    http://dl.dropbox.com/u/5426011/examples17/8dir2.capx

  • I get a grey game area and the browser hangs when I try to play games in the arcade that use the pathfinding behavior. I've tested in Firefox 19 and Chrome 26 and according to the javascript console in chrome the reason for the fail is it can't load pathfind.js. The error message looks like this:

    Failed to load resource: the server responded with a status of 404 (Not Found) http://static1.scirra.net/arcade/games/3969/pathfind.js

    Here are three different games I've tried with the same error:

    no capxhttp://www.scirra.com/arcade/example/2130/test

    no capxhttp://www.scirra.com/arcade/addicting-shooter-games/4182/space-threat

    with capxhttp://www.scirra.com/arcade/games/addicting-action-games/3926/go-faster

    If I download the capx for the last on it previews just fine in r123.2. My system is winxp/sp3

    Here is a relevant topic where two other people are having the same issue:

    http://www.scirra.com/forum/grey-screen_topic65219.html