Ultimate Chicken Horse in Creaticode!
-
@the_true_odst it could likely work, I’m not sure why i was thinking 2d physics stuff (ig cus walls) but that would probably work, you can make the demo stuff to just create your own game and use syrnchrously set x y speed to try it, but I guess it probably should, though with varying heights off ping and the heights would need to be adjusted due to it being slower
@tyller_ How do you update the other player’s position and actions in the game though?
-
@tyller_ How do you update the other player’s position and actions in the game though?
@the_true_odst you do broadcasts for actions, you dont update htem, the synchrously set x y speed and other blocks like that are the way you have to use to update player positions, when you set it on one client the server gets that info, and sends it to all clients (including your own I’m pretty sure) so that clone does stuff, you dont handle the movement for other client sprites manually, creaticode does it automatically (which is a lil annoying)
-
@the_true_odst you do broadcasts for actions, you dont update htem, the synchrously set x y speed and other blocks like that are the way you have to use to update player positions, when you set it on one client the server gets that info, and sends it to all clients (including your own I’m pretty sure) so that clone does stuff, you dont handle the movement for other client sprites manually, creaticode does it automatically (which is a lil annoying)
@tyller_ I do that, and it just breaks the movement:
I do “if key pressed,” “change x by {number depending on what key},” and “synchronously set speed x {same speed as movement} y 0”
for y speed, I do “when space key pressed,” “change y by 4,” “set {y speed} to 4” “synchronously set speed x 0 y {y speed}” “if not touching ground, reduce y by 0.05” (and y speed by that as well)

-
@tyller_ I do that, and it just breaks the movement:
I do “if key pressed,” “change x by {number depending on what key},” and “synchronously set speed x {same speed as movement} y 0”
for y speed, I do “when space key pressed,” “change y by 4,” “set {y speed} to 4” “synchronously set speed x 0 y {y speed}” “if not touching ground, reduce y by 0.05” (and y speed by that as well)

@the_true_odst you’ve created the game and added hte sprite to the game right? if you have then it’s probably you should do what other people do with an intended x y, actual x y, and only update the sync set speed when these change, the reason you do this is beducase (I believe I’ve tested htis) there’s a time out on the connection if you use it too much
-
@the_true_odst you’ve created the game and added hte sprite to the game right? if you have then it’s probably you should do what other people do with an intended x y, actual x y, and only update the sync set speed when these change, the reason you do this is beducase (I believe I’ve tested htis) there’s a time out on the connection if you use it too much
@tyller_ Can you make this work then? I have no clue how to.
https://play.creaticode.com/projects/67db18264187b83ecbf164ab
-
@tyller_ Can you make this work then? I have no clue how to.
https://play.creaticode.com/projects/67db18264187b83ecbf164ab
@the_true_odst you create the game with your create button, then you use the add this sprite to game in the clones, you need to make sure the player is a clone with a unique name (I find the best option is usign the username full name or user id for the clone id), run everything for the player in that clone, and put the add this sprite to game for that clone
-
@the_true_odst you create the game with your create button, then you use the add this sprite to game in the clones, you need to make sure the player is a clone with a unique name (I find the best option is usign the username full name or user id for the clone id), run everything for the player in that clone, and put the add this sprite to game for that clone
@tyller_ can you send a screenshot of what you mean? I’m pretty sure you can look at my code too
-
@the_true_odst you create the game with your create button, then you use the add this sprite to game in the clones, you need to make sure the player is a clone with a unique name (I find the best option is usign the username full name or user id for the clone id), run everything for the player in that clone, and put the add this sprite to game for that clone
@tyller_ I feel like this should work, but it doesn’t. Can you help?

Edit: I understand the movement is different from the sync block, it was just a test to see if it would actually move
-
@tyller_ I feel like this should work, but it doesn’t. Can you help?

Edit: I understand the movement is different from the sync block, it was just a test to see if it would actually move
@the_true_odst you may require some width and height, also you do run create game before that right? and its run in a clone as well right? the most likely issue would be you’re calling synchrously set x y speed every frame, so the server gets it all and eventually just stops receiving from your client due to spam, this is called timing out, the best wya to stop this from being a chance is having four variables
actual x speed
actual y speed
intended x speed
intended y speedthen every frame you check if the corresponding actual is equal to the intended (and update the intended to change speed and stuff), then if they aren’t equal, syrcrhrously set x y speed to intended x y speed (with the variables), set actual x y speed to intended x y speed, then the if statement ends
there are examples of this in the basic space shooter creaticode tutorial example, the reason for this is not explained but most likely because CreatiCode doesnt want your client sending massive amounts of data to their server every frame when it’s not neccassary
-
@the_true_odst you may require some width and height, also you do run create game before that right? and its run in a clone as well right? the most likely issue would be you’re calling synchrously set x y speed every frame, so the server gets it all and eventually just stops receiving from your client due to spam, this is called timing out, the best wya to stop this from being a chance is having four variables
actual x speed
actual y speed
intended x speed
intended y speedthen every frame you check if the corresponding actual is equal to the intended (and update the intended to change speed and stuff), then if they aren’t equal, syrcrhrously set x y speed to intended x y speed (with the variables), set actual x y speed to intended x y speed, then the if statement ends
there are examples of this in the basic space shooter creaticode tutorial example, the reason for this is not explained but most likely because CreatiCode doesnt want your client sending massive amounts of data to their server every frame when it’s not neccassary
@tyller_ I can’t figure it out, could you help remaking it in my game?
-
@tyller_ I can’t figure it out, could you help remaking it in my game?
@the_true_odst I can try, you should look at the space shooter tutorial for what I’m talking about, I will make a demo when I get the time
-
@the_true_odst I can try, you should look at the space shooter tutorial for what I’m talking about, I will make a demo when I get the time
@tyller_ I did look at the space shooter, but I don’t know how to convert that with gravity physics and a jump mechanic
-
@tyller_ I did look at the space shooter, but I don’t know how to convert that with gravity physics and a jump mechanic
@the_true_odst you use the intended and actual as a back bone, for the gravity you just set the intended x and intended y values at the changing, your gravity was mainly change y by 2 every frame and then change y by negative 2 to go down (from what I remember), you can set the intended y speed to 2 every frame (you dont need to every frame but it would work) and then the same with negative, you wouldn’t use 2 because multiplayer blocks make sprites move slower than if you moved them yourself so you have to retest it
basically, you replace all change y by blocks in your gravity with set intended y speed to a value and test for what they should be
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login