gpus are extremely fast on simple calculations, which is what collision is. a simple compute shader would greatly increase speed, granted that you batch upload easily usable data (hitboxes, positions, entity types) and do sanity checks on the end result, instead of each entity that's being looped.
it's not the distance checks that are the issue, it's the fact that projectiles are collisions are checked every update which then loops through the visible entity lists, performing checks on them. multiplying that by 250 (50*5, 50 projectiles, 5 tps (prod and many pservers), typical for a mbc fight with ally projs off) means that you have to have a 0.0668ms gethit (not counting the rest of the thread, the actual number is likely much lower due to c3d/r3d taking up a big chunk of cpu) if you want to keep 60 fps. that being said, this is mostly an issue for old pcs to compute or if you wish to push fps into the high 200s on newer pcs.
multithreading with workers might be an alternative solution, haven't tried as it looks pretty scuffed. (having to compile separate .swfs and run them in bg)
mentioned optimization ideas both as you said you were working on it past release and also for other people, as people who would go out of the convenience of just using an 'easier' source for fps might also welcome them. also mentioned that going too hard on optimization in flash might not be a bright idea, as at that point you could just port over to unity with nearly the same effort for more fps, tools, support.
I am not optimizing the server source any further as it's no real use to me, it was made only to test out the client, though I'll say that's it is defenitely faster and more stable than the default NR Core, just because it has a lot of things removed. As to me uploading the more optimized client, I could do that, though past what I released here, the changes aren't really that special, it's mostly deleting useless files, code and assets (I got the compiled .SWF to be under 1MB, which is cool), so I don't really think it's worth another release.
ERHRETSHJsrthrth (01-18-2020),LilColossal (04-18-2020)
i can't open the client... i used the 4.6 sdk, but it still not opening... idk why
| Welcome to My Signature |
|Thanks Friends|
| !Daemon Realms Resurrected! |
client gets stuck on "Loading..." before even trying to connect
it's been compiled using flex 4.6, adobe AIR 3.1, swf version 14 in intelliJ idea 2019 1.2 as a flex desktop application with pure autoscript turned off, so don't really know what the issue could be because i have the server set up fine
found the issue. in the task GetCharListTask, it tries to grab something from the URL "/char/list" which seemingly doesn't exist, causing it to hang before most things get loaded because it starts infinitely resending the same request. no idea how to fix this though.
edit: i downloaded redis explorer and it shows that my database is empty. guess it was an issue with the server and not the client. back to the drawing board i guess
Last edited by lelerion; 04-09-2020 at 07:35 AM.
LilColossal (04-18-2020)
Holy... !
I love it, i have been messing around with the server source and making it "complete" for me and my friends to play on locally. Havent had this much fun in ages, its so pretty and stable
Is there any way to add back pets in the client/source combo? I don't need it done ready (would be THE BEST tho), even pointing me out in the right direction will do. I have NO IDEA where to start with.
Top job man! Also i love the resurrection of ammies and THE nexus!
make sure to have the server running when the client is running and switch the order of the loadaccounttask and getcharlisttask in uiconfig.as
also use pure as and target to web if you want to make a flash client instead of an adobe air one (adobe air might require some additional changes to connect, at least it did on nr-core)
copy paste from nr-core (just search it on ******)
I dont think it is as easy as only copy pasting content back in. Client is missing a lot of items regarding pets.
I have a lot of sources to eyeball the code but i have never added this much back into a client/server.
Although the server still has items like -
\wServer\realm\entities\Pet.cs
- im not sure whetever to start with the client or the server. But, i will try regardless. Hoping a _little_ bit more insight or "proof" it works just by copy pasting.
Now that's the good old RotMG I remember. Is there a Vanilla 7.0 PServer up?
Alde is Alde is