Snake Trail - Example -

0 favourites
From the Asset Store
Unlock platyers earning coins, and save it with Localstorage
  • Hey guys ,

    I was working on a game with a guy , and then the guy contacted me that someone else did him the game , So we cancelled the game ...

    It's a snake trail , made with less than 5 events using arrays ...

    Oh and it's an infinite trail , it's not random invisible object , it's objects that are spawned to the tail on each collision with the crystal ...

    Here is the example ...

    Link unavailable ...

    A-D to rotate

    If anyone wants the capx , just re-ply to this post ...

    Edit ; The capx is up ... It's actually a 4 events version :3

    .Capx

    Cheers ...

  • I like what you have put up. I would be keen on seeing the capx.

  • Same here.

  • ^--- czar , Semo ---^

  • Thanks.

    I need to start reading up on arrays. I haven't used them yet and while i have a general understanding of how your example works i still have no idea what the array really does <img src="smileys/smiley36.gif" border="0" align="middle" />

  • cheers. Looks like a good starting point for a fun project.

  • Kyatric ,

    This would be perhaps useful for the FAQ , I suppose ...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I recall doing a snake/Gradius-style option thing in the past. (I've since improved on this version to allow it to things similar to Gradius V like freezing the options and rotating them)

    I looked at the example, but I don't see the trail. Is it the circle?

    Also, I'm getting a 404 error from the capx link.

  • Oh sorry , I totally forgot that I rem placed the caps and the example , I'll fix it when I get home

  • Whiteclaws Thanks for sharing this! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Great Job Whiteclaws.

    Nice movement. I think I remember you being a bit bent out of shape a while back, because you were having trouble with arrays. So it appears as far as arrays go... you have arrived.

  • Val , All my old array problems were due to one event ... I just had to set the size of the array in the event sheet , Such a shame , so much nice project scrapped for a such little error :(

  • There is a bit of magic going on that I don't understand.

    Pos.At(MaxArrayW-10*Crystal.SpawnNumber,0)

    What does pos.at( do I cannot find any references to it in the manual.

    The problem I am having is that on slower computers the snake's body is drawn far apart. I would like it to reposition the same distance regardless of framerate.

    dropbox.com/s/z1rdls49vnx2ige/SnakeGameTest.capx

  • Pos.At(MaxArrayW-(10*CrystalSpawnNumber)*dt,0)

    That should do the work ...

    Pos is the name of the array

    At() is the expression ...

    -Manual

    At(X, Y, Z)

    Retrieve a value at a position in the array. Indices are zero-based. Reading values outside the array returns the number 0. If the Y or Z indices are not provided then 0 is used.

    Cheers czar ...

  • Whiteclaws

    POS bugger! why didn't I see that?

    unfortuentaly Pos.At(MaxArrayW-(10*Crystal.SpawnNumber)*dt,0) doesn't work at all; all the body parts are underneath the head.

    I will see if I can work it out. Thanks for your help.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)