trying to make an interactive whiteboard for a 2D game im making. My best idea for now is to just have a part serve as a whiteboard and use spheres to serve as strokes, however this creates a few problems (optimisation, how do i make buckets???, etc etc) So im curious to see if anyone has any better ideas, or if not help me walk through the process.
#Whiteboard
1 messages · Page 1 of 1 (latest)
genuinely though how do i do bucket
i have a general idea of everything else honestly
my only idea for bucket is ricocheting raycasts
but thats just
terrible
please i need bucket fill ideas
You are the bucket
holy shit
What
editable image maybe?
you can use a flood fill for bucket tool
or just store the spheres in a table so you can flood fill
what?
how would i do that
well PERSONALLY (might not be most efficient) i would make like a table inside of a table
where table[x][y] is true or false depending on if theres a sphere
and then for floodfill you just.. do a floodfill algorithm
not sure what a floodfill algorithm is
its like
im guessing you mean saving the sphere and the location of them
yes so you can do a floodfill
basically you start at a cel and check all cells around that
and then repeat for those cells
and so on
i see
do i really need to use tables for that
seems like something like raycast would work
but then you would be doing hundreds of raycasts vs hundreds of table checks
i guess you could use raycasts but i only use them rarely
optimisation issue im guessing?
im just not sure how to use the table method really