Godot game Dev – validating the event system (and plans for the immediate future)

So I stopped planning my coding sprints, to take some pressure off myself. I´m in a really bad rut at work, and depression is still a considerable factor, but I work around it when possible.

That said, I would consider this weekend productive. The inofficial goal was to create a small scenario to validate the event system (which controls all interactions and repercussions in the game – if I do or say this, how will that affect the rest of the game?). Event systems aren´t easy to code, and I of course always manage to aim too high 😛

There have been numerous small fixes, that don´t really need to be mentioned. let´s talk about new functionality instead:

  1. I finally managed to get scene transitions working the way I wanted. Swapping scenes from the map UI was a bit problematic, like when to grab the screenshot needed for transition. If I grabbed it before the map UI loaded, it caused jerky animation, so in the end when clicking on a map location, the map UI closes down, only then a screenshot is grabbed and scene transition begins. Works just swell 🙂
  2. I scaled up the cursors from 16×16 to 24×24 which is easier to see, and can fit more visual information without being too much in the way. Added a gear icon for when hovering over UI icons, and an arrow icon, which is used in game settings and UI overlays.
  3. Created a contacts node for the phone ui, which is not yet connected to contact data. Every contact node has an avatar, id, info, number and a call icon. When calling someone the phone UI is miminized and a dialogue is initiated with the phone as avatar
  4. Thought bubble now has a tween effect, and timer, and will show for a couple of seconds, instead of disappearing when no longer hovering the NPC/object.
  5. A basic day/night transition effect has been code. Works ok, but could be finetuned. Think it goes especially well with the new scene transition effect, however, I think I will tween the transition values, for an even more seemless effect. Todo is to add static light to interior scenes, and deactivate sun, except for when sunlight enters, say, a window.
  6. Like mentioned before, started working on a small scenario to validate the event system. I´ve been holding this off for too long, and of course it highlighted problems with the event system, mostly because I´ve changed/added to some parts of the system without refelecting that in other parts of the code.
  7. Fixed inconsistencies in the UI

Testing scenario

  1. DONE You talk to Ellie, and offer to buy her some weed, which she accepts.
  2. DONE You then have to call your friend Devaun on the phone.
  3. DONE The call sets up an event to meet with Devaun in the evening the same day
  4. You meet Devaun in the school hall in the evening, get the weed
  5. Meet with Ellie the day after to giver her the weed. She asks if you can get some more for her party the same weekend, and you agree if yo´re invited to the party. She reluctantly agrees.
  6. This unlocks the location “Ellie´s house” in the map UI.
  7. Friday night you go to Ellie´s house and giver her the weed.
  8. Mission accomplished.

So let´s consider what´s required for this to work:

After talking to Ellie we need to set the dialogue for Devaun, when we call him (if not, he won´t answer the phone). Ellie´s dialogue branch needs to be updated too, since it needs to reflect that we´ve already talked to her. Then, once you hang up on Devaun, game is instructed to change to a new json for Ellie´s dialogue, so that you can tell her that the meeting is setup (done via the “progress” key in the dialogue json).

Next, we need to tell the game that Devaun should be in the school hall in the evening of the same day, and we also update his dialogue tree (this is done through a one-off event). You make the meeting, and weed is added to your inventory.

Next day, you meet Ellie in the schoolyard in the morning, and giver here the weed, remove weed from inventory. Ellie asks if you can score some more for her party this friday, and a new event is triggered that unlocks Ellie´s house on the map, and sets up the people who are going to be at the party friday.

I´m authoring a couple of documents to explain in detail how the dialogue/event-system works, and I will convert them into blogposts eventually, once I feel everything is in place.

Now, further business. This goal of this game framework (I´ve been told I can´t use the term engine :P) was always to allow for the possibility of 2d/3d adventure games and Visual Novel, so that I can use the same framework for all my game ideas (and for that matter others to)

So, let´s look at what needs to be considered for:

2D adventure games

  • Check if player character is 2d or 3d
  • If player char is 2d, coordinates need to be Vector2, rather than Vector3
  • There should be POV value for each scene, deciding how much player character is scaled down when when walking up screen, to simulate perspective.
  • If objects are 2d, coordinates need to be Vector2, rather than Vector3
    Area2d and CollisonShape2D needs to be used for background to denote
    collision
  • The rest should be handled directly by char and location scenes (Like Area2d and CollisonShape2D used for background to denote collision).

Visual Novels

  • No player character should be drawn
  • If objects are 2d, coordinates need to be Vector2, rather than Vector3
    Area2d and CollisonShape2D needs to be used for background to denote
    collision
  • The rest should be handled directly by char and location scenes (Like Area2d and CollisonShape2D used for background to denote collision).

So, obviously there is some overlap in requirements here, which will make things easier. This is still not priority, but I want to start thinking about this now, because the hope is to have everything working by mid july, before going on a 3 week vacation. By then the dialogue editor really needs to be finished as well.

I still don´t push this page outside GitHub, so why am I writing these blogposts? For one thing, because I find it cathartic, and it´s good to validate my progress. Furthermore I think it´s a good idea to have a backlog where people can see consistency.

Have a good one,

/Ape

Please follow and like us:

Written by Ape

I always wanted to do something creative, but just never got around to doing more than drawing and write down ideas. This site is my way of finally doing something with those ideas.

Leave Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.