Quick data transfer

I’m working on a little game about planets, in which the planets orbit and are able to travel between blinks. I have been having a problem with the transfer though where when I call for the plaet to be moved, by the end of the whole sequence it has caused a good chunk of lag. This kinda messes with the whole feel of the game, does anyone know how you might fix it?

Can you can post some source code showing what have have now along with how you want it to work?

To expand on what @bigjosh said, what you described is not something inherent to the Blinks API. It is something you are doing in your own code. Without seeing the code it is difficult to give you any advice. Generally speaking, sending single byte messages from one Blink to another is pretty fast. Just check Darkball.

Oh ok thank you! Sorry @bigjosh I must have somehow dismissed the notification that you replied, my bad!

Are you going to show us the code? :slight_smile: Are you using datagrams or simply face values?

Oh my bad lmao - I don’t know what a datagram is but I think I’m just using face values - I’m really bad with signals lol

Ok. Again, we will be able to help more if you point us to the code. There are some examples around on how to deal with signals but it seems to me you are doing something that does not directly match to the (exhaustively) explored switching states case. Here is something as I wrote anyway in case it might be helpful:

I have looked at that already, it has helped in previous projects but I am stuck on this one!
Here is the code, sorry it took so long:

I took a look at the code but did not try to run it on actual Blinks yet. If I understand it correctly, you are expecting that data transfers will happen in a specific time frame and that can not be guaranteed. But it is only an issue because of the way you are doing things.

I have a game I wrote for the Global Game jam that has a bat that moves across Blinks. It does not do exactly what you do here but it shows data being hand over from one blink to another in a coordinated fashion but without having to rely on nay specific timers. I basically have 2 bits: has_bat and sent_bat that tells is a blink has the bat and if it has been sent to that face. If A has the bat and sends it to B, it will set has_bat on all faces to 1 and sent_bat to 1 in the face connected to B.

Then B will noticed the sent_bat bit and will itself set its has_bat to 1 in all faces. At this point A will see that the face it sent the bat to now is reporting that it has the bat and will then clear its own has_bat bit and also the sent_bat bit in the A <-> B face.

I hope this helps.

Thank you! This should fix it! I’m so sorry for (very) late reply again!

1 Like