An official continuation of https://github.com/djoslin0/sm64ex-coop on sm64coopdx for the enhancements and progress it already has.
Find a file
djoslin0 82ca45eeb6
Lighting engine improvements (#870)
* Lighting engine improvements

Now objects will be affected by the lighting engine. This is
accomplished by passing the renderer the object's model matrix
(uncombined with the view or projection). You can now setup the
lighting engine mode to affect all shaded surfaces, lighting can
be affected by surface normals, and you can control what type of
tone mapping is applied.

added le_set_mode(mode)
    By default we retain the previous behavior.

    When set to LE_MODE_AFFECT_ALL_SHADED the lighting engine will
    affect every shaded material.

    This way we don't have to recompile every object and level that
    we want shaded with special coop-specific commands

added le_get_mode()

added le_set_tone_mapping(toneMapping)
    Tone mapping is what happens when a color value exceeds its 0-255
    range.

    By default we retain the current tone mapping (called
    LE_TONE_MAPPING_TOTAL_WEIGHTED).

    LE_TONE_MAPPING_WEIGHTED is now accessible, it was the tone
    mapping that was previously left out of the compile through ifdefs.

    LE_TONE_MAPPING_CLAMP is just simple additive with a clamp at a
    color value of 255.

    LE_TONE_MAPPING_REINHARD is reinhard tone mapping
    (vout = (vin + 1) / vin).

added le_set_light_use_surface_normals(id, useSurfaceNormals)
    By default lights retain their previous behavior (of ignoring
    surface normals).

    When enabled lights cast on one side of the object will not
    appear on the other side of the object.

    It is kind of like backface culling, but for lights.

added le_calculate_lighting_color_with_normal(pos, normal, outColor, lightIntensityScalar)
    It's just like le_calculate_lighting_color(), but you can pass
    in normals now.

* Removed normal calculation from vertex colored surfaces - they don't have normals

* Use packed normals correctly

* made LE_MODE_AFFECT_ALL_SHADED the default

* made useSurfaceNormals the default for lights

* Set ambient color, performed le_is_enabled() checks

The ambient color was black, which is why everything was dark by default.
If we set ambient to white then people will never see the effects of their
lights unless they set ambient to a lower value. So I added checks for
if a light has ever been added. The alternative would be to have something
like le_set_enabled()

* Rewrite how we obtain the model matrix - invert the camera

* run autogen

* Change default tonemapper to weighted, make setting ambient enable LE, fix null deref

* Address Peachy's comments

---------

Co-authored-by: MysterD <myster@d>
2025-06-29 17:46:35 +02:00
.github Attempt 2 to compile with lower glibc [build] 2025-05-07 18:12:18 -04:00
actors change misleading switch case field label (#781) 2025-05-02 13:33:36 +02:00
assets extract demo data from rom at runtime 2025-01-13 22:27:47 +10:00
autogen Lighting engine improvements (#870) 2025-06-29 17:46:35 +02:00
bin Japanese Support (#574) 2024-12-31 10:32:31 -05:00
data thought i fixed this ages ago 2025-06-28 22:47:48 +10:00
developer Lighting engine improvements (#870) 2025-06-29 17:46:35 +02:00
docs/lua Lighting engine improvements (#870) 2025-06-29 17:46:35 +02:00
dynos/packs/Coop Cafe Pipe Add fixed smoke to Coop Cafe Pipe DynOS Pack 2025-04-06 14:21:59 -04:00
include Lighting engine improvements (#870) 2025-06-29 17:46:35 +02:00
lang Update Portuguese.ini (#871) 2025-06-27 19:00:41 +02:00
levels Lay some groundwork for more documentation, fix compilation error, put backgrounds into enum 2025-04-26 23:29:21 -04:00
lib Attempt 3: libcoopnet w/ glibc 2.36 [build] 2025-05-07 20:16:35 -04:00
mods Re-arrange some parameters and add math.round 2025-05-28 22:34:45 -04:00
palettes Fix Waluigi 2024-06-30 15:09:07 -04:00
res Add macOS icon by EmeraldLockdown 2024-03-18 18:02:21 -04:00
sound fix missing non mario character sounds 2025-03-13 21:49:20 +10:00
src Lighting engine improvements (#870) 2025-06-29 17:46:35 +02:00
text Add smlua_text_utils_dialog_get_text and some other dialog functions (#860) 2025-06-28 14:28:28 +02:00
textures Japanese Support (#574) 2024-12-31 10:32:31 -05:00
tools upload hash_file.cpp 2025-04-22 13:10:27 +10:00
.clang-format Refresh 1 2019-09-01 15:50:50 -04:00
.clang-tidy Refresh 1 2019-09-01 15:50:50 -04:00
.gitattributes Merge pull request #42 from krmeet/luac 2024-01-01 12:53:32 -05:00
.gitignore Fixed MacOS Resource Path Location (#617) 2025-01-07 16:27:11 -05:00
assets.json DynOS Skyboxes 2023-11-06 18:37:02 -05:00
CHANGES Update to Refresh 13 (#19) 2022-03-13 00:17:10 -08:00
charmap.txt refresh 5 2020-01-03 10:38:57 -05:00
charmap_menu.txt refresh 5 2020-01-03 10:38:57 -05:00
credits.txt Update credits 2024-06-30 11:16:46 -04:00
Dockerfile Add curl to Dockerfile 2024-06-08 08:07:47 -04:00
dynos.mk Added DynOS v1.1 without the dynamic options 2022-03-09 18:01:03 -08:00
extract_assets.py extract demo data from rom at runtime 2025-01-13 22:27:47 +10:00
format.sh sm64coopdx 2023-10-30 01:03:36 -04:00
Makefile Improving math functions (#813) 2025-05-21 23:50:49 +02:00
Makefile.split extract assets from rom at runtime (#4) 2024-03-23 16:11:30 -04:00
README.md Update README to mention wiki 2024-11-11 10:04:50 -05:00
sm64.eu.sha1 these should remain 2025-05-29 12:50:35 +10:00
sm64.jp.sha1 these should remain 2025-05-29 12:50:35 +10:00
sm64.sh.sha1 these should remain 2025-05-29 12:50:35 +10:00
sm64.us.sha1 these should remain 2025-05-29 12:50:35 +10:00
util.mk Update to Refresh 13 (#19) 2022-03-13 00:17:10 -08:00
windows.ld [Experimental] Reduce the size of Windows builds by cleaning the MinGW debug info (#585) 2024-12-29 14:29:26 -05:00

sm64coopdx Logo

sm64coopdx is an online multiplayer project for the Super Mario 64 PC port that synchronizes all entities and every level for multiple players. The project was started by the Coop Deluxe Team. The purpose is to actively maintain and improve, but also continue sm64ex-coop, created by djoslin0. More features, customization, and power to the Lua API allow modders and players to enjoy Super Mario 64 more than ever!

Feel free to report bugs or contribute to the project.

Initial Goal (Accomplished)

Create a mod for the PC port where multiple people can play together online.

Unlike previous multiplayer projects, this one synchronizes enemies and events. This allows players to interact with the same world at the same time.

Interestingly enough though, the goal of the project has slowly evolved over time from simply just making a Super Mario 64 multiplayer mod to constantly maintaining and improving the project (notably the Lua API.)

Lua

sm64coopdx is moddable via Lua, similar to Roblox and Garry's Mod's Lua APIs. To get started, click here to see the Lua documentation.

Wiki

The wiki is made using GitHub's wiki feature, you can go to the wiki tab or click here.