Commit Graph
100 Commits
Author SHA1 Message Date
sm 2fd97a7092 Removed extra variables 2014-03-31 23:21:18 -07:00
sm a3fa670c3d Fixed scoping issue
The bug here was that when you would try to start a game it would still be nil
after the block where g was redefined. Just me being sloppy.
2014-03-31 23:21:18 -07:00
sm 330e72c21f Fixed unittests 2014-03-31 23:21:18 -07:00
sm 81beee8b43 Put delete of game from controller in right place
Added some debugging
2014-03-31 23:21:16 -07:00
sm c8efd34080 ignore new binary
Create new bserv binary

Herein lie the following ideas:

- change package visibility of many things
- try to stash the globals into structs
- the code is far from correct; it merely compiles
2014-03-31 23:21:14 -07:00
sm 62222a9ad9 Removed a development json file 2014-03-18 22:34:21 -07:00
sm 9a4b76f610 Added io.Reader and io.Writer wrapper
This finalizes the work on getting the server to support multiple encodings for
players and spectators.
2014-03-13 00:12:21 -07:00
sm e6c7abc969 Implemented Fraser's suggestion
Typically client offers supported encodings, then the server chooses the
optimal one.
2014-03-10 21:58:36 -07:00
sm f645c42eb3 Added encoding negociation step into protocol.
This is the first step involved in letting go clients talk gob to the game
server.

Still missing: actually use the client's prefered encoding
2014-03-10 00:05:25 -07:00
sm 00373be3da fixed misspelling 2014-03-10 00:03:51 -07:00
sm 240492520e I was passing around a member variable.
I just realized that there is no need to pass around a slice to something to
which protoTalker already has access.
2014-03-09 21:53:55 -07:00
sm 67ad90d7a4 added logging line when using http profile info
I could never remember the url, so I print it out now.
2014-03-08 18:28:08 -08:00
sm 0959be2df2 updated for changes in bandwidth 2014-03-08 18:27:48 -08:00
sm a932d24683 Added a memprofile dump flag and mechanism 2014-03-08 15:29:08 -08:00
sm 6fd4138740 added bw calcs
unfortunately there is an issue with how these are calculated, and they don't
decrease as things quiet down. Well, the bad numbers are their for your
consumption, and should Just Work TM when appropriate changes in
bitbucket.org/smcquay/bandwith land. And they will. But I'm tired now.
2014-03-03 22:56:26 -08:00
sm ecc70606a9 missed some protoTalker conversions 2014-02-17 22:18:16 -08:00
sm 491d972a4b added NewSpectator and NewPlayer funcs 2014-02-17 01:07:29 -08:00
sm 0bc1575f81 fixed bug in last commit 2014-02-17 01:06:53 -08:00
sm 5d9103f176 Pulled out common code from spectator and player 2014-02-17 00:42:52 -08:00
sm b131b4bc53 Count bytes coming in/out of player 2014-02-17 00:10:55 -08:00
sm ad9d6c1026 Switched to using json.Encoder and Decoder 2014-02-04 08:06:12 -08:00
sm bc58ee9165 solved spectator disconnect issue 2014-01-29 22:12:26 -08:00
sm eac39ad9d1 Changed the collision response from boolean to Collision 2014-01-27 20:35:56 -08:00
sm 0698f21a0f Merge branch 'master' of ssh://bitbucket.org/hackerbots/botserv 2014-01-23 23:03:44 -08:00
sm ff3f9a5137 changed the stats payload
As it turns out there are other citizens of this world, not just the botclient.
So I have properly labeled the payload with a type. This makes the web
front-end less breaky.
2014-01-23 23:00:45 -08:00
sm 7bb5ae59b3 send the client calculated values for stats 2014-01-23 21:11:13 -08:00
sm c6c45ace51 cleaned up some logging 2014-01-23 21:09:27 -08:00
sm d3070ad501 send the client max points for the game 2014-01-22 22:14:22 -08:00
sm a57903d81c added tests for last commit (ProbeResult.Type) 2014-01-16 23:45:17 -08:00
sm 714ea669d2 added probe result type 2014-01-16 23:04:49 -08:00
sm a755d28688 parity to formatting 2014-01-16 22:33:03 -08:00
sm 7971198c17 Fixed collision detection in probes
This was a problem before when the probe hit an object that was further than
another object first. Now we traverse all objects all the time to find the
closest one. \o/
2014-01-16 00:56:35 -08:00
sm 845db00032 added file line numbers to the logs 2014-01-13 20:54:01 -08:00
sm 10373d06d2 update for api change in vector 2014-01-07 21:21:16 -08:00
sm cf3c7e8629 Merge branch 'point-limit' 2014-01-05 19:46:53 -08:00
sm 3bb710dd9c point limit parametrized 2013-11-29 01:10:49 -07:00
sm 4eb849a63f fixed resetart error vis-a-vis obstacles 2013-11-18 08:52:59 -08:00
sm 5a2651d0dd allow object specification 2013-11-16 19:57:13 -08:00
sm f6b3027ded minor: changed some logging 2013-11-16 18:56:15 -08:00
sm 4e55fa8ebe trim the hashes
I tried taking it down to 6, but it fails the tests consistently ...
2013-11-15 23:20:22 -08:00
sm f8fb523a76 fixed some httpstatu.es 2013-11-15 08:54:52 -08:00
sm 50868809bd revert me: default to allowing connecting players to start games 2013-11-14 00:18:46 -08:00
sm 2cbef76a37 cap healing health 2013-11-14 00:16:08 -08:00
sm 527042daa8 added logging for inability to kill 2013-11-14 00:02:26 -08:00
sm 2e774285ba quieted things down slightly (logging) 2013-11-13 23:47:42 -08:00
sm 245c483f9e added simple game stats 2013-11-13 23:45:02 -08:00
sm 84ed6c9c32 added gameover packet 2013-11-13 22:24:54 -08:00
sm aabda1cc90 added config file support 2013-11-13 20:38:57 -08:00
sm 674cda293f renamed function to match go convention 2013-11-09 22:05:37 -08:00
sm da26e1ca46 simplified some loops
These changes were done by running the following command:

    gofmt -s -w *.go
2013-11-09 21:52:06 -08:00
sm bc2d1cdd52 minor tweaks, including go fmt 2013-11-09 21:46:49 -08:00
sm 49ff6af1f3 minor cleanup
- removed comment-disabled code
- reduced verbosity in protocol logging
2013-11-07 22:11:54 -08:00
sm b490cfc228 made it so bots start inside world 2013-11-07 22:11:54 -08:00
sm c9ba660e7f added server info for the / route 2013-11-07 22:11:54 -08:00
sm caea45741f Added ability to configure game at creation time 2013-11-07 22:11:54 -08:00
sm 2707294bb6 Added flag to start with live http profiler 2013-11-06 22:14:54 -08:00
sm c074397c1f bugfix for incorrect logic in game creation 2013-10-18 23:56:06 -07:00
sm d19b3f71fa added ability to autovivify games in debug mode 2013-10-18 20:49:57 -07:00
sm f4e2e84676 added more logging to control requests 2013-10-14 00:17:12 -07:00
sm 158c7d90d8 fixed tick bombs 2013-10-01 21:37:53 -07:00
sm e06f70aed6 go fmt 2013-09-28 23:03:42 -07:00
sm bd4cb39828 added profiling flag and kill channel 2013-09-28 23:00:29 -07:00
sm 83da3961cd infinite melee!! 2013-09-28 13:19:44 -07:00
sm 56c965add7 some clean up
Mainly adding some comments, and some function renaming
2013-09-28 12:59:17 -07:00
sm c5bddcdc31 renamed the file housing the http control protocol, removed defunct test 2013-09-28 12:53:18 -07:00
sm 2a2f4f6f96 moved all negociation code into a single function 2013-09-28 12:37:23 -07:00
sm b142845b5c moved move out of vector lib 2013-09-28 09:44:47 -07:00
sm e33f2c0c4f moved code out of awkward bots repo 2013-09-27 22:27:05 -07:00
sm 472e2011b9 logging and infinite melee 2013-09-27 00:03:32 -07:00
sm 13c0cd047b use user-provided name in /game/list/ output 2013-09-26 21:51:57 -07:00
sm f8378cf89b Got game working again
I just moved some old code into the game struct; probably still merits some
cleanup in the main loop.
2013-09-20 12:15:10 -06:00
sm f175e45c63 added simple, non-leaking game stop url 2013-09-08 09:32:24 -07:00
sm b7087adb78 reuse some slices 2013-09-07 19:13:12 -07:00
sm bf853880ca go fmt 2013-09-07 19:12:46 -07:00
sm f9b646e50c send back more information on /game/list/ 2013-09-05 23:31:24 -07:00
sm 45cc67a5f1 make it simple to track last time 2013-09-05 23:31:13 -07:00
sm 1ca4679b04 embedded the mutex into the games global (one fewer global) 2013-09-05 18:14:41 -07:00
sm c6b480fa1e removed goroutine leak 2013-09-04 23:36:45 -07:00
sm fb0e6d92d7 Sorted out extra load
turns out we were never exiting the loop even when all bots left. Games now
shut down when there ever has been bots and they all leave (or are killed,
I think).
2013-09-04 23:23:05 -07:00
sm 3e805d3da7 remove game from player struct 2013-09-04 00:08:43 -07:00
sm 64477f5e47 stray pointer conversion 2013-09-04 00:07:22 -07:00
sm 325a5c0f57 put more of game init in NewGame 2013-09-04 00:06:39 -07:00
sm 9bccf60abc make member a pointer for nil json 2013-09-04 00:05:38 -07:00
sm 0cc03e5768 removed unused struct 2013-09-04 00:04:28 -07:00
sm 33c08abbc5 forgot to git add 2013-09-03 23:35:42 -07:00
sm 38a7ea6805 moved geom to vector package 2013-09-03 23:32:36 -07:00
sm b495b16065 refactor for bot 2013-09-03 23:26:40 -07:00
sm 835303c53d middle of refactor 2013-09-01 23:00:09 -07:00
sm 0396b16425 need to have games track width/height 2013-09-01 22:04:34 -07:00
sm b800f77c24 added locking, listing 2013-09-01 22:04:10 -07:00
sm a1470c102a added startGame side band 2013-08-28 23:46:12 -07:00
sm aaaff34448 tests work for GOMAXPROCS>1 2013-08-28 22:16:55 -07:00
sm 922acbdb54 added a hash generator 2013-08-28 18:10:08 -07:00
sm 0512bb7664 added test for out of order conf, found bug that needs fixing 2013-08-26 23:09:39 -07:00
sm ad13aed9fd extra import 2013-08-26 23:03:24 -07:00
sm 1b29096479 pared down logging in favor of unittests 2013-08-26 23:02:41 -07:00
sm 63f6d1a2e0 added some protocol tests 2013-08-26 23:00:27 -07:00
sm 880d73b54e got simple testing server working 2013-08-25 23:10:02 -07:00
sm ccd5dc3961 moved negociation code to func 2013-08-21 07:53:34 -07:00
sm 4e4750fa95 go fmt 2013-08-19 23:44:00 -07:00