115 Commits (0e504060cf6dded37811633c7f192ffb062c987f)
 

Author SHA1 Message Date
Aadhavan Srinivasan 0e504060cf Modified README 8 months ago
Aadhavan Srinivasan d69b627bb1 Added README 8 months ago
Aadhavan Srinivasan 91bf5e2ce1 Fixed some commenting issues; Added code to detect if game was quit by peer and, if so, quit the game locally 8 months ago
Aadhavan Srinivasan 50c090cd88 Added a boolean field to the struct, to indicate whether the game should be quit or not 8 months ago
Aadhavan Srinivasan 2c735896df Used unsigned int instead of int when converting to base-10 8 months ago
Aadhavan Srinivasan 24c1dd6391 Removed unnecessary variable, and added a (optional) dependency for the ws2_32 library, which is required on Windows 8 months ago
Aadhavan Srinivasan 8e3488b904 Added a virtual destructor to the Sock class, which would allow Server and Client to override it 8 months ago
Aadhavan Srinivasan c2c095dfa7 Added code to get a non-const char* from a std::string 8 months ago
Aadhavan Srinivasan 047ff602ed Changed 'char*' to 'const char*' because that's what the underlying functions use 8 months ago
Aadhavan Srinivasan ff8dc1f1f7 Removed files related to cross-compilation.
I had a ton of issues related to cross-compilation (libraries not found, clashing function
names with raylib, improper linking), and I realized that it's too much work to cross-compile,
_and_ I'm using a build system. Instead, I'm probably just going to use my Windows VM to compile for Windows.
I still haven't decided what to do for Mac, though.
8 months ago
Aadhavan Srinivasan 4b3d5387a1 Changed code to support Windows libraries and functions as well 8 months ago
Aadhavan Srinivasan ddbbc322a6 Deleted Makefile, switched over fully to meson build system 8 months ago
Aadhavan Srinivasan b90d37c73f Added relevant files for cross-compilation to windows 8 months ago
Aadhavan Srinivasan 69e70eb206 Changed the recvAll return type from std::string to char pointer, and created a non-blocking version of the function 8 months ago
Aadhavan Srinivasan 349b0b78db Created method to set position of paddle 8 months ago
Aadhavan Srinivasan a37ec79f09 Changed 'recvAll' return type from std::string to char pointer, and created a non-blocking version of the function 8 months ago
Aadhavan Srinivasan ba667d020d Game is mostly finished, added a ton of code for reading and applying peer position.
The most important addition is that the program now parses data in the
Serial_Data struct, and updates the positions accordingly. I also removed
the old implementation with strings, and fixed a bunch of bugs along the way.
8 months ago
Aadhavan Srinivasan effeea73b9 Made the serialization code cleaner, and fixed a bug where data was overwritten by the null pointer 8 months ago
Aadhavan Srinivasan c6bbe82d25 Made the 'recvAll' function return a char pointer instead of a std::string, this is better for portability. Also created a non-blocking version of the function. 8 months ago
Aadhavan Srinivasan 6d1565a020 Updated TODO; removed finished items 8 months ago
Aadhavan Srinivasan 93d3f2e13f Added serialization C file as a dependency 8 months ago
Aadhavan Srinivasan 6eb02ab2ee Started working on implementing serialization code into the main game loop.
Currently, I'm trying to serialize data and send it to the peer socket, and deserialize it at the receiving end.
8 months ago
Aadhavan Srinivasan ded7c68ae7 Fixed misaligned bracket 8 months ago
Aadhavan Srinivasan edfd70c3cc Created a simple data serialization library, to serialize and deserialize the data to be sent 8 months ago
Aadhavan Srinivasan 87b436aede Updated TODO 8 months ago
Aadhavan Srinivasan 6ad56fb9ef Started working on client-server communication; so far, I can send the position of client to server, and vice-versa 8 months ago
Aadhavan Srinivasan 6155cb0463 Wrote code to null-terminate the string sent in sendAll, and the string received in recvAll 8 months ago
Aadhavan Srinivasan 89e1e8d45e Worked on further implementation of the network side of things.
Specifically, I added code to send a message from the client, after the client is launched. This message is used to try to connect to the server. Once the server receives this message, it responds back. After the client receives this response, the connection has been established, and the game can begin.

I also added code to wait (on the client side) for the server to press the spacebar.
8 months ago
Aadhavan Srinivasan b47b0eab28 Added new exception constants 8 months ago
Aadhavan Srinivasan 0c726be147 Updated header file to reflect recent change in implementation file 8 months ago
Aadhavan Srinivasan 7e362f0ed9 Moved the private functions out of the anonymous namespace, because I need to use them in other places 8 months ago
Aadhavan Srinivasan f3ad4fbf99 Defined constants for TCP and UDP, instead of using the characters themselves 8 months ago
Aadhavan Srinivasan f0e30f28e9 Updated header files to reflect recent change in implementation files 8 months ago
Aadhavan Srinivasan 4fce513211 Updated TODO 8 months ago
Aadhavan Srinivasan 9954a18171 Made the sendAll and recvAll functions in sock.cpp use variables set by the children, rather than having the functions pass parameters 8 months ago
Aadhavan Srinivasan 350b51e28b Added additional code to easysock library 8 months ago
Aadhavan Srinivasan ec51bcdb34 Added to TODO file 8 months ago
Aadhavan Srinivasan b07b3fc584 Renamed 'connect-helpers' to 'connect_code' 8 months ago
Aadhavan Srinivasan 41f44797a1 Split connect_code file into header and implementation 8 months ago
Aadhavan Srinivasan e9c0fe563c Added additional dependencies 8 months ago
Aadhavan Srinivasan 5a8a42a828 Added comments to explain functions, and added UDP handling 8 months ago
Aadhavan Srinivasan 11d0a1a5ab Completely rewrote Client class, and split the class into header and implementation 8 months ago
Aadhavan Srinivasan 98abf50da5 Completely rewrote Server class, and split the class into header and implementation 8 months ago
Aadhavan Srinivasan 98160f0071 Renamed 'math-helpers.hpp' to 'sign.hpp' 8 months ago
Aadhavan Srinivasan cacc4f9d33 Included string header instead of iostream header, as this file doesn't need iostream 8 months ago
Aadhavan Srinivasan acf8271126 Renamed 'math-helpers.hpp' to 'sign.hpp' and updated main.cpp to reflect the change 8 months ago
Aadhavan Srinivasan 3a7793bde8 Renamed header file include 8 months ago
Aadhavan Srinivasan 3d944f2ed1 Added additional header file 8 months ago
Aadhavan Srinivasan f8b1994bde Added additional flags for GCC 8 months ago
Aadhavan Srinivasan 13da015683 Renamed base-helpers to numeric_base, and separated numeric_base into header and implementation files 8 months ago