About 'Organise State Files'!

In this video (objectives)…

  1. Complete our game flow by adding all story states, and start and end states.

After watching (learning outcomes)…

Add all our states to our game.

(Unique Video Reference: 12_TX_CUD)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

Error!
Hello Rick I found a script error that people might run into when they are doing this lesson. I’ll try to explain as best I can. Here you will see my screen.


I have buttons to push to transfer states: Leftarrow, Rightarrow, and Enter. In the intro I wanted the player to press Enter to begin or Enter when they lose to get back to the intro. Because it is index number “2” and I only wanted that index to do anything in the intro screen and quit screens I left the 1st 2 blank. If however the player presses Leftarrow or Rightarrow the game breaks. The console screen continuously prints out this error message.

Which I can only assume the program got stuck in a loop somewhere. A quick fix was to just have index 0 and 1 take the player back to the same screen but I don’t know if that could potentially cause problems at some point somehow. Just wanted to let you know to see what you think.

I think that is an excellent fix for this situation. There are more complex ways that we can handle this, but I really like the simplicity of your solution.

1 Like

Hi @Rick_Davidson

I’m working through this section of the course and I’m hoping to turn the engine into a fuller game with images and music which is different on each screen (i.e. for each level, or state). The intention would be still to tell the story through text, but to have music and sprites to accompany the text.

I was just wondering if that’s possible using the engine built here? Or would that require working with scenes?

Any advice on whether this is possible, and a nudge in the right direction to a useful resource if so, would be greatly appreciated! If it’s not, is this something that will be covered elsewhere in the course?

Thanks very much for your time!
Best
Duncan

P.S. Many thanks to you and Ben for all your effort in running and updating the course - I’m finding the content much easier to follow and your examples are really helpful in elucidating complex concepts as you explain them! Thanks again!

Hey Duncan,

Very cool that you’re looking to expand on this game. In some ways I’d suggest you push on with the course and then loop back here each time you pick up a new skill / technique / understanding. Things like triggering audio, loading new scenes, putting in delays between action and result (eg. coroutines) will become clearer from later sections.

Of course, feel free to experiment with things now if you want to keep working on this project!

Hi Rick

Thanks very much for getting back to me so quickly!

Ok that sounds sensible to me - I’ll keep moving forward with the course and build elements in retroactively as I go - thanks very much for the tip!

Best
Duncan

2 Likes

I try that too. the same way he show how to put the text in the canvas. I make the same thing with a image. Its work fine. The layout is not beatiful but its works.

1 Like

Privacy & Terms