Skip to content

Conversation

@tjrileywisc
Copy link
Contributor

...with a UI setting in the Controls page to turn it on and off.

tjrileywisc and others added 22 commits March 13, 2025 21:36
* Fix float comparison

* Start server binary

* Establish network socket

* Reduce cmake required version

* Build debug by default for now

* Fix newline

* Establish connection for localhost for now

* Windows compile changes

* Get last network error and fix windows socket init

* Minimize windows includes

* Rectify differences between platforms

* Move network code into library

* Implement network send packet

* Reorganize main CMakeLIsts file

* Fix typo

* Update CMake min version

* Add out-of-band print function

* Add logging message

* Add network race type

* Stub out network server page

* Client inits network socket on startup

* Headers don't need to be included here

* Windows build fixes

* Start message handling

* Export message function

* Attempt to send message from client to server

* Use network sleep to wait for connection

* Extract these conversion functions

* Fix endian of port so data is sent correctly

* Replace with modern utility

* Add termination condition for loop packets

* Separate client and server socket connections

* Build and link protobuf c

* Generate protobufs on the fly

* Change package

* Server reads message from client
* Silence some warnings

* Fix many build warnings

* Handle no message case

* Enqueue response work on received packet

* Add formatting rules

* Add header

* Stub out server functions to clients

* Remove undefined function

* Break out server code and start unit tests

* Remove unused functions

* Mock out recvfrom and write a test

* Use fewer hardcoded values here

* Moderinize include guards

* Add docs

* Add getter for socket fd

* Don't free message queue item on creation

* Add test for processing a single queue item

* Apply coverage option less liberally

* Finish test case for no packet

* Start network discovery thread

* Add utility to get subnet

* Move client code to more clearly named server_com

* Support exit callbacks to menus for background tasks

* Add unit test for subnet util

* Support callbacks on page enter/exit

* Support ASan

* Add test

* Update test

* Rename function

* Add comments back

* Bind on eth0 instead

* Add broadcast function for discovery

* Merge branch 'myfork' into send-server-info

* Add header

* Use port variable

* Remove unnecessary includes

* Change method to find local IP

* Merge branch 'myfork' into send-server-info

* Add readme

* Fix some compiler warnings

* Init windows sockets when trying to get a socket for the first time; make binding a socket separate from getting one

* Wrap recvfrom and provide an alternate definition at test time

* gcc build fixes

* Wrap sendto

* Create a socket for this purpose

* Improve socket cleanup

* Just use ipv4

* Rename function

* Don't setup networking on startup

* Bind the server on all local interfaces
self->mass + other->mass
);

platform_force_feedback(1.0, 500);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wasn't sure what magnitude to use for this one though (ship to ship collisions)

tjrileywisc and others added 2 commits June 22, 2025 13:39
* clear weapon_target in ship_init (fixes phoboslab#141)

* clear `expected` state in `input_bind` so remapped controls actually work (fixes phoboslab#132)

* `vec3_is_on_face` angle value test updated to match original code.

* remove erroneous division by 64 in `magnitude` calculation for nose collision
this makes ship nose swing back out toward center of track again (noticeably)

* remove erroneous division by 16 in `magnitude` calculation (wing collision)
this restores the behavior of ship rolling on wing collision with side of track
there may still be other code to tweak as this seems more sensitive than PSX behavior

* use reciprocal multiply as seen in many other lines of rewrite

* another place where angle comparison to 30000 was converted differently

* angular z component computation did not match original source DYNAM.C

* 2 * pi, I also messed up

* scale face normal contribution consistently in floor collision code

* reimplement camera shake

* mistake, messed up roll

* LONG/SHORT_SHAKE -> CAMERA_SHAKE_LONG/SHORT

* fix indentation

* adjust face->normal scaling constant for collision with floor

* another fixed point scaling issue?

* restore original attract mode/demo behavior

With a very small reordering, the original PSX demo behavior is restored (countdown at starting line). Gets rid of the need for the "FIXME" part in the ship loop as well.

* Adjust scaling values in ship to ship collision code

* Update QOA lib

* Add menu option for screen shake

* Allow A_MENU_START for highscore entry; close phoboslab#133

* Better analog controls; thanks @mickski56; close phoboslab#77

* add wipegame.exe to .gitignore

* Use sdl2-config for L_FLAGS_SDL

Additional flags passed by 'sdl2-config --libs' fix an undefined reference to WinMain that prevents the target from successfully linking.

* Correct L_FLAGS_SOKOL for MSYS2

libdl and libasound don't exist on Windows. The Sokol build needs gdi32 and ole32 to successfully link.

* Remove unnecessary MSYS define

'__MSYS__' is pre-defined by the MSYS2 environment's toolchains, and should NOT be defined for MINGW32/64, UCRT64, etc.

* Rename client com file for consistency with server com

* Tidy up tests a little

* Address some minor warnings

* Remove unused param

* Add unit tests

* Move away from custom network structs

* Add test for connecting client and too many clients

* Account for forgetting to init client array somehow

* Remove header

* Forward declare server info type

* Grab server address in discovery loop

* Fix data (server index)

* Comment this out for now

* Send and receive connect status on client side

---------

Co-authored-by: jnmartin84 <[email protected]>
Co-authored-by: Dominic Szablewski <[email protected]>
Co-authored-by: J.Ingram <[email protected]>
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.

1 participant