Commit Graph

32 Commits (fa5023dcd589594666329b8b820427420630b7d2)

Author SHA1 Message Date
MysterD aaa7e65b65 Created character struct for mario/luigi asset differences
Removed multiple two-player hacks in the process
2020-10-13 18:33:51 -07:00
MysterD c0a30c8de6 Establish new versioning system (beta 1) 2020-10-11 15:49:24 -07:00
MysterD edc275b5e8 Enhancements to networked player infrastructure 2020-10-10 01:18:45 -07:00
MysterD b831acd59c Rewrote how RNG is synchronized
The old implementation was hacky and often returned desynchronized
results. This implementation gives a seed to each sync object, and
synchronizes that seed. Also allows for a seed to be saved temporarily
based on position and recycled for multiple calls.
2020-10-05 19:15:13 -07:00
MysterD ed06b57649 Added mod registration system
Allows mods to register themselves so that mismatches don't occur. This
does not automagically detect when someone modified the game, so the
mods will have to insert a function like this into their patch:

static void __attribute__((constructor)) _register_this_mod() {
    network_register_mod("mod name here");
}
2020-10-04 16:41:55 -07:00
MysterD 9401a79cdc Fix chat so remote is filled-in and local is non-filled-in star 2020-09-28 20:13:44 -07:00
MysterD f8bffd3b2a Added player connected/disconnected events
Changed synchronizing text to be more descriptive
Added 'player connected', 'player disconnected', 'network shutdown' chat messages
Prevented someone from joining through Discord while in another lobby
Added the distinction of sending a packet to all vs to a specific player
Enforced lobby size of 2, multiple joiners in a direct connection will be booted
Stored network destination for each player
Detected network drops
2020-09-18 23:06:26 -07:00
MysterD 6d89ed5a9f Added warning when Discord isn't detected. Added missing sounds to buttons and events in menu 2020-09-15 09:47:26 -07:00
MysterD 5abd0ca1ab Complete rewrite of custom main menu
The vanilla main menu is an awful pile of code that is extremely painful
to make additions to. So I've side-stepped the problem by writing an
entiely new menu system without all of vanilla's quirks. I've separated
the custom menu system from the menus I want to make, which allows for
easy additions and a clear separation of responsibilities.

Along with this rewrite comes a host menu, adding the missing
configuration options in-game.

Fixes #29
2020-09-13 23:57:14 -07:00
MysterD 3e1b193ea8 Add Discord Game SDK networking system
Allows players to host without forwarding their ports or using a program
like Hamachi.
2020-09-13 03:27:35 -07:00
MysterD 6c8050a564 Abstracted all socket code behind a NetworkSystem
In preparation for other forms of communication, I have abstracted all
of the socket code (which needs direct connections) behind a struct
whose calls can be swapped out for other systems if desired.
2020-09-12 17:56:42 -07:00
MysterD 284ab37406 Added debug level-warping for testing purposes 2020-09-11 20:10:29 -07:00
MysterD 1e6c734ced Completely rewrote level transition synchronization code
Should be snappier and less prone to crashes. I tested as many scenarios
as I could think of and it has been rock solid. But time will tell.

Also created a new debug log system, just so I could understand what the
hell was going on with this code.
2020-09-10 00:17:30 -07:00
MysterD 4a2c218f11 Synchronized save files
Now when a client joins, it will request the entire 512 byte EEPROM from
the server and refuse to continue until the server replies with the
contents. Then the client will override all reads and writes to the
EEPROM/save file. Thus, a client will never overwrite their local save.

Fixes #21
2020-09-04 15:07:32 -07:00
MysterD 1289f863ca Removed 'int' from most of networking code
moved -Werror over to 'STRICT'
2020-09-04 11:43:12 -07:00
MysterD d2a2a80d56 Synchronized Big Boo's Haunt + major changes
Synchronized currentRoom per-player
Synchronized haunted bookshelf, and the bookshelf manager
Synchronized haunted chairs
Synchronized mad piano
Synchronized BBH's tilting trap, and made the physics multiple-player-aware
Synchronized scuttlebugs
Synchronized every variety of Boo
Synchronized elevators
Synchronized flamethrowers
Synchronized the various types of enemy books
Synchronized the book switches
Synchronized jumping box
Made coffins multiple-player-aware

Fixed everything that used gMarioState as an array instead of gMarioStates
Prevented some NPC-dialog softlocks
Prevented the remote player from messing up the local's camera settings
Possibly fixed the relatively rare chain chomp softlock
Possibly fixed the relatively rare chain hoot softlock
Fixed the first-person-camera softlock
Forced camera code to use the correct mario struct
2020-08-26 23:29:40 -07:00
MysterD 48f42d1873 Fixed visual bug when both players are sliding 2020-08-12 19:14:35 -07:00
MysterD 3b00aa9e42 Various synchronization enhancements 2020-08-11 23:00:13 -07:00
MysterD 1bef126df8 Synchronize area changes 2020-08-10 12:08:40 -07:00
MysterD 9036336f42 Gave each BehaviorScript an ID
Created functions to trivially translate an ID to a Behavior and vice
versa. Sent ID over packets instead of Behavior pointer. This should
allow Linux and Windows to play together.
2020-08-09 16:21:12 -07:00
MysterD d7a5a151d0 Added checksums to packets 2020-08-09 10:44:21 -07:00
MysterD b07aa565d4 Synchronized 3 types of star spawning, adjusted star interactions 2020-08-08 18:57:04 -07:00
MysterD 7f5dec337e Synchronized King Bobomb
Tried to synchronize dialog stuff, it's way too much of a mess to do
2020-08-08 17:13:11 -07:00
MysterD 444c1fdd3b Synchronized coin collection
Reimplemented how randomness is synchronized
2020-08-07 18:01:58 -07:00
MysterD 0a2c76c76e Fixed max sync distance issue, synced Koopas 2020-08-05 20:25:52 -07:00
MysterD 4452b38848 Synchronized inside-painting state 2020-08-04 20:49:53 -07:00
MysterD ec2199892f Force synchronizing of level changes 2020-08-02 23:02:29 -07:00
MysterD 716a924803 Synchronized held objects, made respawners keep their sync ID 2020-08-02 14:18:34 -07:00
MysterD 579415dca9 Started synchronizing objects, refactored networking 2020-08-02 01:43:12 -07:00
MysterD 34b1ec76f6 Started adding networking 2020-08-01 20:22:24 -07:00
MysterD c80d11a87c Add Luigi's geo file to MSVC 2020-07-30 18:44:31 -07:00
MysterD 516a84b938 Added Visual Studio project (code-editing only, no build/debug) 2020-07-30 18:12:05 -07:00