#Efficient table equality checking

1 messages · Page 1 of 1 (latest)

wispy garnet
#

So i'm making a cache system to optimize server->client recieved kb/s. I need a cache system because my game is planned to be very dynamic (new VFX being generated on the fly), and the idea is that the server has an array of up to 255 items (8 bit number since storing 65,536 items would be wayyy too much for roblox's potatoes), and whenever the server gets a new cache item it just sends it to the client where it is also cached. For every cache item, a 5 minute timer is set, and if it's not pushed out of the array before the timer's up, the item is deleted.

Problem? many operations will require searching through the whole cache and then searching to see if two tables have equal values. And if I've learned anything from recreating wolfenstein 3d like 5 times, it's that if statements can be pretty expensive.

So I need some efficient method of searching through the entire cache to find a table that's equal to a given table.

granite lotus
#

why

jaunty badge
granite lotus
#

why would u even wqnt procedurally generated vfx too

jaunty badge
little cloud
#

hashtable

#

also 255 dynamic items probably aint enough

wispy garnet
wispy garnet
granite lotus
wispy garnet
#

just limited it to an 8 bit number

#

16 bits is a lot

#

and i dont want to make every possible vfx manually

#

esp when i can just throw a couple numbers together and be done

granite lotus
#

ok but like

#

why would u need that many variations of vfx

#

can't you just take a number and multiply the emit count or size or wtv

wispy garnet
#

and thats what i plan on doing

#

only thing is, that’s like a kilobyte of data

#

and for a fast and dynamic shooter that can add up