David's Forum Posts

  • Good job

    I love the motion blur (press + about 20 times on the number pad in case some poeple miss it) and I appreciate how you can resize the sprite and the detectors etc automatically resize, meaning if you decide to change the size of your object later in development you dont need to manually edit the detectors.

    However, I've noticed theres a couple of custom platform engines out here on the forums, and if you dont mind me asking...why are people creating them ? I mean is there something in this engine that the normal platform movement cant do ? If thats the case, please suggest it and it might be implimented. Behaviours in construct arn't just something for noobs to use, they are there to aid in the development process, and they are written in machine code so they perform faster. The goal of behaviours is for them to contain no bugs so everyone can easily access a 'perfect' platform movement, etc.

    Anyways, here are a few minor issues I found

    1 - The engine doesn't appear to handle slopes

    2 - The object can only move whole pixels at a time, so you cant walk really slowly (like 1 pixel per 5 ticks)

    3 - If you make the fps unlimited, the object flies to the left and right...so the speed of movement is dependant on the frames per secon the game runs. This is no problem if it runs at 60 fps on all computers, but if you use V-sync you might have some issues I suggest when you add acceleration and velocity, you multiply it by (timedelta * 80)

    Otherwise, its a pretty good stable engine with its move per pixel collision system! Not even a 1 pixel wide object can run though a 1 pixel wide wall!

  • Yeah, the recent versions of construct also indent conditions below loops so they are easier to read

    Also its still good practise to use sub events, i just thought it was awesome to make this in only 4 events

  • Using only 4 events!

    What it does

    If you run the cap it should be pretty self explainator what the engine does.

    I got the idea from a game called 'Cactus Bruce and the Corporate Monkeys', when I noticed the bricks the monkeys stand on are able to suspend themselves in the air, but the lighter coloured bricks do not. While the object of the game was to destroy all the bricks, you could save yourself time by destroying the bricks which suspended themselves in the air, causing the lighter coloured bricks which were affected by gravity to fall into the ocean (and thus be destroyed)

    Anyway I created a similar kind of falling engine where falling dirt can land on the magic golden capsules and will remain there until either the capsule is destroyed. Likewise, ground holds up other ground, and if theres no connection to a piece of ground that is suspended by a capsule, the ground falls.

    Theory to how such an engine works

    To put it simply, a piece of ground will fall unless a piece of ground which its overlapping isn't falling, or it is overlapping a capsule.

    To create this in the simpilist and easiest way, we use a variable 'canFall' which indicates to the objects if they might fall or not. It is assumed everything will fall until proven otherwise. First off we tell the capsules they cant fall. Next, its just a simple case of looping every object and checking to see if it is overlapping any other objects which cant fall.

    How it works

    We place all the objects into 2 families: red and green, so that we can take advantage of how Construct handles individual Selected Object Lists for each family.

    If we loop each Red, we can then test if Red overlaps Green. Even though Red and Green are infact refering to the same collection of objects, the objects selected are different, and so testing for an overlap between red and green will infact check for an overlap between the selected red and all the other objects on the layout.

    After the overlap condition, Green now represents (if any) all the surrounding objects to the one in question (red). Finally we check to see if any of them wont fall. If the condition proves true, we can tell the object in question (red) that it also wont fall.

    This leads to a problem though. An object wont know if it cant fall unless the object sounding it also knows at that particular time that it cant fall...and its possible that object will be further down the list and therefore wont know yet. As a quick fix to this, I made the event repeat itself for Red.Count. This is NOT the most efficient way, but it does solve the problem for now.

    In Conclusion

    I think this once again demonstrates the power behind constructs event system, and perhaps provides a little more information about how families and stuff work.

  • I've been using So whats the best one to use then...I know some automatically delete the file if they arn't downloading in more than 18 days etc...

  • Just a quick example to show how you can use a horizontal skew to create the illusion of a floor with depth.

    The trick lies in creating a trapezium graphic which depicts how part of the floor looks when viewed in the centre of the screen. Then the floor skews horizontally in such a way that when placed next to another trapezium their sides will match up in a 3d mannor.

    However, at the end of the day...its a hell of a lot easier to just use a 3d box, but I thought this example might be interesting anyways.

    PS: credit goes to Vrav and Holymonkey for the skew idea in the 'streetfighter floors' thread.

  • Nice example! I love the animation. Construct really needs a 'is standing on ground' condition in the platform movement hey...or perhaps even some generally collision functions so instead of just 'is overlapping' we could have 'is touching above / below / left / right '.

  • I was playing around with the 3d box and using layers and effects and came up with this:

    You need to look at it with something like this:

    <img src="http://www1.istockphoto.com/file_thumbview_approve/1038097/2/istockphoto_1038097_3d_glasses.jpg">

    I got mine years ago when I went with some mates to see Spykid 3d

    But I dont know if the SpyKid 3d glasses follow the standards of 3d glasses..anyway the image above looks correct when viewed through my glasses on my laptop screen, so I'm wondering if anyone else has 3d glasses and wether it looks correct. (if you close the left eye, you see one image, if you close the right eye, you see the other...if the colours dont work right you see a more blury picture)

  • <img src="http://img166.imageshack.us/img166/9013/screenshot4gl9.png">

    Hi again, this is a relatively simple example I made showing how a 3d movement can be achieved in Construct.

    To test if two 3d objects are overlapping, you can test for a collision between the player and the 3d box, which will select all the 3d boxes which are overlapping on the x and y axis, and then finally we use a bit of maths to compare the z values (as 2 boxes wont overlap if they are at different depths).

    I individually move the player along the x, y, and z axis so I can easy push the player out of the walls along the x, y, and z axis, allowing the objects to smoothly slide around obstacles.

    To edit the level, simply control drag on the 3d boxes and the player will interact with it properly

    Heres a cap download link:

    http://www.fileshack.us/get_file.php?id ... zzzy3D.cap

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <img src="http://img406.imageshack.us/img406/2539/screenshotpp5.png">

    Just a simple example which renders the light with the 'additive' effect. The result is that the shadows cut out areas of the light, and all lights on the layer add together, allowing multiple lights to work easily.

    Heres two cap files.

    The one that uses PS0.0 effects can be downloaded here:

    http://www.fileshack.us/get_file.php?id ... ng+PS0.cap

    And a smooth shadows one which uses PS2.0 can be downloaded here:

    http://www.fileshack.us/get_file.php?id ... ng+PS2.cap

    Oh and I used physics for movement on everything so you can bump the lights around. Enjoy!

  • Yeah I see the problem...I think it has something to do with the runtime not deleting objects in loops or something. If you need a quick work around for now, you can add a private variable to bullet 'isdestroyed' and compare it to 0 (and set it to 1 when your destroying an object) on loop 'move'. This will make your game behave as you expect.

    btw nice use of lights

    Oh and nice use of an action point to move your object in the direction it's facing

  • If you have used an older version of Construct before, please ensure that you have ran the uninstall program. Please tell us if problems persist <img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" />