AllanR's Forum Posts

  • Ashley

    I Just saw the Built-in functions video - very exciting changes! Naming the parameters will be tremendously helpful.

    I use a lot of functions (sometimes with many parameters) - and I LOVE being able to collapse everything done to the minimum, so that the event sheet is almost like an index. Then when I am working on something, I only expand the functions that are relevant. That keeps everything else hidden so I can focus on the task at hand.

    So, it would be really nice if there could be an option to hide the parameters when the function is collapsed. Or maybe have them listed on the same line, after the function name.

    * sample of a game with hundreds of events, bust still able to fit on one screen:

  • tonyefe

    you can unzip a capx file and edit the .caproj file - and change saved with version on line 11 to say 26500 instead of 26600

    obviously this doesn't work if the file uses new features not found in the older version...

    I made the edit for you - you can get it here:

    https://www.rieperts.com/games/forum/2019.03.28.Level.Selector.correct.capx

  • kiugetski

    another way to tackle this problem is to make a grid of background sprites, and rotate them so that there is always one ready to scroll on to the screen...

    I made a sample to show you what I mean. The screen is 1920 x 1080, so I made a grid of 9 background sprites (3 rows of 3 sprites - each 1920 x 1080). You start in the middle one. Which ever way you move, whenever you move into a new row or column of the grid, the row or column furthest away gets moved up to the front in the direction you are moving. This keeps you in the middle of the grid, so you can move in any direction and there is a sprite up ahead to scroll on.

    to make it easier to see it in action, you can press Z to zoom out, and press C to change the backgound sprites to solid colors. Zoomed out you can see the row or column get rotated to the front.

    (Press Z again to zoom back in, and press S to show stars again).

    It uses Unbounded scrolling, so you can fly in any direction forever - the backgounds keep rotating under you so you always see stars (or the solid colors).

    The only thing interesting that I put in the universe is at sector 0,0 and 3,3

    (you start in 1,1).

    use the arrow keys to move the spaceship, spacebar to fire - but there is nothing to shoot.

    https://www.rieperts.com/games/forum/spacebackground.capx

  • mizd

    event 64 will get executed every tick - as long as lives = 0

    so it is starting to play the song 60 times a second...

  • jatin1726

    thanks!

    I made a couple of minor improvements - made it use a family, and filter based on a Group variable in the family (like Maverick suggested), so that it is easier to integrate into an inventory system, shop, or gallery...

    so, re-download from the link above.

    good luck with your project!

  • jatin1726

    well, there are some pretty complex concepts in there...

    my sample is only 21 events but it may not be very easy to understand what is happening if you haven't used lerp or modulo, or have a firm grasp of how picking works. There are probably a million other ways to do it, and you could add all kinds of effects as the thumbs are flying around - rotate them, scale them, change opacity, etc...

    I made it very generic - it will work for any number of columns and rows (you can enter those values at the top and then click the generate button to make the thumbnails). or just keep clicking generate to get a new set to play with.

    I have all the thumbnail images in one sprite object as different animations. If you really wanted separate sprites for each thumbnail, then you would have to put them in a family and change the code to work with the family.

    it was a fun exercise... and like I said - there is lots of room for improvement by adding additional effects.

    https://www.rieperts.com/games/forum/thumbs.capx

  • WRS

    for my sample, you can have as many triggers as you want and move them anywhere. You just have to change the angle of the trigger to point to the next one (and make sure they are lined up so that the patrol will hit the next trigger).

  • WRS

    it was a little more complicated than I expected when there were multiple patrol objects and lots of triggers. In my sample, patrols move until they hit a trigger, they then turn until they match the angle of the trigger, then start moving again.

    If a trigger is set to an angle of 90 degrees, C2 sometimes thought it was a small fraction off (like 90.00002), so you have to round the angles before comparing.

    I also ran into trouble when multiple patrols were overlapping triggers at the same time - you have to make sure you are comparing to the correct trigger.

    then, if the difference in direction is more than 180 degrees, you probably want to turn the shorter direction, so in that case the patrol turns -5 degrees.

    you can get my sample here:

    https://www.rieperts.com/games/forum/patrol.capx

    EDIT: one important note is that, obviously, if the patrol is turning 5 degrees (or -5 degrees) per tick, then you have to make sure the angle of the trigger is a multiple of 5 - otherwise the angle of the patrol will never match up with the angle of the trigger and it will just spin around on the trigger forever...

  • neku

    there is a thread for Spriter on the C3 General Discussion board, and there is a version in the works for C3 that is usable now (although still in beta from the sounds of it).

  • haopl

    I would use the Fade behavior. Create all the brick_stop objects in the loop the way you have it, but replace the Wait action with setting the "fade in time" property. (obviously, set the fade out time to 0).

    Another way to do it would be to set a global flag that would trigger creating one row of bricks every x seconds, until the board is full.

  • since the random range is 1 to 5 and then rounded, you will get the following results:

    1 to 1.49 = 1

    1.5 to 2.49 = 2

    2.5 to 3.49 = 3

    3.5 to 4.49 = 4

    4.5 to 5 = 5

    so, 1 and 5 have half the chance to be picked as 2, 3 and 4

    you should use: choose(1,2,3,4,5)

    or use floor or ceil to make sure everything is rounded the same way to make the chances equal.

  • neku

    300 is a lot of animations for one object, and could cause memory issues because all those animations would be loaded available all the time.

    if you only need certain sets of animations available for certain levels you might want to group the animations needed by the levels they are need on. Or have some base animations and pin accessories on top to minimize the number of animations you need.

    You might want to look at Spriter. it allows you to create basic animations and then use character maps to build up all the different combinations you need - and would be a lot easier to manage!

  • Try Construct 3

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

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

    there are lots of ways to do it... you could make the player sprite have different animations for the different looks. Then you just have to change the animation.

    or you can have an invisible player sprite that has all the behavoirs and then pin what ever sprite you want on top of that.

  • KacperStasieluk

    the trick to get from a position on one layer to same place on a different layer is to use LayertoCanvas from the source layer and then take those canvas coordinates and plug them into CanvastoLayer on the destination layer.

    I made a quick sample to show you (based on that tutorial you linked to).

    I made the mask layer have the same parallax settings as the Game layer, so the glow object can just be pinned to a light source on the game layer. But any light source on a layer with different parallax settings needs to manually set the glow position using the layer to canvas - canvas to layer method.

    so, in my sample there are two torches on the game layer and some fireflies, and the player has a very dim light too. Then there is a torch on the layer behind that (with 50% parallax), and a moon on the back layer with 0% parallax.

    https://www.rieperts.com/games/forum/LightMask.capx

  • Dayvid86

    from the manual for the sprite object:

    Load image from URL

    Load an image from a given URL. The current animation frame will be replaced with the image. It is not shown until the image has finished downloading, and On image URL loaded triggers. Images loaded from different domains are subject to the same cross-domain restrictions as AJAX requests - for more information see the section on cross-domain in the AJAX object. Data URIs can also be passed as an image, e.g. from a canvas snapshot or webcam image. The Size parameter sets whether the Sprite object will be set to the image size when it loads, or whether to keep its current size and stretch the image.