Free uncharted water web game API
______ _____ _ _ _ _ _ _
| ___| / __ \ | | | | | | | | | |
| |_ _ __ ___ ___| / \/ |__ __ _ _ __| |_ ___ __| | | | | __ _| |_ ___ _ __
| _| '__/ _ \/ _ \ | | '_ \ / _` | '__| __/ _ \/ _` | |/\| |/ _` | __/ _ \ '__|
| | | | | __/ __/ \__/\ | | | (_| | | | || __/ (_| \ /\ / (_| | || __/ |
\_| |_| \___|\___|\____/_| |_|\__,_|_| \__\___|\__,_|\/ \/ \__,_|\__\___|_|
I’m a big fan of the Koei’s Uncharted Waters series. but as you know, recent series (UW5, UW6) are sucks!
so, I decided to make my own Uncharted Water game, so this is the reason why the name of project is ‘FreeChartedWater’.
The game is modeling the earth’s surface, but not strictly using the exact coordinate system.
For ease of development, I used a simple two-dimensional planar coordinate system rather than latitude/longitude model.
For example, city
: Lisbon’s coordinates can be expressed like followings:
city: { x: 3000, y: 3000, radius: 30 }
Suppose you have a fleet
named Raphael. The flagship of this fleet has coordinates and has a discoverable radius.
the fleet can be expressed like followings:
fleet: { x: 2990, y: 2990, discoverable_radius: 30 }
If a collision between two circles is detected, the fleet may assume that it has found the city.
each applications in this repository can be run like followings:
npm run util:pourer # initial data pourer util
npm run webserver # http API server
you can run each application with a development mode.
npm run dev:util:pourer
npm run dev:webserver
applications are same as followings:
a GraphQL server for in-game logics.
npm run webserver
MYSQL_HOST= mysql host
MYSQL_PORT= mysql port
MYSQL_USER= mysql user
MYSQL_PASSWORD= password of user
MYSQL_DATABASE= database name
MYSQL_CONNECTION_LIMIT= number of connection limitation
WEBSERVER_PORT= webserver port
websocket(socket.io) server for asynchronous events.
starts a Websocket(socket.io) server.
npm run websocket
MYSQL_HOST= mysql host
MYSQL_PORT= mysql port
MYSQL_USER= mysql user
MYSQL_PASSWORD= password of user
MYSQL_DATABASE= database name
MYSQL_CONNECTION_LIMIT= number of connection limitation
WEBSOCKET_PORT= websocket server port
WEBSOCKET_USE_REDIS= (nullable) using redis when set TRUE, default is FALSE
WEBSOCKET_REDIS_HOST= (nullable) redis host
WEBSOCKET_REDIS_PORT= (nullable) redis port
worker for periodical jobs. for example, changing the date in the game, changing inflation rate between cities.. will be executed in worker.
starts a Worker.
npm run worker
MYSQL_HOST= mysql host
MYSQL_PORT= mysql port
MYSQL_USER= mysql user
MYSQL_PASSWORD= password of user
MYSQL_DATABASE= database name
MYSQL_CONNECTION_LIMIT= number of connection limitation
WORKER_PERIOD= e.g) 60 -> worker will run every 60 seconds.
synchronizes schemas with given database configuration. it is useful when setting up a new database server.
npm run util:sync
MYSQL_HOST= mysql host
MYSQL_PORT= mysql port
MYSQL_USER= mysql user
MYSQL_PASSWORD= password of user
MYSQL_DATABASE= database name
MYSQL_CONNECTION_LIMIT= number of connection limitation
TBD
TBD