A
A
Alexey Anisimov2019-07-17 06:38:11
Java
Alexey Anisimov, 2019-07-17 06:38:11

How to deal with networks?

I want to make a toy, like MiniMilitia, via Java sockets on a local network. I don't know where to start. Already learned the basics of sockets. But I don't know what to do next. How to use them to create a game? I know it's complicated, but I'm very interested. Please explain in more detail.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2019-07-17
@wan340

You have to start small. First an echo server, then a chat, a multi-user chat, a multi-threaded chat, a simple web server, and so on, gradually increasing in complexity. In addition, learning is much better when there is an understanding of how networks work. For this knowledge, you can refer to the textbook " Computer Networks " by Tanenbaum.

A
Alexander, 2019-07-17
@NeiroNx

Understand what the essence of the game is and determine what data needs to be exchanged (the beginning of the game, the end of the game, some actions). Write a server that accepts actions from other clients and relays them to others and a client that relays its actions and receives them from others from the server.
As a rule, the server and the client are 2 different threads.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question