R0J0hound's Forum Posts

  • Kurz

    Here are a bunch of cool things that may be fun to make.

    http://paulbourke.net/geometry/

    http://paulbourke.net/fractals/

  • Here is you example tweaked a bit.

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

    Change steps to change the number of in between positions to check.

  • 1. This can be done with either:

    a. using a layer with "force own texture" set to yes, a black sprite covering it and sprites with the destination-out blend wherever you want to see through.

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

    b. Using my Paster plugin to draw to a texture directly. The advantage over A is you can have more of a persistent fog without lots of destination-out sprites.

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

    2. This can be done with a lot of sprites like foxrain4 said or you can use the tilemap objects for better performance although it becomes a bit more tedious to clear the terrain. A third option is to use my Canvas plugin to access pixel image data directly, but it will require much more effort since you'll have to make your own collision detection and response with pixels since C2's collision and behaaviors only works with polygons. Anyway here's a topic that links to a bunch of useful examples on the topic:

    how-do-i-manipulate-images_t115767?&hilit=terrain+destruction

  • You'll have to check the positions between the timesteps.

    So instead of this

    for each ball
    Check for collision at ball.x, ball.y
    ---destroy hole[/code:xvtk3yei]
    
    You could store the old positions and check the 10 positions in between like this:
    [code:xvtk3yei]for each ball
    repeat 10 times
    Check for collision at lerp(ball.oldx, ball.x, loopindex/10), lerp(ball.oldy, ball.y, loopindex/10)
    --- destroy hole
    
    every tick
    --or--
    ball: on created
    ---ball: set oldx to self.x
    ---ball: set oldy to self.y[/code:xvtk3yei]
    
    Or you can check each pixel step in between instead of 10 steps.
    [code:xvtk3yei]global number dist=0
    
    for each ball
    --- set dist to distance(ball.oldx, ball.oldy, ball.x, ball.y)
    ------ repeat dist times
    ------ Check for collision at lerp(ball.oldx, ball.x, loopindex/dist), lerp(ball.oldy, ball.y, loopindex/dist)
    --------- destroy hole
    
    every tick
    --or--
    ball: on created
    ---ball: set oldx to self.x
    ---ball: set oldy to self.y[/code:xvtk3yei]
    
    Or to make it less cpu demanding you can make it only check every 10 pixels in between like so
    [code:xvtk3yei]global number dist=0
    
    for each ball
    --- set dist to distance(ball.oldx, ball.oldy, ball.x, ball.y)/10
    ------ repeat dist times
    ------ Check for collision at lerp(ball.oldx, ball.x, loopindex/dist), lerp(ball.oldy, ball.y, loopindex/dist)
    --------- destroy hole
    
    every tick
    --or--
    ball: on created
    ---ball: set oldx to self.x
    ---ball: set oldy to self.y[/code:xvtk3yei]
  • My highscore is 56. That was mainly after getting a soda powerup. It could be useful to include the run time with the score. I usually only last 10-15 seconds. I used the gamejolt version and the performance was decent. My machine is a bit older and my graphics drivers won't update so html5 stuff doesn't run great for many games, but yours ran ok.

  • There are only global and instance variables in CC. C2 spoils us with local variables.

  • It opens and runs fine here. What is the error you get?

    It possibly could be you're running out of video ram. Open the task manager and see if any temp.exe, temp1.exe, temp2.exe, ...etc are running and close them. Those are the previews and if your game crashes they may not close right and are retaining video ram.

  • I've killed soo many beavers playing this. I think you've succeeded in giving it that hard arcade feel. I just have a few random ideas.

    It would be cool if you could give the beaver some acceleration. So instead of hitting the ground running full speed, he would start standing and accelerate up to speed. The same could be done for the speed power up so the speed change wouldn't be instant. This could also be used to make a progressive game mode where over time the beaver runs faster and faster.

    I'm no animator but I wonder if it could look cool to have a turning animation. Also it might look cool to have some effects such as skid marks in the grass or puffs of dust when turning. It could also look cool to give a dust trail like Looney toon's roadrunner when you get the soda powerup.

    Lastly gibs. It would look pretty cool and make dying a reward in and of itself if beaver bits got blown all over upon exploding. That and a little screen shake would make the expositions pack more of a punch.

    Anyway just some random Ideas. As it is now it looks pretty good. I especially like the menu.

  • PhoeNYX

    I'll reply here too. If you PM me the cap I'd be happy to try to recover what I can. I made a python library called Capreader that allows you to open cap files. The advantage of it is even if the file is corrupted you can access anything up to the point of corruption.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • PhoeNYX

    I made a python library called Capreader that allows you to open cap files. If you PM me the cap I can use it to salvage what I can. It all depends on what point got corrupted in the file.

  • You could use this expression for an equivalent of choose.

    {"sound1", "sound2", "sound3"}at (random(3)+1)

  • Use the .AsJSON expression and "set from json" action to copy object state. Ex:

    Global text temp=""

    For each ball

    ---Set temp to ball.AsJSON

    ---ball: spawn ball at image point 0

    ---ball: Set form JSON string temp

  • From the system expressions manual page.

    https://www.scirra.com/manual/126/system-expressions

    [quote:2mxahcdl]right(text, count)

    Return the last count characters of text.

    Use that with a system compare condition with right(EditBox.Text, 1) = " "

  • Without more info about the sub-events I'd say no. If the sub-event has conditions that pick boxmutant objects then comparing the object count is redundant since if there are no instances then it automatically won't run.

    Basically for optimizing you should only optimise slow areas and somehow check performance before and after to see if things were improved. Me personally, I try to keep events simple and readable. The profiler can be useful to check what percentage of the country's each event group is using, and help identify what areas need More attention.

  • Every tick set sprite size to (50*OriginalWindowWidth/WindowWidth, 50*OriginalWindowHeight/WindowHeight)