We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LDServer / LDClient without network
#1
If I unplug the network, both commands no longer work.
Is there a way to use IP port management on a local computer?

Another question regarding the AI championship:
Can the clients and the server program manage their windows as desired (text window/graphics window/hide)?
Is the playground ("Nature") better located in a client or server?
Or is the server always a text window?
Reply
#2
Hi Scout, I missed this earlier!

On the first point, if you have no network then local IP are not set, they are set by router.  However I think you can use loopback IP if you have no LAN router connection.  To do this set IP to loopback using LDServer.IP = "127.0.0.1" as the first line in server program.

For the AI challenge its kind of up to you guys how it works - I don't want to interfere too much.  But... all that is usually passed is the data that the clients choose to pass (e.g. key stroke or next move or current state in some way).  It is then up to the other clients to update themselves and make their next moves.  Therefore the client program will have all the code to run the game, graphics, sprites etc.  The server has nothing - it just manages message passing between clients.  The clients will share a lot of code - the game play and graphics, but differ in their AI.

Having said that since clients are usually people playing the game and want to see it, in this case it is possible for all the visuals to be with the server and the clients just be the AI bots.  In this case the server is not 'Auto' more like the sample LDServer.sb rather than LDServerAuto.sb.  Lots of options to ponder!

For this AI challenge where there is very sequential 'moves' like chess a simple file message passing may work fine, unless you want speed of AI to be a factor where quick moves will be rewarded by being able to make several moves before opponent moves!

Hope that helps.
Reply
#3
Hi litdev, thanks for the help
that works with the loopback address. The IP in the text file is probably generated automatically.
It's just in case someone trains the neural network on a special machine.  Shy

Everything seems to be there for the display of windows (or without) and the exchange of messages and data.
Possible application:
Server for logging messages
Chess:
1 client for display and user interface
2 clients for the engines (hidden, text output, graphical output)
Multiuser game:
1 client as a playing field and make it available
x clients for the participating figures whereby each client must retrieve the playing field.

I think controlling via IP ports is very flexible for all kinds of games.
An exchange via files is of course also possible, but be afraid that timing problems may arise, given the large range of access times from hard drives without cache to PCIe SSDs.
[-] The following 1 user Likes Scout's post:
  • litdev
Reply
#4
(translated by Google translator)

Hi all.
As everyone knows, I am a absolute beginner.
Therefore, I am now planning to make the “Nature” server program the main engine and main window of the “Snake” game.
It is the “Nature” program that will have to display the playing field and all the events of the game and all objects.
The "Nature" program will send information about the situation on the playing field to the "Snake Mind" and "Rabbit Mind" programs.
After this, “Nature” will wait for the decisions that the “Snake Mind” and “Rabbit Mind” will make.
When "Nature" receives both solutions, it will perform a new game cycle.
If anyone sees a mistake in my model of future game, please tell me about it.

Thank you.
[-] The following 1 user Likes AbsoluteBeginner's post:
  • litdev
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)