parsing a single word from a larger database of words?

0 favourites
  • 12 posts
From the Asset Store
Basic Plugins for Firebase Authentication, Realtime-Database, Firestore, Cloud Storage
  • hi all :)

    many thanks in advance for any and all help you could throw my way!!! :)

    MY QUESTION IS THE FOLLOWING:

    what would be the best approach for having a string of text that i can draw upon randomly and have the player be scored by correct & incorrect clicks?

    my goal is to help young minds build reading skills based on memory & word recognition. Essentially they are given a word, and must recall the word later from a group of words presented, correct answers are rewarded & incorrect answers tabulated.

    i do plan to make it 'pretty' eventually as im a graphics animator first & foremost, but with construct i find its best to boil it down to the nitty gritty functionality first, then dress it later with polish, and as always, any and all help is GREATLY appreciated!

    A WORD IS PRESENTED TO OUR YOUNG PLAYER (REINFORCED W/ AUDIO):

    FOLLOWED BY A GROUP OF 5 RANDOMLY PICKED WORDS FROM OUR DATABASE OF 100 WORDS:

    PLAYER IS TASKED TO SELECT THE WORD PRESENTED AT THE BEGINNING:

    WRONG ANSWER IS TABULATED & DISPLAYED:

    CORRECT ANSWER IS TABULATED & DISPLAYED:

    the above storyboard is admittedly a bit cut and dry, but if i can wrap my brain around the best practices for the essential mechanics necessary to accomplish what im hoping to do, i can dress it up later with fancy graphics/animation/etc.. . i am open to arrays, but honestly, they are pretty confusing to me as far as how to know & match the word to my variables of which is correct/incorrect/used/etc.. . if there is an alternate easier method or suggestion as well, im open to whatever is the simplest way to achieve what im hoping to

    many thanks in advance to the amazing construct community :)

    kind regards,

  • You can use an instance variable "Correct" on each word object, and set it as true or false.

    1. Draw a random word to display, set variable "Correct" to true.

    2. Draw 4 more words to display, set variable "Correct" to false.

    3. On clicked word object, compare instance variable "Correct" is true or false, and increment the relevant counter.

    You probably want an array to represent your deck, but you might be able to do it with the advanced random plugin and a dictionary instead.

    Don't be afraid of learning arrays as a concept. An array is basically just a spreadsheet, where each cell is a variable. In other words, its a group of variables you can identify by coordinate position rather than names.

  • THANK YOU SO MUCH oosyrag for your time & very useful information INDEED

    Your initial suggestion sounds GREAT, and dont really see the reason to use the array as long as i define all words each in the Layout with the True/False instance variable set initially to FALSE correct? I'll give it a whirl & report back for sure :)

    if you have a simple snippet of example code i could alter

    and/or

    know of extreme newbie tutorials for someone at my level on arrays & advanced random, i'd greatly appreciate it!

    Thank you kindly for your time to help out some of us beginners :)

    as a side note, im an animator/motiongraphicartist trying to learn some of this event driven language on construct. most of the simple block logic i can follow, but its the things like arrays and advanced.random that throw me off a bit and have me scratching the ole noggin.

    my programming experience (if i can call it that) is only from when i was a kid back in the 80s learning basic on my beloved c64 & cobol at school. [a bit embarassing] lol.

    but ironicaly, i find some concepts familiar like FUNCTIONS seem to be the equivalent of SUBROUTINES you can call out, and Construct's event driven system is very if-x-then-y nature of BASIC environment

    but anyhow, background aside, if there are super simple tutorials or even a construct-for-dummies series, id greatly appreciate it, as i know i can learn it eventually, but it takes some of us a bit longer to soak in the concepts :)

  • Documentation starts with the beginner's guide and then with How to learn Construct 3? Next steps for beginners

    Pretty much any tutorial posted by our team as well as courses should be of help.

    The manual is also pretty useful.

    Laura is also often posting blog posts. She started from scratch last year to make an RPG game and has been posting tutorials and articles about he various progress in the matter.

    She was NOT a programmer, and by practising on a regular basis, she pretty much became one :)

    She posted a dedicated tutorial for Advanced Random and probability tables (with provided commented examples to download and open in Construct).

  • If you're entirely new, and want to grasp some concepts, check out my youtube channel.

    You'll find the necessary info on how to make certain well known-type of games.

    youtube.com/channel/UCZ6QjvqEs9dR2miRnfFqIpQ

    hope this helps!

  • Thank you kindly Kyatric for your detailed feedback & follow up information

    i started with construct2 a few years back, and loved it.

    life got a little complicated, and needed to reprioritize my time spent on hobbies, towards what i can make an income on for my family, my construct skills arent at a level i can charge at the moment, so for me its still more of a hobby.

    but fortunately! ive been able to free up some down time to get back into it as of late and starting to relearn what i can :)

    having gone through the beginners guide & manual has helped me get where im at at this point, and have alot of fun going through the tutorials, ghost shooter, platformer & your bomberman (in which i learned a ton btw), so ive fortunately become familiar with the basics, but some concepts like arrays still elude me.

    i find construct amazing for allowing someone who knows nothing of actual programming like myself to piece together this level of interactive media. it really is quite amazing.

    i've watched several youtubers explain the subject of arrays, and i think i have a rough idea on how the array is like a 3d table or box holding our data for us, but when it comes to calling out that data and comparing it, etc.. . to have it do what i need specificaly at the moment for a project, i cant seem to achieve what im after. i can see it can be done, just looking for the how to get from a to b

    i imagine theres a simple couple things i might be missing, will keep at it and hopefully come up with a successful solution

    will update along the way :)

    thank you bartalluyn

    i took a look at your youtube channel. nice stuff

    definitely looks like i could learn alot there :) thank you.

    At the moment, im specificaly looking to find a way of interacting with a pool of data, for the above project boards i posted

    thank you again though, your input is super appreciated, and will definitely check your channel out once i get done with the current project im on

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1)First create an csv or xml with a word list

    2)Read your file and import to an array (Array1)

    3)Shuffle your array

    4)Pick some of the words for a another question array (Array2)

    5)Reshuffle your array

    5)Create another array with removing true answer (Array3)

    6)Create an answers array(Array4). First value(true answer) from Array2. Others from array3

    7)Shuffle array4

    construct.net/en/free-online-games/example1-16793/play

  • Kyatric THANK YOU AGAIN

    I took a look at your AdvancedRandom recomendation on Laura's blog post and it was immensely sooo helpful, along with oosyrag suggestion to use instance variable for True/False for comparison of Texts. Thanks for pointing me in the right direction guys, I was stuck and your suggestions were ON POINT!

    okidoke.. . as promised, here's a link to the example i was able to come up with:

    caito.coffeecup.com/temp_examples/MyRandomWordTest_v03/index.html

    and for whatever its worth, the capx file if for whatever reason, it could be of use to anyone:

    caito.coffeecup.com/temp_capx/MyRandomTest_v03.c3p

  • The above journey with Advanced.Random sparked a few more questions i could use a little advice on:

    1- LANGUAGE

    Is there a way i can make THE INITIAL WORD in another LANGUAGE and the clickable words in English, and have the player click the correct answer EVEN if the text will not match b/c of language difference?

    for example.. . GATO would be the initial word then CAT would be the correct clicked answer

    i have the incorrect already working, but if the text is not the same, what would be a good suggestion to have them match?

    2- NONREPEATING parsed data

    Is there a way i can make sure it does not repeat the same word once guessed correctly?

    3- BACKGROUND COLOUR

    I noticed despite changing the background colour in the project panel to a grey, the 'game' still comes out over white for some reason, what could i be missing and how do i make the background grey?

    4- FUNCTIONS

    Just curious as to why FUNCTIONs were moved from being a behavior to being intergrated into the event sheet

    5- OBJECTS PANEL

    Another just curious question- was the Object Panel eliminated from construct 2 to 3? and if so, how come?

    anyways... .thanks again construct community, you guys are awesome~!

  • WOW mrcgkh

    THIS IS PRECISELY what i was looking for!!!

    THANK YOU SOOO MUCH

    i was able to figure out something simliar with Kyatric recomend of using Advanced.Random

    but i could NOT figure out how to do arrays whatsoever

    THANK YOU for posting this

    even though i was able to get it to work with Kyatric's suggestion, im going to dive into your example and try to understand what you did so i can wrap my brain around how arrays work too! :D

    now i have two methods of achieving the same thing! how cool is that?!?!?! lol

    thank you so much everyone again for taking the time to help a fellow construct brother out :)

    its very much appreciated!!!

  • Hi mrcgkh again :)

    I took a look at your c3 capx, and learned ALOT in the process. THANK YOU

    I was able to follow most of it, but there were other bits i admittedly have no clue what they do. LOL

    but THANK YOU again for taking your time to do that, VERY generous of you

    Using yours as a guide, I tried to rebuild it in construct2 to see if i could learn by rebuilding and follow it properly but ran into a problem, in the one i generated, everything seems to work fine, except the Answers dont shuffle for some reason.

    If you or anyone here who understands arrays well, could take a quick peek to see what i might have missed, i would be immensely grateful. Any and all help is greatly appreciated, thanks again and many kind regards,

    example & capx below:

    EXAMPLE PROBLEM:

    caito.coffeecup.com/temp_examples/RandomWordArrayC2/index.html

    EXAMPLE CAPX:

    caito.coffeecup.com/temp_capx/RandomWordArrayC2.capx

  • cjuliao The problem is about TextAnswers. All of them have a "no" variable. You should give variable values like 0-1-2-3-4

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