Commit Graph

3 Commits (netcode)

Author SHA1 Message Date
kts 7bc43929e0 Added much code for the foundation of the netcode. Server automatically starts on port 31337 and runs as a separate thread in the SDL client. This TCP server functions as a basic echo server and can be connected to thru telnet or by typing 'connect 127.0.0.1 31337' in timesynk's console. Once connected, the echo functionality can be tested by using console command 'send my message goes here'. Somewhat buggy and crashses on occasion - suspected cause is consoleLog()ing a string that is not properly nul terminated, resulting in reading memory out of bounds. Curses client does not run the server properly at the moment, probably due to using select on server, clients, and stdin when combined with ncurses - will look into this later. 2013-11-06 23:40:19 -08:00
kts c28a62d522 As per usual, added a bunch of stuff and remember almost none of them. Most importantly, a console interface has been added that can be summoned by pressing the tilde key. Much of the functionality, including the less-than-stellar associative array (that acts as a function pointer) was ripped from the noirchat project. The only important commands are 'quit' and, for SDL, 'set_video widthxheight 0|1', with 0 representing windowed and 1 representing fullscreen. Both the curses and SDL client now have camera offsets, allowing for the center of the screen to always be centered on the player. There are plans to have the camera offset be relative to the distance from the edges of the map (so if the player is 25% from the left-side of the map, the camera offset would be 25% off center). Really in need of code clean-up and reorganization. 2013-10-22 02:49:25 -07:00
kts 0c5dc4c822 Initial commit, contains a barebones structure with the interface for both (x)curses and SDL. Can be built via the Makefile or via the XCode project in the xcode/ subdirectory 2013-09-17 22:37:36 -07:00