Giter Site home page Giter Site logo

phazorknight / cogito Goto Github PK

View Code? Open in Web Editor NEW
637.0 637.0 69.0 1.53 GB

Immersive Sim Template Project for GODOT 4

License: MIT License

GDScript 98.52% C# 1.48%
game-development gamedev gdscript godot godot-engine godot4 godotengine template-project

cogito's People

Contributors

ac-arcana avatar aredshift avatar aronand avatar brian-holsters avatar brodyb avatar failspy avatar grgp avatar kk1201 avatar ksjfhor avatar pcbeard avatar peterd23 avatar phazorknight avatar samaritan-sw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cogito's Issues

A few unexpected things

Hello!

I've noticed a few more unusual things. If you've seen them all, feel free to close this :)

  • If you hover over a item in the world, TAB to open inventory, you can still use "F" to pick up the item. This might be intentional, but it feels like quick-slot and pickup keys should both be disabled.
    image

  • I hit ESC so much ๐Ÿคฃ

    • Could ESC close inventory view, please?
    • When entering Reading mode, could the "press F to read" vanish, and "press F to stop reading" be added to the Reading box? Could ESC close out of reading too, please? Should I be able to open inventory while reading? If you walk away from the paper, you can't close the read panel ๐Ÿ˜Ÿ
      image
  • On opening inventory, the second item slow is highlighted as if it is highlighted over. When I open the chest, it flickers to the second inventory slot before picking up or putting an item down. At a guess, a mouse-down event held down will highlight the second, while when the click comes up or completes the action works correctly.

Love your work :)

Inventory item cell size

Support inventory items that take up more than one inventory cell or slot, such as a 2x2 item.

Hold interaction range cancel

When doing the 'hold X seconds to activate' interaction (like in the demo drawbridge) you can still move clearly out of range.
Had fun flinging myself in the air using the drawbridge. โœˆ๏ธ

Can't walk across the bridge

On main (1891d69), I noticed that if you lower the ramp by pressing and holding, you can no longer cross the bridge (without jumping); the lip seems to cause a hitch. Possibly caused by the stair climbing code? Here's a screen shot:

Screenshot 2024-01-04 093723

Scene Management and scene persistence

I've begun work in implementing proper scene management and scene persistence into COGITO, so I wanted to give a quick udpate.

Scene management is done, and I'll add it to the experimental branch soon.
Scene persistence is tricky and needs lots of work, I try to set this up that it works with a save system but it's a complex issue.

  • Pickup item's position and rotation gets stored and persists, as well as their existence in their scene.
  • Carriable objects position and rotation gets stored and persists.
  • How the saving and loading of these is handled is currently very early, will have to learn quite a bit more on how to get this done properly.
  • Currently neither player attributes or player inventory gets saved, but is high on the list.

Inventory weight

Assign weights to inventory items and slow/stop the player when exceeding weight capacity with carried items.

Improved Input Detection

I've started redoing/improving the input detection, based on Nathan Hoad's godot input helper: https://github.com/nathanhoad/godot_input_helper

This should make it less tedious in setting up icons for inputs and actions, while at the same time future-proofing this for button remapping etc.

Currently in progress in getting this integrated.

Wieldable raycast weapon

Would you consider a wieldable raycast weapon for the project?
Could this also include recoil?

Item (battery) Stack set to 5, can increase by 1 in the inventory

Hi, in the current main version:
When I pick up 7 batterys I get 5 in the first slot and 2 in the second slot. So far so correct.
But when I open the inventory, pick up the 2 from the second slot and right click on the first slot:
grafik
This 'only' gets the stack size +1, an +2 could I not provoke.

Compatibility with Trenchbroom/Qodot?

When I step on ground made in Trenchbroom and brought into Godot with the Qodot plugin I get this error:

Invalid get index 'material' (on base: 'ArrayMesh').
image
image

Equipped Stuff let it crash on transition, non-equipped works

Hey,

in the current Version BETA 202402.04 I found something.

When you have something equipped, like the flashlight or the foam gun, and then move into the transition zone, it crashes with "Invalid call. Nonexistent function 'unequip' in base 'Nil'".
When you have nothing equpped it works and you get teleported to the other scene.

It stops on the PlayerInteractionComponent.gd line 161: equipped_wieldable_node.unequip()

I am not sure on how to fix this...

Hold interact to carry

Instead of a separate input to carry an item, it could be set to a hold input for the normal interact button. This saves some buttons on controller for other uses.

Inventory Item Combinable: Cross-reference throws recursion error

Iโ€™m getting a recursion error when trying to set up combinable items and setting a reference to each other.
It currently only lets me do this one way:

Repro steps:
Within Item A, I assign item B to be the combinable item. This also works in-game.
Within Item B, I attempt to assign Item A to be the combinable item within item B โ†’ Godot throws the Recursion error.

Physics stops when you tab open the inventory

When you're on something like the platform and you hit tab to open the menu you stop moving with the platform and drop. I'm assuming the expected behaviour is that you continue to move with the platform while the inventory screen is open.

Items can be duped using drop function on gamepad.

If you use a gamepad on the inventory screen with an equipped wieldable, when you press drop, it will play the denial noise then create a duped version of said wieldable to be moved. You can place it in an open slot and make a new one.
Also, if you close the inventory window while moving an item, the item appears to disappear until you click another slot.

Doors ignore local scene tranforms

Been really struggling with doors, if the door's local rotation is set differently than the packed scene rotation, it will reset to the packed scene rotation on scene load. This happens whether it is Tween or Animation based.

Lean

How about lean controls with default Q and E, as in many FPS shooters?

Reworked interaction system to be component based

Hey everyone,
Wanted to give an update here that I'm currently reworking the interaction system to be component based.
This should improve the overall flexibility of COGITO quite a bit while hopefully still keeping it intuitive to use.

Just as a quick rundown:
Instead of an object having a single script that has to contain all info on its behaviour, with the new system you can
attach components to your object that will define its behaviour and interactions.

For example, currently there's a cogito_pickup script and a cogito_carryable script to create those type of objects.
With the new system you can create an object, then attach a carryable component and a pickup component, and it will support both behaviours.

As this is a bigger undertaking, it might take some time. This also means that the currently supplied Prefab Scenes will all be updated for the new system. If you've been using the previous one, you might have to update your own Scenes, which hopefully shouldn't be too complicated.

Bi-directional door animations

I've been working with these house assets and realized that the default animations it uses which open a door when a player character is nearby are a bit awkward to use when the doors open toward the character. Toward that end, I've prototyped a solution that I would love to see incorporated into Cogito, if possible. You can see what it looks like in this mastodon post.

The main idea would be to have the door swing inward if approached from one side, and outward from the other. I implemented this by adding another Area3D to determine which side the of the door the player is approaching from, and managing a simple state machine to run the animations.

Redesigned Option menu

Creating a new issue as some issues mention stuff that all apply to this:

I'm planning on redesigning the Options menu to expose more parameters and settings.
The plan is to group options of similar categories under tabs like a lot of games these days do.

  • Graphics/Display
  • Audio
  • Gameplay
  • Controls

My hope is to also use this to fold in the rebinding menu from #19

Default input for free look

I notice a free look feature with no input set by default. Could these be set to something like caps lock and R stick press?

Inventory / items: Stackable item counts is buggy

Sometimes stackable item counts gets tripped somehow, resulting in picking up one item, but the stack goes up by 2, etc.

Repro steps in the COGITO_Demo_01.tscn:

Pick up first health potion : Potion appears in inventory slot 1. This is as expected.
Pick up second health potion: Potion count in inventory slot 1 increases to 2. This is as expected.
Pick up thrid health potion: Potion count in inventory slot 1 increases to 4. <- That's a bug.

Creating new scenes with player, player_hud and PauseMenu should be documented better

Per ReadMe.md:

All signals needed get hooked up via code, so this should work without any extra signal setup.
PauseMenu and MainMenu Scenes contain SceneSwitchers that need paths to the *.tscn files to work.
Also be aware of node order for Player_HUD and PauseMenu. Player_HUD node should be above PauseMenu node, so PauseMenu is "on top".

I've noticed that when I build a new scene, I also need to connect by-hand the PauseMenu.resume() signal to player._on_pause_menu_resume(). We should document this, or if possible, connect the signal automatically. The symptom when you don't connect the signal is that the player doesn't start moving again when you hit the Resume button.

Errors on install

Hello,
ive downloaded the project from github and while testing the project out of the box I got a bit of errors here and there :

  • While just "running" the project starting from the menu there is no way to load the first demo scene using the integrated loader
    the error says : "E 0:00:22:0597 load: Cannot open file 'res://COGITO/DemoScenes/COGITO_Demo_01.tscn'."
    and
    "E 0:00:22:0598 _load: Failed loading resource: res://COGITO/DemoScenes/COGITO_Demo_01.tscn. Make sure resources have been imported by opening the project in the editor at least once."
  • Another error appeared when playing out of the demo 1 scene when tried to use the toy gun:
    "Invalid get index 'wieldable_damage' (on base: 'Nil')." on line 35 in Wieldable_Pistol

Is there any step that Ive forgot in the process of installing the framework?

Wieldable projectiles get hidden when the wieldable that spawned them is unequipped.

Was mentioned on Youtube and I'm logging this here.
Repro steps:

  1. Pickup foam pistol.
  2. Shoot a projectile so it lands on the floor somewhere visible.
  3. Unequip foam pistol -> the projectile gets hidden.
  4. Re-equip foam pistol -> projectile reappears.

Cause:
The projectile gets spawned with the wieldable node as parent. If the wieldable gets unequipped, it gets hidden, causing all projectiles to also get hidden. Need to reparent the projectiles to solve this.

Suddenly Hazard Zone

Hi,

I am not sure on how I am doing it. But I can replicate it.

When I was in the LightZone and then got into the Hazard Zone, then I get out of the Hazard Zone and suddenly I get the visual hint that I am in the Hazard Zone and my HP gets drained, but I am not in the Zone.
Please see the video attachment if you don't know what I mean.

hazardzone.mp4

https://www.veed.io/view/31afa1c4-a564-4a8d-922b-7f9016d32112?panel= (githubs 10 MB border is a little pain for me)

Stamina can raise when running.

Hello !

Thank you for your work on Cogito, I am loving it <3.

I played a bit around with this wonderful groundwork and I guess I found a bug.

  1. Install cogito.
  2. Run the COGITO_01_Demo.tscn
  3. Run around to drain your stamina.
    3.1) Stand still to wait for your stamina to increase.
    3.2) When the stamina starts to increse, start running again.
    3.3) Watch stamina raising while running.
    3.4) Stamina starts draining again after it reaches its "full state"

Maybe see the video attached:

mupps.mp4

Reworking wieldables

As they're currently implemented, Wieldables are pretty cumbersome to manage.
I'm planning on reworking those to make these work more as expected, especially when being wielded/equipped, unequipped, switching between them, etc.

Firing toy gun returns error 'Invalid get index 'wieldable_damage' (on base: 'Nil').'

I haven't really dived into the code of the demo, and my GDScript knowledge is not great, but currently firing the demo toy gun wieldable consistently errors out with the message described above. From what I'm able to see, when wieldable_pistol.gd tries to set its value by calling wieldable_damage on line 35, for some reason it can't call the correct value from the passed reference.

I've not made any changes or tweaks to the demo, I'm just running it unmodified on 4.2.1

I imagine this is just a case of fixing an errant reference, but I'm just getting my head around the code so not sure where to start. Eitherway, congrats on the otherwise stunning template.

Re-bindable Inputs

Since Nathan Hoad's input helper includes functions to rebind inputs on runtime, it should be relatively straight foward to create a "Controls" menu in the options that lists all current key bindings and lets the user rebind them as needed.

Please let me know if someone would be up to tackle this, as I'd love to focus more getting scene persistence working.
Thanks in advance!

Inventory drag and drop

It's very unintuitive to me to click to pick up and click to drop, though many games support this. Can a click and drag to move items be added?

Crouch jumping broken, or intentional ?

Hi,
when you have crouch_jumping active (like the standard when opening up the project).
Do the crouch jumping but let go of the crouch_button ("c"), shortly after jumping ("space") you gain height to nearly the point where you would regulary land when you jump.

Is this intended ?
For me it looks like the JumpCoolDownTimer is not working.

floppyjump.mp4

At first I just crouched and jumped for you to see a marking with the target, otherwise it would be hard to see / recognize if not played by yourself.

Break player down into components

The player class is pretty large, and includes a lot of concerns. Perhaps player movement, player look, and damage receiver could all be separate components.

Infinite physics carry.

When holding physics item (like the box in the demo) you can trap it behind a wall and walk away while technically still carrying it. This should have some sort of forced drop at some distance.

gitthub exclusions, and first running issues in MAIN

Hello!

Just downloading your MAIN and Experimental branches and they are quite different sizes!

The 6.4 meg of the COGITO folder is the same, but the .Godot folder has vast 'imported' (500M) and 'shadercache' (40M). The editor and export folder might also be not intentional ๐Ÿ˜

I don'tt know how .gitignore works - and you have that folder listed there so ??????

Crash on reloading wielded item after scene transition

Attempting to reload a wielded item that was held when going through a scene transition causes crash with the error "Attempt to call function 'get_parent' in base 'previously freed' on a null instance." If you put the wielded item away and pull it out again this does not occur.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.