Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Raika on November 28, 2017, 05:12:12 AM
-
I'm creating multiplayer game with big world. To create objects in game i'm using basic action Random int like that: starting from 0,0 add RanX(2-10) and RanY(0-4 reset Y on object add), when X go 3000, reset X to 0 and add 5 to Y. I don't wanna send this all information thru web because bandwidth limit, I would like to send only seed.
Is it possible to generate numbers in this way using a seed?
-
Hi,
I made a action for you to set the seed.
First you would need to do a random int to get a seed nr,
Then you can use the action i made to set the seed (attached below)
I tested it a bit and it seems to work, can you confirm if it works, i can place it on the ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) then.
-
I can see only ecosystem link, can you post once more?
-
Hi,
Oops i forgot to add the attachments sorry for that :)
here it is now :)
-
Thanks for help Everything works, if i manage to break something i will contact you on priv.
You can add to description something like that: This action has impact on all FSM but any other random action will pick NEXT number from pool, Call second time to reset.
-
Hello,
Sorry for posting on an old thread, but I have a question. The action works great and even remembers seeds once the game is powered off, but if I clear player prefs, the same seed results in a different game world. How can I make it so it is consistent for different players playing it regardless of deleting save file. Thanks!
-
Hi,
unfortunatly, you can't, unless the values are hardcoded inside your project and built with these.
if the user saves a different value, it will be saved in the playerprefs, and deleting the prefs makes it unrecoverable. you could save data online on a server, then if you have a user management system you can recover data even of the user plays on a new phone or has deleted and reinstalled.
Bye,
Jean
-
Hello,
I know I said I figured this out, but I started a new project and I can't seem to figure out how to get the seed to visually show on the screen with tiles (I tried to look in the old project, but it wasn't there so I couldn't use it for reference). Could I have step by step instructions of how to do this please? Also, the tiles will be changing during gameplay. If I create a new seed every frame, will it work to have the most up to date version of the tiles?
Thanks!
-
Bump.