▲ 1 r/Syrian

Help about syrian colleges for expat students

I am a student in saudi arabia Im currently in high school in the 10th grade, I got my year degree and it was 99.81%. My dad said i could not get into any syrian college with this, is this true? and i want to know how much is the real current mufadalah(مفاضلة) grades that people get that could get me a seat in a university or college for free or at least for money, (i want to get into medical school or into CS school.)

reddit.com
u/Unique-Willingness15 — 5 days ago

How i optimized my game army system

To give some context, I am working on a grand-strategy game, I had to do a lot of optimizations on this project some that i posted and some i had not.

So today i wanted to share something that may be simple but im happy of the results.

In my game i needed to have armies (or soldiers) that should detect around them, shoot, damage and die, I knew that people would be able to spawn a lot of single soldiers a lot for example each player may spawn 10 - 30 or much higher in end game, so i had to change the route from normal humanoids because they are very heavy.

I wanted to make a data oriented system as in not having real physical roblox objects and only storing them in memory.

First thing i did was to make a table that will hold all the armies and their data for example this is what i use:

export type ArmyDataStruct = {
armyName: string,
owner: string,
health: number,
currentPos: Vector3,
targetPos: Vector3?,
detectionDistance: number?,
speed: number?,
templateId: string?
}

I made a function that lets you define it and store it in a GameArmies table and by adding this i have finished the storing part.

Step 2: Data oriented 3D Detection

after making and storing my armies i currently had Vector3 currentPos and number detectionDistance wich will be perfect for a fake 3d detection so i started by dividing my game map into a grid.

I made a grid size and an empty mapGrid table:

ArmyManager.GridMap = {}
ArmyManager.GridSize = 7

also made a couple other functions for calculating the grid that you are in and storing each army in it withing the gridmap table.

Now to make the detection system we will have to search nearby grids so i used a basic calculation:

local tilesRadius = math.ceil(detectionDistance / ArmyManager.GridSize)
local radiusSquared = tilesRadius ^ 2

for offsetX = -tilesRadius, tilesRadius do
for offsetY = -tilesRadius, tilesRadius do
if offsetX ^ 2 + offsetY ^ 2 > radiusSquared then
continue
end

local targetGridX = currentGrid.X + offsetX
local targetGridY = currentGrid.Y + offsetY
local gridString = targetGridX .. "_" .. targetGridY

local armiesInTile = ArmyManager.GridMap[gridString]
if armiesInTile then
for _, armyName in armiesInTile do
table.insert(armiesFound, armyName)
end
end
end
end

and thats it that will give you each direction grids you need to search in,

we could stop at this point but searching in a square while detection is a circle will waste some server resources calculating grids that arent in the circle

as you notice there are a lot of squares we dont need to search in

And here comes "Rasterization" which is where our optimization kicks in,

after rasterization it will dismiss the surrounding tiles that arent in the radius or at least 50% in.

this drops searching from 400 to 344 not a lot but handy when multiplied by a lot of armies

now we could use a simple distance formula to kick the remaining far away armies.

deltaX^(2) + deltaZ^(2) <= detectionDistance^(2)

Now (theoretically at least) we have a working optimized detection to the last drop but we still dont have 3d objects.

because we have a detection system that doesnt rely on roblox physics, we can make the client handle the rendering because we simple DONT CARE.

so we collect the changes and fire them to all clients when they join or something happens.

and this will save us 90% of server proccessing power because the server isnt really doing anyything.

Hope you like my post and sorry for making it tall.

^(--i may have some english grammar issues or type writing i wrote it fully by hand, Thank you--)

--edit ai have been used in fixing some bugs but not writing code its 95% done by me--

u/Unique-Willingness15 — 21 days ago

why did they change the logo

isnt roblox a game for kids +5? so why introduce them to things that arent normal + arent for their ages, this doesnt make sense, and why do they only support lgbtq stuff, but not change the logo to support any case else is it just for the investors?

reddit.com
u/Unique-Willingness15 — 1 month ago

Lowering remote event data size

I am making a grand strategy game and i wanted to compress my network usage because i have a lot of data to send so i went on a journey of 3 days to make it happen here is what i did and i want to get your feedback on it:

the data at start looks like this: ["Luxor","Quneitra","Hama","Storage",5000]

its just random keywords just for testing currently and its much more than this but for testing

Step 1: To ID Layer (8,571 bytes)

the 8571 is the size of 200 tables of non repeating keywords from the above table, instead of sending strings over the network I made an encoder that turns strings like "Yemen" and "Economy" and "Money" into IDs. These IDs are predfined like: 100,234,530 etc....

Result: This made the data smaller from 8.5 kilobytes to 4.9 kilobytes!!. This was better. Still not what i want to reach.

the data looked something like this now [-83,-54,-65,-909,5000]

Step 2: Using Buffers (384 bytes)

I decided to use buffers to make my values paths cuz it wont be network friendly if i used tables so i used buffers and some calculation to calculate its size and it would look like this for the entire 200 table not just one:
^("m":null,"t":"buffer","zbase64":"KLUv/WBgDd0HAMJNLzFQdTo7nK1QagnKwu48DfITy1neygr6CaT2GiAWvadrR7hH4ihZBRnMoV/yE1Y8k31ksKLAofwvvyfVs4D9Ro6n2fXHD5KQlOBEKCgBUP1qh/yf1EvG/UaSpwEXp98I+kOpEyOY36jyEBQ2BCb/yd+SyhBT81uH9FTAcr9ax7+RB6CN86BgiXMSjVIpODOl3+VBmgb38JvFv5LQYOAz8qc8DWVgbDSlVhaEBqWYyeGS3zo/S8KIzH7jr/aLXhcA7ZxbT9TBBavuL0ZYGJ4LGQGjgtxBVmDIBc8cpOb+REYXkwtnvpDLEzKSVFYgI68GLioXmLmAw3QC")

Because the data was packed tightly into the buffer it was able to compress it automatically using something called Zlib. Zlib is, like a tool that can make data smaller by finding patterns in it. And it worked well. The data got much smaller.

The Final Scale:

Raw Table (Text Strings): 8,571 bytes

Dictionary Encoded IDs: 4,991 bytes

Serialized Buffer Payload: 384 bytes

I was able to make the data 95.5% smaller. This is a deal because it means I can send the data to a lot of people without using up too much bandwidth. Using buffers is an amazing way to make data smaller and i advice you to use it too

here are some benchmarks:

with 35 unique tables only:

Data Load Size Raw Table (Text JSON) Dictionary Encoded IDs Serialized Buffer Payload Bandwidth Saved Encoding Time Decoding Time
1 Item 39 bytes 25 bytes 59 bytes -51.3% (Fixed Overhead) 0.000003s 0.000004s
50 Items 2,074 bytes 1,234 bytes 576 bytes 72.2% 0.000035s 0.000043s
200 Items 8,251 bytes 4,896 bytes 576 bytes 93.0% 0.000137s 0.000186s
400 Items 16,464 bytes 9,794 bytes 576 bytes 96.5% 0.000295s 0.000332s
5000 Items 205,585 bytes 122,289 bytes 576 bytes 99.7% 0.005258s 0.003623s

if you notice the 50 to 5000 is the same size its because of the compression and only having 35 unique so the repeating would turn into a pointer.

with 200 unique tables:

Data Load Size Raw Table (Text JSON) Dictionary Encoded IDs Serialized Buffer Payload Bandwidth Saved Encoding Time Decoding Time
1 Item 39 bytes 25 bytes 59 bytes -51.3% (Fixed Overhead) 0.000003 s 0.000004 s
10 Items 422 bytes 248 bytes 228 bytes 46.0% 0.000010 s 0.000016 s
50 Items 2,178 bytes 1,225 bytes 832 bytes 61.8% 0.000035 s 0.000039 s
200 Items 8,312 bytes 4,877 bytes 2,564 bytes 69.2% 0.000140 s 0.000189 s
400 Items 16,623 bytes 9,753 bytes 2,568 bytes 84.6% 0.000285 s 0.000375 s
5000 Items 207,776 bytes 121,901 bytes 2,532 bytes 98.8% 0.003276 s 0.004365 s

data at start

the data shape after dictionary encoding

reddit.com
u/Unique-Willingness15 — 1 month ago

Squeezed my networking footprint by 95% using the Luau Buffer library

I am making a grand strategy game and i wanted to compress my network usage because i have a lot of data to send so i went on a journey of 3 days to make it happen here is what i did and i want to get your feedback on it:

the data at start looks like this: ["Luxor","Quneitra","Hama","Storage",5000]

its just random keywords just for testing currently and its much more than this but for testing

Step 1: To ID Layer (8,571 bytes)

the 8571 is the size of 200 tables of non repeating keywords from the above table, instead of sending strings over the network I made an encoder that turns strings like "Yemen" and "Economy" and "Money" into IDs. These IDs are predfined like: 100,234,530 etc....

Result: This made the data smaller from 8.5 kilobytes to 4.9 kilobytes!!. This was better. Still not what i want to reach.

the data looked something like this now [-83,-54,-65,-909,5000]

Step 2: Using Buffers (384 bytes)

I decided to use buffers to make my values paths cuz it wont be network friendly if i used tables so i used buffers and some calculation to calculate its size and it would look like this for the entire 200 table not just one:
^("m":null,"t":"buffer","zbase64":"KLUv/WBgDd0HAMJNLzFQdTo7nK1QagnKwu48DfITy1neygr6CaT2GiAWvadrR7hH4ihZBRnMoV/yE1Y8k31ksKLAofwvvyfVs4D9Ro6n2fXHD5KQlOBEKCgBUP1qh/yf1EvG/UaSpwEXp98I+kOpEyOY36jyEBQ2BCb/yd+SyhBT81uH9FTAcr9ax7+RB6CN86BgiXMSjVIpODOl3+VBmgb38JvFv5LQYOAz8qc8DWVgbDSlVhaEBqWYyeGS3zo/S8KIzH7jr/aLXhcA7ZxbT9TBBavuL0ZYGJ4LGQGjgtxBVmDIBc8cpOb+REYXkwtnvpDLEzKSVFYgI68GLioXmLmAw3QC")

Because the data was packed tightly into the buffer it was able to compress it automatically using something called Zlib. Zlib is, like a tool that can make data smaller by finding patterns in it. And it worked well. The data got much smaller.

The Final Scale:

Raw Table (Text Strings): 8,571 bytes

Dictionary Encoded IDs: 4,991 bytes

Serialized Buffer Payload: 384 bytes

I was able to make the data 95.5% smaller. This is a deal because it means I can send the data to a lot of people without using up too much bandwidth. Using buffers is an amazing way to make data smaller and i advice you to use it too

here are some benchmarks:

with 35 unique tables only:

Data Load Size Raw Table (Text JSON) Dictionary Encoded IDs Serialized Buffer Payload Bandwidth Saved Encoding Time Decoding Time
1 Item 39 bytes 25 bytes 59 bytes -51.3% (Fixed Overhead) 0.000003s 0.000004s
50 Items 2,074 bytes 1,234 bytes 576 bytes 72.2% 0.000035s 0.000043s
200 Items 8,251 bytes 4,896 bytes 576 bytes 93.0% 0.000137s 0.000186s
400 Items 16,464 bytes 9,794 bytes 576 bytes 96.5% 0.000295s 0.000332s
5000 Items 205,585 bytes 122,289 bytes 576 bytes 99.7% 0.005258s 0.003623s

if you notice the 50 to 5000 is the same size its because of the compression and only having 35 unique so the repeating would turn into a pointer.

with 200 unique tables:

Data Load Size Raw Table (Text JSON) Dictionary Encoded IDs Serialized Buffer Payload Bandwidth Saved Encoding Time Decoding Time
1 Item 39 bytes 25 bytes 59 bytes -51.3% (Fixed Overhead) 0.000003 s 0.000004 s
10 Items 422 bytes 248 bytes 228 bytes 46.0% 0.000010 s 0.000016 s
50 Items 2,178 bytes 1,225 bytes 832 bytes 61.8% 0.000035 s 0.000039 s
200 Items 8,312 bytes 4,877 bytes 2,564 bytes 69.2% 0.000140 s 0.000189 s
400 Items 16,623 bytes 9,753 bytes 2,568 bytes 84.6% 0.000285 s 0.000375 s
5000 Items 207,776 bytes 121,901 bytes 2,532 bytes 98.8% 0.003276 s 0.004365 s

the data shape after dictionary encoding

data shape at start

reddit.com
u/Unique-Willingness15 — 1 month ago

roblox remote numbers to strings

Why does Roblox convert number keys in tables to strings when using RemoteEvents?

For example, if I send a table like this:
{ [51] = "something", [512] = "something" }

It becomes:
{ ["51"] = "something", ["512"] = "something" }

I understand that Roblox uses JSON serialization internally, and JSON requires dictionary keys to be strings. But for some use cases (like syncing large datasets), I intentionally use numeric keys and encode/decode them to minimize network size.

This automatic conversion breaks that workflow.

Is there any way to bypass this behavior, or is it fundamentally unavoidable with RemoteEvents?
(sorry for using ai to make the grammer better but im not an expert in english)

reddit.com
u/Unique-Willingness15 — 2 months ago