Skip to content

Conversation

@patorcek14
Copy link

No description provided.

Alto1772 and others added 16 commits August 9, 2025 11:25
* Fix for non-portable builds

* submodule update Torch, [TEMP] libultraship

* submodule update libultraship

* place assets in exe's dir on post build
* Added default menu transition for 3P4P options

* Forgot to change the condition

* formatting

* Reverted change on single frame black

Added comments
* try fix ci

* use fmt instead

* try another fix for fmt

* fix link and detect for c++ 20

* invert condition on format
Last time i tested with a new config file this was actually on, despite it showing off. So now it shows ON by default :)

Co-authored-by: MegaMech <[email protected]>
…urMasters#542)

* Replaced Pop/Push for Yoshi Egg and Mario Sign actors

* Removed comments

* applied suggestions

---------

Co-authored-by: MegaMech <[email protected]>
* Impl SpawnParams

* Added json submodule

* Update json

* Update

* Works

* Remove comment

* Works refactor

* Snowman and thwomp working

* Impl hot air balloon

* More progress

* All OObjects are done

* cleanup

* Refactor 2Dpath to normal path

* Update nlohmann json & fix compile

* Rest of actors

* MORE CHANGES

* Finish actors

* Done PR, some fix to collision viewer

* Impl falling rocks

* Add const

* wip editor refactor

* Property work

* continue

* Overridable editor properties

* Actor saving/loading works now

* Fix light alignment

* Clarification

* Impl penguin

* params impl signs

* properties impl falling rock

* More property impls

* impl air balloon

* Add spawnParams to OObject Translate

* Snowman translate better

* impl hedgehog properly

* properties impl trophy

* thwomp progress

* Finish impl properties

* Fix compile

* Fix cursor collisions

* Move registered actors

* Rename pathPoint XYZ to xyz

* Fix editor pause bug

* Clean up

* Review comments

* Remove SpawnParams struct from actor classes

* Rename

* Player Label First Iteration

* Work now

* Working 3d text

* Fix boo bug

* Finish AText actor

* Fix spawnparams compile

* Register AText

* Finish Text Actor

* Fix thwomp interpolation

* Fix compile

* Fix crab and hedgehog

* Fix loading flagpole

* Fix Hot Air Balloon

* Turn zbuffer on for AText

* Update

---------

Co-authored-by: MegaMech <[email protected]>
* Update Game.cpp

* Update Penguin.cpp
* Update vcpkg.json

* fix appimage
* Create RaceManager.cpp

* Create RaceManager class for race lifecycle management

Added RaceManager class to manage race events lifecycle.

* Refactor World class and implement ClearWorld method

Refactor World class constructor and destructor. Implement ClearWorld method to delete all objects and reset state.

* Add RaceManager to World class

* Update ValidateString for editor mode checks

Refactor ValidateString to handle editor mode and empty strings.

* Update Text.cpp

* Add SetText method to Text class

* Document RunGarbageCollector function

Added documentation for the RunGarbageCollector function.

* Refactor Game.cpp by removing dead code

Removed unused ruleset handling and clean-up code.

* Update Game.h

* Remove CM_SpawnFromLevelProps call

* Update Text.cpp

* Update World.cpp

* Add Clean method to RaceManager class

* Update RaceManager.cpp

* Update World.cpp

* Update World.h

* Update World.cpp
* Update render_objects.c

* Update FrameInterpolation.h

* Update render_objects.c

* Fix mac compile probably

* Fix Mole Dirt Particles

* Fix Mole Duplication Bug, probably

* Fix drawing using wrong camera bug
* Fix Mole Spawns and Tick Rate

* Fix Compile

* Actually Fix Compile
* Update RainbowRoad.cpp

* Update ChainChomp.cpp

* Decrement actor counters in destructor

* Update Finishline.cpp
[email protected]:HarbourMasters/SpaghettiKart.githttps://github.com/HarbourMasters/SpaghettiKart.gitgh pr checkout [email protected]
@gemini-code-assist
Copy link

Summary of Changes

Hello @patorcek14, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request delivers a significant overhaul of the game's underlying architecture, primarily focusing on enabling robust in-game editing capabilities and modernizing the codebase. It introduces a new C++ actor and object system, allowing for more flexible and extensible game entity management. The pathfinding and vehicle systems have been refined to support more complex 3D interactions, and the build process has been updated for better development and deployment. These changes lay the groundwork for a more dynamic and user-friendly development experience, aligning with the "without borders and without limits" theme suggested by the PR title.

Highlights

  • Editor Integration: A comprehensive in-game editor has been introduced, enabling object selection, manipulation (translate, rotate, scale), and collision mesh generation for both C and C++ game entities. This includes new SpawnParams for actor serialization/deserialization, GameObject and Gizmo updates, and a SceneManager to load/save level data.
  • C++ Actor/Object Refactoring: Numerous game entities have been migrated from C structs to C++ classes (AActor, OObject) with virtual functions for Tick, Draw, SetSpawnParams, DrawEditorProperties, and more. This significantly enhances modularity and extensibility of the codebase.
  • Pathfinding System Unification: The pathfinding system has been unified by consolidating Path2D and TrackPathPoint structs, renaming members for clarity, and updating vehicle pathfinding logic to support 3D movement and a new distributed spawning system.
  • New Actors: Two new C++ actors have been added: AText for dynamic 3D text rendering with various customization options, and AFallingRock for environmental hazards.
  • Build System Modernization: The CMake configuration now enforces the C++20 standard, asset copying has been streamlined, and the linuxdeploy tool for packaging has been upgraded to a newer version.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/main.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a significant and impressive refactoring of the engine, moving towards a more modern C++ actor-based architecture with editor support. Key changes include a new actor registry for data-driven spawning, a RaceManager to orchestrate the game loop, and SpawnParams for flexible actor initialization. Many existing C-style actors and objects have been wrapped or converted to this new system, and numerous files have been updated to support editor functionality and freecam.

Overall, this is a fantastic step forward for the project's architecture and maintainability. I've found one critical issue related to asset loading in the new AActor::Draw method that will cause a crash, and one medium-severity issue regarding code duplication between setup_race and the new setup_editor function. Addressing these will make this large-scale improvement even better.

ApplyMatrixTransformations(mtx, *(FVector*)Pos, *(IRotator*)Rot, Scale);
if (render_set_position(mtx, 0) != 0) {
gSPDisplayList(gDisplayListHead++, Model);
gSPDisplayList(gDisplayListHead++, (Gfx*)Model);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The Model member is a const char* representing a resource path, but it's being cast directly to Gfx*. This will lead to a crash. You should use LOAD_ASSET_RAW to load the resource first.

Suggested change
gSPDisplayList(gDisplayListHead++, (Gfx*)Model);
gSPDisplayList(gDisplayListHead++, (Gfx*)LOAD_ASSET_RAW(Model));

@izzy2lost
Copy link
Owner

Sorry I'm just seeing this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants