Endless flight game

Get help using Construct 2

Post » Fri Jan 24, 2014 12:36 pm

I have seen many tutorials and threads on this site.But I don't understand anything.Some were talking about "Arrays" and others "plugins,timelines".
So I want my own thread.
http://www.2shared.com/video/AY62TOOk/20130124_143555_1.html
Look at the video.Sorry for the glitchy movements.Actually I'm using a java emulator.That's a .jar file.
So everytime I restart the level,the level is randomly generated(Not like scattered waste.It is obeying certain rules,the level is generated in a certain pattern.
Someone said that arrays can be helpful here.But what is an array?Can you show an example .capx of THESE kind of games?Doc Ai2014-01-24 12:36:41
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Fri Jan 24, 2014 1:45 pm

I could try and explain about arrays, but there is already a great tutorial explaining the basics:

Arrays for beginners
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Jan 24, 2014 4:43 pm

Well, whilst it is still good to learn how to use Arrays, I have another idea for you.

You can get a full working example of an "endless flight" game in the Construct 2 program.
1. Open Construct 2
2. Go to File->New (or use Ctrl+n)
3. Search for "Template: Flying along" and open it

And, there you go. An infinite flying game that is well-commented and easily expandable. Also, there are no arrays involved in the making of this endless flight example.

I hope this helps.
B
20
S
4
G
1
Posts: 185
Reputation: 2,563

Post » Fri Jan 24, 2014 5:52 pm

@danialgoodwin
Thanks.I'll see to it.
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Fri Jan 24, 2014 6:02 pm

@danialgoodwin
whilst it may seem easy,look at the video file I provided.See how its different from the Template in all ways.
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Fri Jan 24, 2014 7:48 pm

Okay, I watched the video. Any difference in particular you specifically would like to mention? I might be missing something.

Similarities:
- Endless flyer
- Randomly generated levels, with a certain pattern
- Player moves up and down
- Screen/background is moving left
- There is a top and bottom boundary
- There are objects appearing in the middle of the screen (and top/bottom)
- There is a score that is kept that depends on the distance traveled

But, just to make sure we are talking about the same template, here's a picture of "Flying along":



And, here is a picture of the example endless flight game:


danialgoodwin2014-01-24 19:50:53
B
20
S
4
G
1
Posts: 185
Reputation: 2,563

Post » Sat Jan 25, 2014 7:44 am

Danialgoodwin

http://www.2shared.com/file/amtuMbWy/Harry_Potter-3.html
Ok.Here is the .jar file.You can extract it using winrar or something.
Then go to images,background and open,ground unit board.
Seeing this,the images has to be made to sprites and in certain patterns.That's what is causing trouble
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Sat Jan 25, 2014 8:18 am

@Doc AI

The example provided, doesn't seem different in all ways to me. It is just missing the generation part you want for the obstacles. The rest of the example is a very solid example of how to achieve the mechanics for a game like you want to make.

So, how to generate the obstacles?
You could create them at runtime based on predefined patterns. How you would like to create these patterns an randomize them a bit is up to you. You could indeed create these patterns in an array using numbers to define which animation frame to use at which spot or to set a tile in a tilemap.

Randomly creating objects won't work, because there are rules and patterns to take into acount. It might not be easy to get the result you'd like and will almost certainly take a lot of trial and error.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Jan 26, 2014 10:07 am

@LittleStain
Tile?I prefer the tile map.
How will I do it?Can you give me an example of that kind of tilemap thing.
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Sun Jan 26, 2014 11:49 am

Not a great example, but it shows the possibilities of using an array to manipulate tilemaps.

also added a choose() in the predefined, to show possibilities of randomness while predefined.

Capx
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests