Game
Project Smile
8 years ago

Devlog #4 - Interacting with objects and saving the game.


Hi, my name is Anton Johansson and I have been working on the interaction system and is currently working on the save system.

The interaction system is divided into several parts.
The first is the inventory system which handles the objects the player can pick up and store. Currently this includes keys for doors, batteries for flashlights, pages the player can pick up. The keys and batteries are stored as integers. The pages are stored as an array of strings and an array of bools to show which pages has been picked up. It contains functions for using or adding these items.

5d0a9516a7359.png

The inventory system also has its own widget to display information to the player. This includes both the current number of keys and batteries and displaying text feedback. The images of battery, key and mouse hover are currently placeholder

5d0a9519b86d0.png

The player also checks for interaction with a raycast. This in used for two purposes. Firstly to determinate the mouse hover icon(seen in previous screenshot) and secondly to check when the player interacts with objects.

5d0a951d009ed.png

The interactable objects share an object type and an interface. There are two functions all interactable objects share. One to get the hover symbol and one to activate it. The second sends the activator as an argument allowing the object to make callbacks. The primary callbacks are interacting with the inventory as it is an actor component and checking for collisions with specific boxes.

The door is the first and most advanced of the interactable objects. It supports being opened from multiple angles and checks keys with inventory.
During my work I had to implement extra collision boxes to check which side the player was on. I also had to do multiple checks to ensure the player could not push the door from one side to the other when standing in the middle.
During my work with the interaction system, Iโ€™ve been using it to test the different systems. Once a system was working on the door, making it work with different objects was easy.

Save system

The save system is my personal goal for this project. Learning the best way to save the state of the game is something I am currently working on. It will be divided into several parts.

Beginning with a list of the types of variables which will be saved and loaded.
AI variables which I will cooperate with Dennis to implement correctly.
Inventory variables which will be rather simple.
Player health when saving.
Variables and status of interactable objects, doors will be set to either locked or unlocked, open or closed. Pickups such as keys and batteries will have to be saved with locations and if they have been picked up.

Continuing with an autosave feature, this game will not have a system allowing the player to save and load from a menu. Instead it will save at certain checkpoints and automatically load if the player is killed.

Other members.

Jonathans work on the player controller brought me and Jonathan together as I had to modify it to work with the inventory system.

See you next week when Iโ€™ve implemented more of the system.



0 comments

Loading...

Next up

Short intro of us ๐Ÿ’•โœŒ๏ธ

We're an eletro duo based in Seoul ๐Ÿ‡ฐ๐Ÿ‡ท Heavily influenced by the 90s.

Our new album #Xennials is all about the nostalgia of that era ๐Ÿ’ฝ CD listenin ๐Ÿ“Ÿ beeper beepin ๐Ÿ’พ floppy disks floppin days ๐Ÿ˜Ž

Stream now! ๐ŸŽง

https://open.spotify.com/album/3YwWhnHWVy5cA8XOpbaGRA?si=8E9awqUโ€ฆ

Bandana Dee the Dream Friend

Runestones: from concept to in-game model๐Ÿ—ฟ

I have added rewards for quests so that villagers can give you something in return for your hard work helping them. ๐Ÿฅณ

I want to know - what's your favourite quest reward?

Quantum precognition is one of the most powerful cards. End game cards & equipment. Demo/alpha build boss is no match for this deck.

In the quest for accessibility, I'm adding Resurrection Shrines for players on the 'novice' end of the platforming spectrum.

In order to unlock the power of a Shrine, you must collect 3 'Souls' from your dead corpses! (the floating blue orbs)

Shuiro Haname. #Commission

Commission for @ShuHaname

We're glad to announce that Baby Dino Adventures ๐Ÿฆ– is now available in Early Access here on GameJolt! Link: https://gamejolt.com/games/babydinoadventures/508121 Walk, run, and jump as a baby t-rex in this cute platformer Free demo available #IndieGame | #GameDev | #PixelArt

I did this on my 3DS ^^ #Kirby

A few screenshots of the places you'll cross in the Demo of Blu. You can play it today on #gamejolt !