Endless flight game

  • BluePhaze

    Oh my god.Those codes are above my knowledge.

    I've got an idea.

    Instead of using arrays,I will create "areas" of many objects predefined and then randomly bring them to screen so that it will look scrolling.Is this possible?

  • Doc Ai I can't think of a good way (other than arrays) of defining an area of objects. Unless you take one large image, add a bunch of image points, and then when you bring it on screen pin all the other sprites to the image points... but that may hurt performance as your large image/sprite would eat up a good deal of screen real estate... unless it is set to invisible which might just work...

  • BluePhaze

    So I have no choice but to learn arrays.

    Are you sure that I can do it with arrays?Taking into account that the .jar game also used arrays,this should be possible.But is this possible in construct 2?

  • Look up the tutorials/posts on auto tiling or randomly generated levels and you will get a good idea of how to do this with arrays.

  • BluePhaze

    LittleStain

    I've just got an Idea.

    I will create many tilemaps.Put the first one on the screen and others away from it.Each assigned with bullet behaviour.

    Then at rhe start of layout I will pick a random tilemap and put it at X-axis,320(level width).

    Again after the picked tile map reaches x-axis 0,another will be picked and so on.This should be a loop I think.

    The problem is how to get the UID of the randomely picked tilemap.

    Is this a good idea?

    This should make the game infinite and the java game actually works this way.I see many areas repeated.

    I don't want to make the game difficult over time(Or I will think about it later)

  • That would get very repetitive which in an endless runner/flyer would be a quick death sentence for the game. Just take a look at the random generated or procedurally generated threads on the forums. Looks up Auto Tiling and random generated and you will find what you want :)

  • BluePhaze

    I just want to make it this way.I will also make it the way you mentioned.

    But for now,I'm just a beginner just scratching the surface.

    The tutorials use many events and actions like functions arrays etc..Which I am not very familiar.

    Anyways,

    The method I mentioned does not seem to work.The logic is correct.

    Please have a look at this example:

    This

  • This way the logic is correct:

    <img src="https://www.dropbox.com/s/c715ps6gczjkbdb/Correctlogic.jpg" border="0" />

  • Hmmm, dropbox issues with the picture..

  • LittleStain

    There is an empty space of 640 pixels between the photos on your method.

    I don't know why my method is not working.It should work. :((((

  • When I test there is no empty space..

    Are you sure you copied it correctly?

  • LittleStain.

    Can you give the capx.

    It may be a problem with the arrangement of the sprites or something like that.

  • LittleStain

    Oh.I exchanged the actions.

    Thank you it works.

    But Why is my method not working?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • because you use x=0

    There is a big chance x is never exactly 0

    and even if you are setting to 640 if x < 0 there's a big chance the backgrounds will have a white space inbetween, because of the x not being 0.

    Setting it to it's x position plus an amount, will make sure the distance between the two backgrounds is always the same.

  • Does this work for tilemaps too?When I tried,I failed.I will post a capx of the tile map after 10 mins.

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