althea_texas's Forum Posts

  • Hi,

    As students in my mobile gaming course begin working on their final projects, I'm hoping to deepen my knowledge of how JSON files can be used to create a rudimentary dialogue system.

    So far, I've come across the following resources:

    • Dialogue Designer III - An inexpensive utility from itch.io that can be used to write dialogues. This tool exports to JSON format, but the documentation does not include examples of how to parse the JSON files.
    • JSON Manager Plugin - Now deprecated because the functionality has been folded into C3, this plugin came with a sample file that includes helpful comments and explanations, but I'm not sure which parts of the event sheet are still applicable. Tried disabling the add-on manager to see if any of the code still worked, but it wouldn't load the file without the add-on.
    • An old version of "Dialogue System Template" that I purchased for Construct 2 a couple years ago when a student wanted to create a visual novel. I just realized that it has been updated for C3.
    • JSON documentation in the C3 manual.

    I'm trying to make sense out of these resources, but I am still missing some of the big picture. Resources like 'Dialogue System Template' and 'Dialogue Designer III' are somewhat helpful, but they assume that one is using these particular tools. I would *love* to find some sort of higher-level explanation of the concept. Can anyone point me to other resources or explanations or sample C3 files which helped you make sense out of JSON and dialogue options?

    As a related question, I'm also trying to figure out how the JSON structure intersects with arrays and dictionaries. Is the idea that we first parse a JSON file and, after it has been loaded and parsed, we use this information to populate arrays and/or dictionaries?

    I'm sure I can figure all of this out. Just missing a few pieces/insights about how everything fits together.

  • Hi,

    I'm teaching a small course on game design with a group of approximately 15 college undergraduates.

    Before they start creating their own platform games, I'm walking students through some of the basics by covering steps that were part of Ashley's original platform game tutorial back in 2012.

    Quite a bit has changed during the past seven years, so I'm curious to know if I should be tweaking a few things.

    Question #1. Should my students use 'system: every tick' or should they use the pin behavior to keep the collision box attached to the player sprite?

    Context: The original tutorial recommends creating a transparent playerBox to handle collisions. This is attached to the actual player sprite with a "system: every tick" event.

    I *think* it is just "six of one or half-dozen the other," but would be interested in knowing what others think.

    Question #2. Is there a better way of handling enemy movement?

    Context: The original tutorial recommends moving the enemies move by attaching the platform behavior to those enemies and disabling the platform controls. A boolean instance variable keeps track of enemy direction, and that variable is flipped whenever the enemy collides with an invisible edge barrier.

    This has *usually* worked, but -- every year for the past three years -- at least one of the fifteen students encounters an issue where the enemies don't collide properly with the edge barrier and end up falling to the bottom of the screen. We have looked over their code with a fine-toothed comb, scrutinized the debugger, and swapped in different sprites, but none of those solutions seemed to work.

    I'm wondering if the new timeline behaviors are now a preferred way of handling enemy movement. If you were creating a platform game with C3 in 2019, how would *you* handle enemy movement?

    Thanks for any suggestions!

  • Thank you! This works! :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Every Fall, I teach a game design course using Construct 3. Since I don't teach that course in the Spring, it's always a pleasant surprise to return to the world of Construct after a seven month absence. There are so many awesome new features (e.g. timelines, the moveTo behavior, and the integration of JavaScript)and I cannot wait to check them out.

    I'm trying to find a decent tutorial or forum post which explains how to use the Array Editor in Construct 3. Unfortunately, most of the resources I have found so far are using old versions of Construct before the array editor was introduced.

    I had some luck with the array editor last year, but it's not behaving quite as I remember it. I am able to create a new array, but have not been able to edit the array contents.

    In previous years, I remember right-clicking on the array and selecting an option that spawned an array editor. It looked a bit like a spreadsheet, and this was a convenient interface that students already understood from Microsoft Excel. It looked like this:

    s1.construct.net/images/v717/uploads/articleuploadobject/0/images/1064/array-editor.png

    In the new version, I cannot figure out how to bring up the array so I can populate it. I've definitely added the Array object to the project, and I've added a new array in the project window. However, the editor is not an option. There is also a new option which allows me to manipulate array instance variables. That option sounds cool, but I don't think it's what I need.

    What am I missing? How do I fire up the array editor so I can populate contents via that interface?

  • Looping though the array with loopindex is exactly what I was trying to do. Awesome!

    Just to clarify, you said that placing loops in functions is a bad idea because the loop will only be called once. I didn't realize this. Are there any other limitations on functions that I should be aware of?

  • Thanks!!

  • During the past several days, I have pursued multiple strategies for implementing a collection scheme. My current attempt involves the use of two arrays. An inventory array keeps track of item names, item costs, and item weights. I use separate animation frames inside a sprite named 'objTreasure' for different types of treasure. Upon collision with an item, C3 destroys the item and records the frame number in a collection array.

    When I get to the final level, I'm trying to loop through the array and spawn the collected objects on the final page. Debugger shows me that the array is being populated, but I cannot -- for the life of me -- get anything to spawn on the final level. I added a loop counter as a global variable and confirmed that the loop is actually running.

    I would be grateful for any suggestions! The link is:

    transmedia.trinity.edu/~adelwich/temp/array-inventory-animation-frames.c3p

    Thanks!

  • Thanks, blackHornet. Back to the (virtual) drawing board! :)

  • I have been experimenting with various possibilities for keeping track of objects that a user collects throughout the game. In response to my original question, Plinky suggested two approaches: global variables for relatively simple scenarios and arrays for more complicated collection scenarios.

    I understand how to solve this with global variables, but I'm struggling with implementation using arrays. As you can see from the attached file, I am using two arrays. arrayInventory is a sort of 'map' of the inventory slots on the final page. It includes a slot number and the x/y coordinates where sprites should be placed when displayed in the inventory. Meanwhile, arrayCollection is an empty array that I am using to store the UID of collected sprites.

    Everything goes swimmingly until I reach the final stage of my game. Using the debugger, I can see that my collection array has been populated with the correct UID, but I cannot figure out how to spawn an object based on this UID information. Is there anything I can do with the UID at this stage?

    I realize that it might be illogical to spawn an object with UID since it references a *unique* identifying number for the sprite. But it seems that I should be able to reposition the sprite with the UID if it hasn't actually been destroyed.

    (As a side note, I can imagine another approach that keeps track of things by using sprites that have multiple frames and named animations, but I want to figure out the UID thing first.)

    I hope I'm posting this before everyone goes to bed across the pond. :) The file is posted at:

    transmedia.trinity.edu/~adelwich/temp/array-inventory-by-uid.c3p

    Thanks!

  • Thank you so much, Plinkie! For game projects with a relatively small scope, I will encourage students to keep track of things with global variables. For larger projects, I will encourage them to use arrays.

  • Two students in my "mobile gaming" course are pursuing final projects that involve some sort of collection mechanic. One student is reskinning the classic breakout game and another student is creating a language learning game that teaches users basic Swedish.

    In both games, players are collecting objects along the way. On the final layout, we would like to be able to display all of the collected objects on the screen.

    For now, we're not worried about positioning on the page. We would simply like to be able to quickly check to see if an item was collected or not. If the object has been collected, it should be displayed on the final page.

    At first, I thought we might be able to do this with families. All of the collectable objects could be added to a family, and a family instance variable (isCollected) could be used to keep track of whether or not the variable was picked up. Then, on the final page, we could just loop through all items in the family and check to see which items should be displayed.

    Unfortunately, as you can see from the linked file, this solution doesn't seem to work.

    transmedia.trinity.edu/~adelwich/temp/sample-collection-approach.c3p

    Debugging the file reveals that collecting the item successfully sets the isCollected instance variable, but then the object disappears on the next level. I have applied the 'persist' behavior to the entire family, but that doesn't seem to do the trick.

    I also tried making all of those objects global, but then the objects appeared on every single layer, even when they weren't supposed to be accessible.

    I would be grateful for any advice. In other programming languages, I would try to tackle something like this by putting references to the objects inside an array. Is that the preferred approach for C3?

    Thanks!

  • Hi -- I'm getting ready to fly across the country and would love to read through the C3 documentation from start to finish. I realize that documentation is dynamic and constantly being updated, but was wondering if it's possible to get the entire manual in a single PDF or web page.

  • I use Construct 3 in a college classroom with older students (17 to 22) and have found that the cloud storage system makes it relatively easy to keep an eye on student progress. This is how I do it:

    a) I subscribe to a paid Dropbox account that offers 1TB storage.

    b) Dropbox is installed locally on all of the lab computers, with all computers pointing to the same Dropbox account. I have created project folders for each student inside that Dropbox account. (Note: These folders are not stored inside the Apps folder that C3 uses for cloud storage. These folders are used for all of the students' other digital production work.)

    c) Within the Dropbox Apps folder that C3 uses for cloud storage, I have created a second set of student project folders. I ask students to make sure that *all* of their C3 projects are saved and clearly labeled in these folders. If they encounter problems along the way, I can easily access their folders and files through Dropbox from anywhere in the world.

    If it is a hassle to install a local version of Dropbox on all of the lab computers at your school, you could just skip step b.

    As for registering students in the class, this is part of the educational package that C3 offers. At the beginning of the semester, I assigned a license (or seat) to each student. It's easy to do, and -- in my opinion -- reasonably priced. If it was much more expensive, I'm not sure I could convince my school to cover the costs, but C3 is currently an excellent value proposition in the classroom.

    Aaron

  • My students are currently working on a platform game project using Construct 3. Several students have encountered an odd problem related to enemy movement.

    When they were first learning how to use Construct 3, I walked them through a simple platform game exercise based on Ashley's platform game tutorial from 2012. This approach uses invisible collision boxes and a boolean instance variable to make sure that enemies turn around when they reach the edge of the platform.

    This solution works on most of the student projects, but not for all of them. The weird thing is that this works for a while, and then the enemies suddenly start traveling past the collision boxes that are supposed to make them turn around.

    Something similar happened to a student two years ago, and we never figured out what was causing the problem.

    We have been trying to hack around this problem by identifying the troublesome enemy sprites via UID and adding an additional layer of code, but this is obviously not an idea solution.

    Does anyone have ideas about what might be causing this?

    I realize that it's easier to debug with a CAPX file attached. I hesitate to upload my students' work without their permission.

    Aaron

  • Thank you, Ashley!

    BadMario,if you haven't had a chance to investigate Construct 3 yet, I highly recommend that you check it out