Changes

Jump to: navigation, search

UNX511 Winter2012 TeamB Network Protocol

454 bytes removed, 16:04, 2 April 2012
no edit summary
== Project Platypus Network Core - Introduction General ==This semester we are developing a co-operative multiplayer game in UNX511*[https://github. The com/idshibanov/project will include: a Unix-based server written in C and multiple clients running on different platforms.platypus/tree/network-core Current source code]
This is tile based defense zombie survival. Players will explore dead city, while searching for safe houses, building barricades or repairing city infrastructure and fighting against aggressive zombies. Game will be based on rounds, where players will have to reach goals. When goal is reached, server will reset map and round starts again, while players will get points for a roundAll network protocol related source files are located in /net folder.
To prevent confusion, everything with "Client" in its name (e.g. ClientStatus or ClientSocketHandler) works on the client side, and similarly everything with "Server" - on the server side.
== Version History ==Basic algorithm:Project *1. Client connects to a server, creates an instance of ClientSocketHandler class*2. To send data, client uses functions inside ClientSocketHandler class (e.g. SendChatMsg)*3. Client runs select() function, and if there is in the planning phase.something, uses RecvPacket() function
== Platforms Authorization Process ==We are planning to develop 3 interfaces for different platforms:* Android application* Linux client* Web interface
<syntaxhighlight lang== General Ideas =="cpp">enum ClientStatus{ STATUS_CLIENT_OFFLINE, // initial statePlayers work together STATUS_CLIENT_REGISTRATION, // trying to defend a building from increasingly difficult waves of zombies. In between wavesregister STATUS_CLIENT_CONNECTED, // just connected STATUS_CLIENT_AUTHORIZED, // succesfully logged in STATUS_CLIENT_JOINED, players can buy items // joined game lobby (trapsintermission) STATUS_CLIENT_GAME_STARTED, obstacles // game is starting STATUS_CLIENT_GAME_INIT, placeable weapons) and place them on the // downloading game map. Players are awarded points and money for kills. Players with the most points data STATUS_CLIENT_GAME_READY, // ready to go STATUS_CLIENT_GAME_ACTIVE, // playing STATUS_CLIENT_END // always at the end of the game "win". But everyone else wins too.. unless they all lose.};</syntaxhighlight>
If no players are logged in, game will be paused. Difficulty and scale will be based on the number of logged in players, so building will be expanded automatically.
The building can consist of several floors. Game begins on the ground level, but players can purchase "keys" to the next level, unlocking more space to place defensive items and create paths for enemies.
Game doesn't necessarily have to be real time== Network Packet ==*[https://github.com/idshibanov/project-platypus/blob/network-core/net/packet.cpp packet.cpp]*[https://github. Could be based on action timerscom/coolidshibanov/project-downsplatypus/blob/network-core/net/packet.h packet.h]
(If time permits) Points collected during play spendable in cosmetic shop.
== Technical Ideas Client Socket Handler ===== Features ===*[https://github.com/idshibanov/project-platypus/blob/network-core/net/client_socket.cpp client_socket.cpp]*[https://github.com/idshibanov/project-platypus/blob/network-core/net/client_socket.h client_socket.h]
Server creates instances of games ClientSocketHandler is a derived class from a abstract SocketHanlder and contains member functions that can contain up to ( 16 or 32 ) number of players. When instance is full, it automatically creates work specifically on a new instance (fork)client side.
== Server settings (diffictuly, port number, player limit) will Socket Handler ==*[https://github.com/idshibanov/project-platypus/blob/network-core/net/server_socket.cpp server_socket.cpp]*[https://github.com/idshibanov/project-platypus/blob/network-core/net/server_socket.h server_socket.h]Will be stored in separate filedocumented later.
We should implement pathfinding algorithm and AI for zombies. MySQL database that will store accounts, players statistics and game data. === Roadmap === ==== Basics ==Links ==* Client connections handling* Basic clients (Web, Android, terminal)* Develop basic data protocol* Chat* Static maps* Player Movement* Server forking* Zombies & damage (basic punching)* Collision detection ==== Advanced ====* Zombie AI and pathfinding* Map generation* Database implementation* Improved client interfaces* Item placement* Weapons, inventory ==== Additional Features ====* Auto[https://github.com/idshibanov/project-scaling* Difficulty levels, server config* Interaction with map (picking items, etc)* Items crafting* Highscores systemplatypus/network Committed progress graph]
1
edit

Navigation menu