Commit graph

252 commits

Author SHA1 Message Date
xLuigiGamerx
aecd4f1bc1 Resolving conflicts 2026-05-17 04:25:08 +03:00
Agent X
19a429dbe5
Add built-in preset screen shader effects configurable through Lua (#1217)
* C++ lighting engine

Runs better using my new system for storing and iterating through lights.

I removed the lighting ctx profiler because after I've realized its very inaccurate and was probably programmed incorrectly from the start. Although I remember it working fine before and not constantly showing 20 ms or higher when I'm in an extremely simple level with extremely simple lights and the FPS is way too high for it to be taking 20 ms.

* Whoops

* Make some optimizations

* Fix small bug with LE inside graphics vertex function

I also brought back the lighting profiler because it's better than nothing.

* Some optimizations

* Cache active lights and 4 lights per vertex limit

Less branching and less iterating with the limit

* Screen shader effects for Lua [OpenGL]

Hue, saturation, brightness, contrast, exposure, dithering, posterization

Global = usually an object in the world
Non global = usually a screen element

Also:
* Changed skyboxes to use environment color instead of vertex color, visually identical
* Changed hud head texture to be non global
* changed power meter to be non global
* changed sparkles to be global
* changed some BBH vertex types to global

OpenGL renderer supported only for now.

* Add default values and better function names

Also fixed sizes in reset function

* Add scanlines effect

* Add global enabled function

* Fix some default values

* Hopefully fix white sparkles

* Whoops

* Address review

* Update function names

* Fix shader crash

* Address reviews
2026-05-11 15:59:48 -04:00
Emily♥
149cb10153
Fix sync valid packet issues for the server (#1228)
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
* Fix erroneous sync valid packets

When the server received a sync valid packet from another player, it would also set the server player's level. This simple fix makes this no longer happen.

* Fix sync valid packets with host

Okay, so it turns out that the host was unable to differentiate between packets meant to validate other players, and packets meant to validate itself (sent when entering a level another player is already in). I changed so that the packet also includes who the sync packet is validating. Requires an additional byte, as well as adding an argument to network_send_sync_valid.

* Don't have server inform itself

Fixes HOOK_ON_SYNC_VALID being called twice
2026-05-07 11:23:57 -04:00
Blockyyy
f6f5434dda
set_sound_bank_override (#1046)
Some checks failed
Build coop / build-linux (push) Has been cancelled
Build coop / build-steamos (push) Has been cancelled
Build coop / build-windows-opengl (push) Has been cancelled
Build coop / build-windows-directx (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
2026-02-20 10:34:25 +10:00
Agent X
f6fc5c0aa7 Reset pause menu hidden on network shutdown (Oldest mistake in the book)
Also removed a couple unnecessary externs
2025-11-23 20:19:05 -05:00
xLuigiGamerx
77952291b8 More Peachy reviews + added dxgi gKeyboard support 2025-11-24 02:55:38 +03:00
xLuigiGamerx
fed9b71819 Addressing Peachy reviews 2025-11-22 19:10:42 +03:00
xLuigiGamerx
83cfc754c2 Added SMLua Input Utils [build] 2025-11-18 22:12:25 +03:00
Baconator2558
c9db7006a3
Add Ability to Hide HUD on Act Select Screen (#880) 2025-07-29 11:42:55 +10:00
djoslin0
c68ee859ea
Add mod development mode (#851)
With mod development mode on you can press the L bind while paused to
reload the active mods. This reload will rescan the directories for
the active modes and thus refresh their file caches.

Mod development mode also enables live lua module reloading. Any time
a lua module is updated, coop will live reload the functions that changed
and do its best to maintain the previous variable states.

---------

Co-authored-by: MysterD <myster@d>
2025-06-22 19:07:15 +10:00
PeachyPeach
467b22e939
Gfx set command: v2 + Gfx/Vtx dynamic alloc (#718)
Some checks failed
Build coop / build-ubuntu (push) Has been cancelled
Build coop / build-windows (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
* set_gfx_command part 2

* part 3

* get gfx/vtx from name; copy gfx/vtx

* gfx/vtx dynamic allocation lua

* gfx/vtx_new: don't take level/model/vanilla names

* Clean up gbi constants

* update example

* Isaac review; add gfx_get_next_command and vtx_get_next_vertex

* make all commands length 1; missing NULL checks
2025-04-12 18:19:14 -04:00
Blockyyy
0e1ab94894
reset gRoomOverride on network_shutdown (#735)
Some checks are pending
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2025-04-08 09:08:00 -04:00
Isaac0-dev
7dc31e3780 model pool fix
better fix than 1bfe9d509c
just checks the level pool for session models
2025-04-08 13:54:04 +10:00
PeachyPeach
b190ee09fb
Gfx Vtx vanilla only duplicates (#733)
Some changes for gfx vtx duplication:
- Only vanilla (read-only) stuff is duplicated
- Stuff is duplicated only once, and uses a map rom->ram for next iterations
- Stuff is restored to original values on network shutdown

also fixes incorrect types in some extern declarations
2025-04-08 10:20:50 +10:00
Sunk
110d6ef32e
Further fix camera (#727)
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
* Further fix camera

* Remove re-override
2025-04-02 10:35:13 +10:00
Agent X
02bd7917cb Fix lighting engine merge header mistake 2025-03-27 17:24:49 -04:00
Agent X
3e540790a3
Basic Vertex Point Lighting Engine (#716)
* CONCEPT: Basic vertex lighting engine

Set the geometry mode on your model to G_LIGHTING_ENGINE_EXT, spawn a `bhvAmbientLight`, spawn some `bhvPointLight`s, and then you got yourself a mighty interesting scene.

* Fixes

* How did I miss this

* Make light set home pos
2025-03-27 16:36:02 -04:00
Sunk
edacdcc7e4
More settings to the Camera settings menu (#555)
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
Sherbie's suggestions from #497 and #538, as well as suggestions from others on discord.
Add 2 new camera settings to free camera, being camera collision and dpad usage.
Add an entire new camera submenu for romhack camera, which are now no longer exclusive to romhacks.
2025-03-14 13:01:51 +10:00
Agent X
8775f9c145 Fix lighting
Some checks are pending
Build coop / build-ubuntu (push) Waiting to run
Build coop / build-windows (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
2025-03-13 00:42:04 -04:00
Isaac0-dev
99b8f31900 init mario from save file on network shutdown 2025-03-06 17:33:17 +10:00
Cooliokid956
42e0051dda
Headless mode as a CLI option (#639) 2025-01-28 10:19:38 +10:00
Agent X
f94a3061cc Add width, height, and player count launch parameters 2025-01-11 14:22:41 -05:00
Agent X
b49de46236 Revert "Synchronize instructions in network_init (NT_SERVER) with network_receive_join (NT_CLIENT) (#597)"
This reverts commit 0ef9ae742e.
2024-12-31 20:12:13 -05:00
Agent X
66fbbc819d Revert "Fix gLevelValues.entryLevel"
This reverts commit 12bf74eb32.
2024-12-31 20:12:03 -05:00
Agent X
12bf74eb32 Fix gLevelValues.entryLevel 2024-12-31 13:34:08 -05:00
Radek Krzyśków
0ef9ae742e
Synchronize instructions in network_init (NT_SERVER) with network_receive_join (NT_CLIENT) (#597) 2024-12-31 10:28:52 -05:00
Agent X
183018cf3c Nice syncing code Sunk 2024-12-23 17:23:06 -05:00
Radek Krzyśków
e20d704604
Solve crashing for disconnected players (#566)
* Prevent crashes for disconnected players with disabled mod list panel

* Allow disconnected players (gNetworkType = NT_NONE) to successfully close the game

* Kick the player back to the Main Menu if network init failed
2024-12-19 22:08:26 -05:00
Isaac0-dev
c65a67ccf1 use a hmap for scroll targets 2024-11-30 15:34:25 +10:00
Agent X
9206aa1e98 Add --no-discord launch param 2024-11-28 10:40:55 -05:00
Sunk
947ce9f080
Rework PvP Balance (#357)
* PvP Rework

This rearranges the damages of last PR. The underused attacks should still see some buffs.

* Adjust how punches apply invincibility

Also increase punch invincibility timer to 12

* EmeraldLoc's easy suggestions

* Rework punching pvp

Punching no longer reduces invincibility frames. Instead, punches can ignore knockback invincibility and the full punch punch kick combo can be done.

* Adjust numbers

Breakdances should not deal 3 damage

* Potential fix for more common tripping

"Trip" here refers to 1 damage kicks

* Add temporary invincibility to rollouts

This is a test to see how different pvp feels with this change. Suggestion by sausrelics.

* Fix invincibility

* Prevent low damage/low knockback kicks altogether

* Update ignored attack list

* Allow dives to be attacked by most actions

A lot of people don't want dives to be entirely invincible and some suggested to make dives be able to only pierce through jump kicks

* Slightly nerf kick knockback

Suggestion by emily

* Rework dive piercing

Instead of all actions being able to hit dives other than jumpkicks, now only slidekicks (and ground pounds) can hit dives.

* Mild kick knockback increase from nerf

* Change direct equality to checking flag

* Decrease dive and punch knockback

* Prevent trades against dives with slidekicks

* Revert "Prevent trades against dives with slidekicks"

This reverts commit 2a2c3266a7.

* Allow ground pounds to always hit a sliding player

* Add server setting to change pvp

* Add pvp settings to config

* Add selection to menu

* Fix issues + autogen

* Rewrite goto statement to not use goto
2024-11-25 20:48:40 +10:00
Blockyyy
93cbf480b6
Reset skybox color on network shutdown (#393) 2024-11-01 21:25:54 +10:00
Isaac0-dev
85a81d3d81 reset Lua error message on network shutdown 2024-10-22 21:09:46 +10:00
Drahnokks
636b385e48
add controller.buttonReleased (#379) 2024-10-20 09:25:08 +10:00
Agent X
73428e4d88 Hopefully fix crouching on the main menu once and for all 2024-07-17 08:41:18 -04:00
Agent X
2b6a173f8b Added gFirstPersonCamera.forceYaw 2024-07-17 08:25:23 -04:00
Agent X
60b9e43604 Fix first person a little and add pitch forcing 2024-07-11 23:10:51 -04:00
Agent X
2601d4cc4f Undeprecate and restore network_discord_id_from_local_index 2024-07-07 20:06:33 -04:00
Agent X
3359ebba0b Add AWESOME new lighting color functions 2024-06-27 16:54:13 -04:00
Agent X
971ddc00cd Remove legacy struct fields, fix a function name 2024-06-26 18:51:11 -04:00
PeachyPeach
c4214ed2da
Prevent the game from caching downloaded WIP mods (#69)
* don't tmp or cache wip mods

* update
2024-06-23 11:54:07 -04:00
Agent X
3707ca9b2e Separate some smlua_misc_utils functions into their own files & add get/set_skybox_color 2024-06-21 23:26:13 -04:00
Agent X
807996c225 Add geo_update_layer_transparency param 30 for not setting anim state 2024-06-21 13:51:06 -04:00
Agent X
26d979ae0a Reset script error timeout on network shutdown 2024-06-21 13:51:06 -04:00
Agent X
8bae9e2ec7 Change Lua volume control to 0-127 instead of 0.0-1.0 2024-06-11 19:10:54 -04:00
Agent X
ed1986e743 Add volume control functions to Lua 2024-06-07 17:34:24 -04:00
Agent X
cb6f5f2b30 Revert "Add gServerSettings.enableChat"
This reverts commit c21c255241.
2024-05-12 08:15:57 -04:00
Agent X
c21c255241 Add gServerSettings.enableChat 2024-05-11 16:48:59 -04:00
Agent X
a6b938df75 Shorten include paths by removing unnecessary "src/" 2024-04-17 17:28:38 -04:00
Agent X
afb2a09db5 Make HOOK_ON_EXIT also call on lobby exit 2024-04-09 18:11:52 -04:00