Yann's C2 live channel [update: Matching Game]

For educators around the world who use Construct 2 in classrooms

Post » Thu Jan 24, 2013 12:15 am

@Yann - Haha, yeah I am halfway through and gotta say thanks! Covers stuff I had no idea about (like printing out values of arrays - so helpful!).

How I have it set up is a different array for each level that records every enemy position, their direction, chasing player or not, health. That same array also records the self-switch for each item (so, if self is 0 the item has not been collected, if 1 it has basically).

Inventory array that holds all items. This one is simple for me as there is a low max number of items and no duplicates, so I just add to index of 0 if it exists, if not show an 'inventory full' message. However, I think most people doing RPGs will want massive arrays with many duplicates and want to know how to display that, so my method isn't helpful.

Then I have the player's array, which holds health, location, direction, sanity (my main character does not have many stats, but again most other people will want all that luck, agility, etc.).

Then there is also the transition array, which basically holds all the information about where you came from in the case that, say, you go to a cutscene on another layout then return and want everything to be the way it was. So, the previous layout name, the value of any timers that happen to be active, etc., etc.,.

So yeah, although now I have it nicely streamlined and it all loads and saves automatically, it's pretty messy stuff.

Here's an image of the sort of way I'm going about it: https://www.dropbox.com/s/k275o9sxm2aespl/Untitledv.png (sorry I don't know how to put a picture in my post).
B
27
S
8
G
5
Posts: 429
Reputation: 6,902

Post » Thu Jan 24, 2013 1:40 am

Hum I was wondering guys. Maybe a 2 hours non stop video is really too much to follow through and splitting the video into chunks of 15 minutes like the first one might help people to follow small sessions at a time. What do you think?

The splitting of the first video was a n00b move on my part. When I uploaded it from twitch I got a warning that the upload might fail if my account didn't accept big videos, that's why I choosed to split them up. But it turned out, my account was ok with big videos.

On another topic @Tobye it's funny, what you are doing int the ilsplayer looks to me that you are kindof mimicking the behavior of a dictionary object (aka hashtable).
In short you are inserting (Key,value) pairs like that[code]inLevel(someIndex,0) = "X"
inLevel(someIndex,1) = valueForX
inLevel(someIndex,0) = "Y"
inLevel(someIndex,1) = valueForY
...[/code]
And since you use .indexOf, I guess you are assuming the 'X' and 'Y' keys will be unique in the array.
So it would be the same as doing:
[code]dictionary: add key "X" with value valueForX
dictionary: add key "Y" with value valueForY[/code]Yann2013-01-24 01:41:53
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Jan 24, 2013 2:02 am

@Yann - Yes, I think 15 minutes at a time is better, it forces me to stop and think about what you've just shown ;)

And about the dictionary, that is what I started with, but I had no idea you could save dictionaries...? The reason I did them as arrays was so I could save the array .asJSON.
B
27
S
8
G
5
Posts: 429
Reputation: 6,902

Post » Thu Jan 24, 2013 2:04 am

@Tobye
yeah you can export the dictionary data as JSON as well (:
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Jan 24, 2013 2:07 am

@Yann - Yeah I just searched it and boy do I feel dumb :( That took me a long time to sort out! xD   Well, it's already done now. Thanks for the guidance :)
B
27
S
8
G
5
Posts: 429
Reputation: 6,902

Post » Sat Jan 26, 2013 4:35 am

A new vid on how to build a custom timer mecanism


Custom Timers: youtube - twitch
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sat Jan 26, 2013 4:48 am

This video is currently being processed.

B
96
S
25
G
20
Posts: 3,054
Reputation: 22,642

Post » Sat Jan 26, 2013 5:49 am

On video length, I did find one point for shorter videos. Skimming through parts we already understand might be less touchy with less time in the scrollbar. ;-)
B
201
S
52
G
30
Posts: 897
Reputation: 36,621

Post » Sat Jan 26, 2013 6:00 am

@Joannesalfa
Yeah that's why I post the twitch link as well (:
I just automatically upload the vid from twitch to youtube so there's always some processing times (seing how long my vids are)

@Paradox
Thanks! Good point! And now that I think about it, I can't really split them on twitch, so you could have unsplitted vids on twitch and splitted on youtube for all tastes (:

I think I'll do that for the next vidsYann2013-01-26 06:00:39
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sun Jan 27, 2013 9:23 am

@Yann - good stuff! I actually sat down today with the intention of making my timer system, so your timing is great. But better than learning how to do timers (I already have a few ways), I learnt a lot more about functions and expressions!

And by the way it's pronounced Toe-Bee, just like the regular name Toby ;)
B
27
S
8
G
5
Posts: 429
Reputation: 6,902

PreviousNext

Return to Education and Construct 2

Who is online

Users browsing this forum: No registered users and 2 guests