done new update for studio plugin is out i was lazy so i made decrypt and encrypt a two different functions but its almost no difference
Blink 0.18.5
- Upgraded to Lune 0.10.4, there might be a slight performance improvement to the compilation step
- Added an error on-require in the case of a duplicate RemoteScope
- Improved implementation of SyncValidation, subsequently SyncValidation is now on by default
yo what no tutorials on youtube i cant really understand the blink doc ngl
is Blink a complete replacement to robloxâs remote events/functions? Or are their still cases when regular remotes are preferred?
Itâs best to handle all of your network traffic through blink so you can get the most out of the builtin event batching.
is it possible to create remote functions on the client? theres only .Invoke for me
Hello Axen, Is it possible to send dictionaries thru blink. Example:
{ [string] = u16 }
Edit: I found the map thing So no need to reply!
So I tried making a map with a union key and element (via enum tags)
enum ReturnData = "Type" {
Number {
Value: f64
},
String {
Value: string
},
Boolean {
Value: boolean
}
}
enum ReturnIndex = "Type" {
Number {
Value: u32
},
String {
Value: string
}
}
map DataMap = {[ReturnIndex]: ReturnData}
function GetData {
Yield: Coroutine,
Data: string,
Return: DataMap
}
When Iâm sending and receiving the data I get all the elements, but not the key.
Test return/input:
BlinkServer.GetData.On(function(player, value)
return {
[{Value = "String", Type = "String"}] = {Value = 55, Type = "Number"},
[{Value = "StringCheese", Type = "String"}] = {Value = 55, Type = "Number"},
}
end)
Test output:
{
[Table(12FD5D2ACA88752B)] = âź {
["Type"] = "Number",
["Value"] = 55
},
[Table(DA62BB4DE50B671B)] = âź {
["Type"] = "Number",
["Value"] = 55
}
} - Client - ConfigHandler:62
The output is well just completely useless for me since I need the keyâs value to match with its elementâs value for what Iâm working on. Iâm assuming Blink canât handle tagged enums for keys or am I doing something wrong?
I donât quite understand what your issue is, âI need the keyâs value to match with its elementâs valueâ but in the example data youâre not sending a key that is the same as the element? Iâm also not sure what the output is supposed to show me?
Oh what I meant was that I wanted the output to look like
[âName of the keyâ] = element value
but it outputted
[table(textâŚ)] = { <â no idea why it outputs [table(whatever text)]
element value and type
}
Ah I see, you seem to have misunderstood how tagged enums work, and are trying to use them as a union of number, string etc. As explained in the docs, blinkâs 0.x.x versions donât support union types, it is possible to emulate/substitute them using tagged enums but they are not 1:1 equivalent with a union type. A tagged enum is simply put: a table with a tag field and extra user defined fields, as such they can only be used to mimic union types.
Okay, so does that mean I cannot use tagged enums to mimic unions in keys? Are there other solutions for this?
Perhaps I am missing something, but what is the point of learning a new language and using Blink when the benchmarks in the documentation clearly show ByteNet (and Zap, for that matter) as more efficient and performant? Thanks in advance!
I think you might need to look a little closer at the benchmarks, they show FPS so higher is better
Oh, youâre right! Sorry, I didnât notice that - I thought it was a measure of ping/latency.
Is there no option for auto recompiling for the studio plugin version? The other version has it with the blink file-name --watch command. Does that mean you have to re-generate the blink files every time a change is made to the description file
I am not sure how Blink is designed to respond to violations regarding the nature of callbacks being bound to an event. For example, SingleSync is described as allowing only synchronous callback, but after adding multiple callbacks that yield the thread, no error is thrown? I have SyncValidation enabled
It will warn you about yielding only when it leads to UB, you can safely yield in a sync callback as long as no other events comes in while your callback is yielding. The validation works by checking if there is currently a yielded serdes thread every time a reliable event arrives, it is done this way to minimize overhead since SyncValidation has been on by default for a while now.
I see. And what of Single itself? My expectation is that an error will be thrown after a second callback connection attempt. Blink ensures only one callback responds to the event, but that callback simply overrides all previous connection attempts