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

  • Whiteclaws

    Lucky you, I don't :D

  • No problem , just waste 1\2 of your time watching youtube videos and you'll be fine !

  • Yann you are the mann! <img src="smileys/smiley2.gif" border="0" align="middle" /> Thanks for your invaluable contributions!

  • Yann - Yep! It was one of the most confusing parts for me to learn. Webstorage itself is easy enough, but when it came to filling the arrays correctly, saving them and loading them, it gets pretty tricky when you're dealing with lots of information.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Tobye

    Alright

    Do you have an example of data you want to store?

    Like, do you have strength/dexterity/speed/hp/mp and position on the map, or, I dunno, or do you have more than that?

    Gimme some more spec so I can narrow down the problem (:

    Tell me what you think about the last vid on array if you have the courage to watch it :D (2h30)

    Maybe you can find the beginning of an answer inside.

  • 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: dropbox.com/s/k275o9sxm2aespl/Untitledv.png (sorry I don't know how to put a picture in my post).

  • 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

    inLevel(someIndex,0) = "X"
    inLevel(someIndex,1) = valueForX
    inLevel(someIndex,0) = "Y"
    inLevel(someIndex,1) = valueForY
    ...

    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:

    dictionary: add key "X" with value valueForX
    dictionary: add key "Y" with value valueForY
  • 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.

  • Tobye

    yeah you can export the dictionary data as JSON as well (:

  • 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 :)

  • A new vid on how to build a custom timer mecanism

    Custom Timers:

    Subscribe to Construct videos now

    - twitch

  • This video is currently being processed.

    <img src="smileys/smiley20.gif" border="0" align="middle" />

  • 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. ;-)

  • 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 vids

  • 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 ;)

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