A downloadable tool

This is a source code for my UDP server and client that i use with Coppercube to make multiplayer game.

I provide it for free but any donation will be appreciated and will help me to make even cooler projects.

(I included simple Coppercube game and script with it also that shows how to use it)
(but you can make your own way for it)

NB this is not meant for making real game out of it but just for testing and for haveing fun .
[if you want to make real multiplayer game then just buy studio version and you are able to add networking to your game]



Updated 25 days ago
StatusReleased
CategoryTool
Rating
Rated 5.0 out of 5 stars
(2 total ratings)
Author5v3n
Tagscoppercube, lan, Multiplayer, udp
Average sessionA few seconds

Download

Download
UDP_multiplayer_source.zip 1.3 MB
Download
VER.zip 4.7 MB
Download
MultiplayerCC.zip 4.4 MB

Comments

Log in with itch.io to leave a comment.

Hi Sven, how do I update the position/rotation of an enemy and send this information from the server to the client in UPD, I want to create a coop game with your UDP but I don't know how to link the entities seen by one player to another, please help me!

Hi, with scripting its doable.. my example is made for player vs player. -to make it work to update AI positions  needs scripting , i made for my own use simple AI update script (if i find it then i post it here- but still for custom game its all about scripting)

ok thanks

Hi Sven, I still have some issues that need to be resolved. The main problem now is that the events triggered between two players are not synchronized. On my end, player 1 triggers an event such as placing a block or being blown away, and player 2 cannot see the particle effects of the block and explosion. But you can see the player who was blown up. That is to say, only the player's model is synchronized in the game, not the map object. The only problem now is how to synchronize map objects. Is the CCB project using a low level? I looked at the substr in your info, but I didn't understand what it was doing. Why does its description say that "if the received instruction is inv". If it's a network, it's a bit strange to use strings for detection. From the command under MINIMALVENT, I can see that RPC is used for network synchronization, but in theory, the synchronization of player positions should use eventual consistency.

Hi, coppercube writes file .. client program sends it to server.. server sends ot to client programs.. client writes it to a file .. coppercube read it from file- then in script it parses the string: string looks like - command_name, value,value ..

i dont currently have second computer so its not possible for me to test and make fixes  properly.

Player positions are sent out with interval..minimal event action sends commamd only if action is made and should be update something..for example remove node or create one or set visible or invisible something.

Commamds to parse you can add in script ..

In my example i dont have many of them but can be added as many as needed.

I'm trying to use your Online script but it's not working, can you help me and if possible update it because I used an old version that worked?

Firstly, you need an intranet penetration software to ensure that you and your friends can connect to the LAN. I recommend RamdinLan. Secondly, both parties will change the IP in init.o to the server's IP. You can directly copy it from RamdinLan's user information. Then you open the server and client, and start the game, while one party starts the client and game.

Last month, I tried your LAN multiplayer script again. And successfully connected with my friends in another city. It's worth celebrating, my friend. I think you haven't received a successful developer using this script yet. However, one thing I noticed is that the scripts that can succeed come from VER.zip instead of UDP_multilayer_stource. zip. I am curious about the reasons behind it, if you could tell me. After successfully connecting online, I conservatively replaced the player model, map scenes, ammunition fired, and other content in the CCB file without making any changes to the gameplay. This demo has also been successfully connected online, but the player's model is half body stuck in the ground from the opponent's perspective, and I clearly set the player to launch my pre made rocket, but I can only see my rocket and not the rocket launched by the opponent. I don't know why. I tried to change the player's health and attack damage, but only found a player model with a health of 999 and a launch script showing 0 damage. At present, my understanding of this script does not support expanding more content. If you can assist me in understanding the purpose of each script.

Thank you for your speech. Your work was in vain!

Hi.. for 3d model (half in the ground) make sure its pivot point is set to the floor just like sleepwalker have it. Probably i make new version for networking (its very old project of mine so its simpler to make new version than repair old one ) 

I noticed that one player's emissions, particle effects, sound effects, and other features cannot be felt by another player. May I ask if there is a solution?

This is the  game that made form your ccb flie :)


(2 edits)

Hi Sven!

Lately, I've been trying to create a game using this amazing system you've created. It really is amazing!

But, unfortunately, I found an bug: the commands executed in the “MINIMALEVENT” action only work eventually, they are not executed in real time. I don't want to bother you, but if you want, could you fix it?

And if you can, could you create a system to create or set variables for the server?

can i create a game like cs go using this, with diferent teams?

(+1)

Didn't you have a third person UDP? where each player use another skin? Can you reupload that? I try to code it myself but it keeps failing

A question, how do I make an object invisible to the entire server if picked up by a player?

You need to setup command for this.. its actually simple. if object picked up you send out command so object will set invisible for others -object can be idenified by its name.. so command can be "oVisible,nodename,false" 
Script will parse this line as 3 parameters..
command:oVisible
par1:nodename
par2:value
setScenenodeProperty(getNodebyname(par1) ,"Visible",par2);

I have example for this actually .. i will upload example with many commands soon.

Thanks

can  do  for web Browser

How should I use it? I am a Chinese, so is this still useful? The method of using it is not two computers, one is to start the server and client, then open the EXE file, the other is to start the client, and then execute the EXE file. If it's two computers in China, can they be online?

Yes you can use it in China. its LAN multiplayer so if you have two computers connected to the same network then you can connect them.. 

This local area network is a great attempt, but there are still a few issues

1. Frequent connection failures on the server side

2. It is best for this client to have a fixed ID

Suggestion:

1. Try modifying the code on the client side

2. Attempting intranet penetration

Because it uses files to communicate with coppercube game it is more just for testing and for fun ( constant file read/write probably not good for hard drive either so this method is not good) , for real multiplayer developer must code networking part in c++ with Coppercube Studio version. 

client and server code can be modified so it will be healthy to use for turn based or rts  games. 

(1 edit)

thanks.