;( Arrays Tutorial ?

Get help using Construct 2

Post » Tue Jan 08, 2013 12:03 am

I really need to use them in my games but they are really hard to use for my mathematics level , I really need to learn how to use them :( Any tutorials on how to use them or a plugin with simpler event-based controls ... Maybe tutorials for some procedural generation with arrays ... Remember , the logic is here but can't do it in c2 ... Any help is appreciated !
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Tue Jan 08, 2013 12:16 am

If memory serves, your capx from before showed you understood them fine. What is it you don't get?

Or are you looking for things to show their use? Like for example what you asked there, procedural generation with arrays? If you don't understand arrays, then you'll have a hard time with something like that, as you'd be trying to learn 2 things at once... unless you already understand PG.

Let's start with what you understand about arrays eh? ;)
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Tue Jan 08, 2013 12:49 am

@procrastinator , I understand what is an array in general , but I don't understand how to use them in C2
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Tue Jan 08, 2013 1:07 am

The good old how do I FAQ contains a full section about arrays with a recently added "Endless Procedurally Generated Terrain" item.

For tutorials, there's the always nice arrays for beginners.
I also show how to use an array for some high scores management in my Asteroid in less than 100 events tutorial.

The creating a memory match game also displays another usage of the arrays if I remember correctly.Kyatric2013-01-08 01:08:36
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Tue Jan 08, 2013 1:52 am

Doesn't help me a lot ... I should've precised it ! I want to know how to navigate an array ... And be able to see it in realtime ... and be able to detect at different directions and also move at different directions and make some procedural dungeons like in Roguelike type games ...
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Tue Jan 08, 2013 12:22 pm

Bump ...
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Tue Jan 08, 2013 1:15 pm

Navigating the array would be done via array actions like Array.At(X, Y) or similar, it's all covered in the tutorials linked previously.

Don't really understand what you mean by 'see it in realtime'? For debugging or what? You could make text where you print array contents each tick.

each tick
     for each value array (x,y)
           append array.CurValue to text
           if array.CurY = array.width-1
               append newline to text

if you wish to do something roguelikish and generate maps using array.. I'll post a little example soon.

EDIT: Here you go http://dl.dropbox.com/u/19921470/roguelikish_map_generation_via_array.capx

Simple eaxmple, a playable roguelike would of course need much more sophisticated randomization. And thou shall not mock my artistic skills :)vee412013-01-08 13:30:13
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Tue Jan 08, 2013 2:07 pm

Well you mentioned your math level is low. Have you at least had some algebra?
If not, it is highly recommended, especially Cartesian graphs.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Tue Jan 08, 2013 2:56 pm

Hi Whiteclaws,
Arrays cam be hard to grapple. I managed to make a few. I was following some of the tutes and examples around here, but it still had been a pain in the brain to make them and or call on them at first. I have a capx with 3 arrays in it, and some other crap. It generates a random tiled background (changed with a right click), and there's a text array, and another one, cant remember much about that one. Maybe you can pick it apart and make some sense out of it....https://dl.dropbox.com/u/91685197/arrays.capx
B
20
S
2
Posts: 257
Reputation: 2,431

Post » Tue Jan 08, 2013 9:59 pm

@newt I know all those stuffs , But I just started them tho ( I'm at the algebra 1 variable equations ... )
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Next

Return to How do I....?

Who is online

Users browsing this forum: Khamsou, nedzad and 14 guests