135 reputation
6
bio website webskethio.com
location Greencastle, IN
age 22
visits member for 2 years, 4 months
seen Oct 22 '12 at 13:58

I am a start up web developer.

I am familiar with PHP, javascript, the jQuery library, (X)HTML, and CSS.


Aug
16
accepted Should I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority?
Aug
16
comment Should I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority?
let us continue this discussion in chat
Aug
16
comment Should I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority?
@WinstonEwert You might be right, but this runs on phones and tablets as well, and their individual cores are much weaker, every little bit can help.
Aug
16
comment Should I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority?
Yes, thank you for introducing me to Akka.
Aug
16
comment Should I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority?
@WinstonEwert That procedural generation can be easily split among any number of threads, however, by subdividing the chunk into smaller chunks. Now, each task the world updater handles might be small, but all in all it can end up with hundreds of unique objects being updated every "tick", this by itself wouldn't be a problem, but on top of that there are autonomous NPCs that wander using A* pathing and a goal/reward AI system, a physics-based, computationally heavy combat system, natural physics such as flowing water, erosion, etc.
Aug
16
comment Should I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority?
@WinstonEwert I should have specified, my game is 2 dimensional and uses very light BLITing to render scenes and animate sprites. So far I've never managed to get rendering to use up any noticeable amount of processing power. The procedural generation is very computationally intensive, as it generates something like 1200 blocks of terrain based on all the terrain around them and applies all kinds of laws and properties in order to re-factor that terrain into something far more natural. This task by itself can bring computers to a screeching halt in Flash (single threaded).
Aug
16
awarded  Commentator
Aug
16
comment Should I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority?
I had already read the first article you sent me, with the different architecture maps. I was looking at the "Asynchronous function parallel model" as something that was very doable for my game. A lot of the game features such as world updating and procedural generation don't need to be perfectly synchronized. I can save each update and use the most recent completed update to render the world until the next one is available, so nothing gets changed until its new state is finalized. Perhaps this approach might reduce/negate the possibility of inconsistencies. What are your thoughts?
Aug
16
comment Should I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority?
You're right, multi-threading my game world is one giant mess waiting to happen. What I meant when I wrote that the game seems to lend itself well to multi-threading is that there is almost nothing in the game that can't be divided into subtasks. This means it stands to gain massive performance boosts from multi-threading. You are right though, if done improperly I could see this quickly turning into a nightmare.
Aug
16
revised Should I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority?
updated the title to more accurately represent the question, updated to make the preview snippet more relevant
Aug
16
awarded  Editor
Aug
16
revised Should I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority?
updated the title to more accurately represent the question
Aug
16
asked Should I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority?
Nov
23
awarded  Scholar
Nov
23
accepted Which of these algorithms is best for my goal?
Nov
23
comment Which of these algorithms is best for my goal?
This would be a way to improve my current method though.
Nov
23
comment Which of these algorithms is best for my goal?
I think I could optimize the search if I stored the border points in the array in a contiguous order. Currently my mapping algorithm just scans the screen 1 pixel at a time checking if it has any directly adjacent white pixels, if it does, it's added to the array. This results in a rather scattered ordering of the points, but I could run through the array and re-order them based on contiguity. This would allow me to search from the pixel my original line-mapping method comes up with, and perhaps only search the nearest 100 border items, or something of that nature.
Nov
23
awarded  Supporter
Nov
23
comment Which of these algorithms is best for my goal?
Thank you for helping me out! This would probably work reasonably well compared to just pre-defining a static point manually. However the more straight lines along the edge of the figure, the worse accuracy it would have. (Think rectangle. I would still be getting the same results as now.)
Nov
23
comment Which of these algorithms is best for my goal?
because I'm having problems with the border mapping, I might end up doing the raycasting method because I've done some tests and, as I said, I can cast up to 2000 rays per mousemove (this happens so fast that it looks perfeclt smooth even when you're launching the mouse around the page) . I figure that casting maybe 20 rays per side of the line is good, and then doing it again with the new point, repeated until there are no closer points found than the active one.