Commit Graph

26 Commits (3fe7fb9719244131b5d9253f5dd0e6af9d07986f)

Author SHA1 Message Date
MysterD 28b06da7e1 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 7f1a3631b1 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 3bab7a7fdb 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 15601ac856 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 cf50e65ab9 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 dc9eba85b9 Added debug level-warping for testing purposes 2020-09-11 20:10:29 -07:00
MysterD 3102c93d34 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 96c19d3c4c 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 9e7d7b03ea Removed 'int' from most of networking code
moved -Werror over to 'STRICT'
2020-09-04 11:43:12 -07:00
MysterD 28d6a6fb07 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 3a321fd8dc Fixed visual bug when both players are sliding 2020-08-12 19:14:35 -07:00
MysterD 1994b2711e Various synchronization enhancements 2020-08-11 23:00:13 -07:00
MysterD 2eae2e9f22 Synchronize area changes 2020-08-10 12:08:40 -07:00
MysterD 4584b8b8f2 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 6928e39861 Added checksums to packets 2020-08-09 10:44:21 -07:00
MysterD 4257d7ad94 Synchronized 3 types of star spawning, adjusted star interactions 2020-08-08 18:57:04 -07:00
MysterD f77ed51258 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 a76dbaeb5c Synchronized coin collection
Reimplemented how randomness is synchronized
2020-08-07 18:01:58 -07:00
MysterD 3eb1269e47 Fixed max sync distance issue, synced Koopas 2020-08-05 20:25:52 -07:00
MysterD 4e37eba8dd Synchronized inside-painting state 2020-08-04 20:49:53 -07:00
MysterD 6e38a80888 Force synchronizing of level changes 2020-08-02 23:02:29 -07:00
MysterD d56d5256f0 Synchronized held objects, made respawners keep their sync ID 2020-08-02 14:18:34 -07:00
MysterD ae1f5bf892 Started synchronizing objects, refactored networking 2020-08-02 01:43:12 -07:00
MysterD ba265e9738 Started adding networking 2020-08-01 20:22:24 -07:00
MysterD 6a96a045c1 Add Luigi's geo file to MSVC 2020-07-30 18:44:31 -07:00
MysterD e759aa603e Added Visual Studio project (code-editing only, no build/debug) 2020-07-30 18:12:05 -07:00