Skip to content

readable-ko/IoT_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

23-1 IoT Final Project license

Play 1 on 1 Soccer game with your terminal

더 글로리조, 1 ON 1 Soccer version 1.0

This repository is made by

This powerpoint is created for the explain. Google Slide.

This repository shows how to set up sever, client and how to execute.

  1. Setting Up Environment
  2. Execute

Setting Up Environment

Using c++11

terminal

# install g++ if you don't
sudo apt-get install g++

#check installed c++ version
g++ --version

Download Github File

Download all the git files on this repo

Using Ncurses library

Window/Ubuntu

# install ncurses for get an input without enter.
sudo apt-get install libncurses5-dev libncursesw5-dev

MacOS

# install ncurses for get an input without enter.
brew install ncurses

Using boost library

Window/Ubuntu

you can also download on here

# install ncurses for get an input without enter.
sudo apt-get install libboost-all-dev

MacOS

# install boost for get an input without enter.
brew install boost

Execute

We already included ap_protocol.hpp header file so, you need to give.

Run on Window / Ubuntu

Run Server

#Make a execute file for server
g++ server.cpp -o ['execute file name'] app_protocol.hpp -lpthread -lboost_system -lncurses -std=c++11
#Give any port number you wanna use
./['execute file name'] ['port number']

Run Client

#Make a execute file for client
g++ client.cpp -o ['execute file name'] app_protocol.hpp -lpthread -lboost_system -lncurses -std=c++11
# Run demo client with server's ip address and port number you selected.
./['execute file name'] ['IPv4 address'] ['port number']

it may possible to use IPv6 but we did not check it. Recommend to use IPv4.

Run on Mac OS

Similar to above window method.

Run Server

#Make a execute file for server
g++ server.cpp -o ['execute file name'] app_protocol.hpp -lpthread -lncurses -I ['your boost system include location'] -lboost_system -L ['your boost system lib location'] -std=c++11

#example
g++ server.cpp -o ['execute file name'] app_protocol.hpp -lpthread -lncurses -I /opt/homebrew/Cellar/boost/1.81.0_1/include -lboost_system -L /opt/homebrew/Cellar/boost/1.81.0_1/lib -std=c++11
#Give any port number you wanna use
./['execute file name'] ['port number']

Run Client

#Make a execute file for client
g++ client.cpp -o ['execute file name'] app_protocol.hpp -lpthread -lncurses -I ['your boost system include location'] -lboost_system -L ['your boost system lib location'] -std=c++11

#example
g++ client.cpp -o ['execute file name'] app_protocol.hpp -lpthread -lncurses -I /opt/homebrew/Cellar/boost/1.81.0_1/include -lboost_system -L /opt/homebrew/Cellar/boost/1.81.0_1/lib -std=c++11
# Run demo client with server's ip address and port number you selected.
./['execute file name'] ['IPv4 address'] ['port number']

TODO

  • Apply On WebAssembly
  • Split int bit to use less resources
  • Improve network delay differences between users
  • Add obstruction and ball holding capabilities
  • Add items such as an increase in the number of openings

References

Boost: boost async chatting program server, client example

Ncurses: I refered how to use ncurses examples

Our project is inspired by these previous Midterm Exam in IoT laboratories class in HGU.(Prof. Y. M. KO)

About

23-1학기 IoT수업 final project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages