I used my local IP
YouTube tutorial is not my thing I don’t watch them all or complete them it’s actually fun to stress myself cause I get the hurrah feeling
I’m trying to do it now but I have issues
1 my PC hotspot don’t on if I don’t have internet
2 I want it offline just for my house
Using a USB works but wireless is stressful
How do you do it
I “just” give my local IP (ther are router/global IPs and ther are local ones) to all the peers and I am a peer too but I am also the server/the host-client. you can also read this here:
High-level multiplayer — Godot Engine (stable) documentation in English
Why do you need a hotspot? And why does it turn off without an internet connection?
This is what I do, but instead of calling a @rpc function with text, I synchronize the position of my player with the server, using godot multiplayer_synchronizer Node.
Interesting
- i am making a chatting site which uses httprequest
- since it uses httprequest it needs to connect to a website
- i don’t waste my data. So I used a good backend database called pocket base
- I run pocket base on my PC and Godot httprequest thinks it’s talking to internet
- I have added log-in and it works well
- I host pocket base online in an online free hosting service and it works with some needed fixing
- Now I want my PC hotspot to act as a server for family not online so I can use pocket base without using internet but it’s hard and complex . I’m using windows 10
Same…
I didn’t know that. I know you want to use this just at home, but if you want to host a website for your chat app you could use githubs free hosting sevice (I tink). I dont know if this could help you…
Hehe I need a different type of hosting,
- we have hosting a website
- We still have a hosting an application
- So I’m hosting a database applications
- Don’t worry about me hehe
- Can you show me your game
Ummm.. it’s just 2 space ships wich move around the screen and I need a nother player (I dont have one rn)
I tried using rpc but it’s very complicated that I gave up
My dream game is so big that I haven’t started. If I started and can’t finish it then I’ll lose my making hope hehe.
So you plan on adding features soon on your game
yess but rn i’m in a team project wth friends, I just made this bc my friend head internet problmes and could not work but he came back.
they aren’t so complicated (read the docs
)
and scroll down to “Remote procedure calls”.
If you dont understand smt feel free to ask ![]()
Really really complicated, I have actually read the docs but I find it hard to make an rpc that works for two game instance. Which means a game can be a server and client at same time (
like how can I make a complicated code) then multiplayerpeer and @ rpc notation in a script is not understandable
You said you have a home server? you need the local LAN IP in for the peers to connect to you server. if you want you massages to arive youse TCP (bc it should be simpler) than http (this way you dont need a wabsite). do you simulated the chat on 1 device by setting runn instace to 2 or 3?
If not then try to achife this first!
@rpc
func print_once_per_client():
print("I will be printed to the console once per each connected client.")
This way you can send a string to all peers. (for group chat).
but insted af printing it out you could create a label with this text in it.
oh and you should call the func like this:
print_once_per_client.rpc("any_peer", "call_local", "reliable", )
and with this fuction you can get the sender id (usfull to add a name to the chat box)
multiplayer.get_remote_sender_id()
just add this in to the function call @Casmir_Samuel ![]()
NOTE: I am not an expert… but i think this is how you are suposed to do it.
No worries. I understand thanks,
So network follows
1 send message
2 goes to internet
3 meets server (which is all ready there and made)
4 gets response
While rpc
- Make a scene that ask for server to run a code
- Make a server code project right?(hard part)
- Client talk to the code using rpc
- If the client gets the rpc differently then error
- How do we get uniqueness if the use same code on different instance