Repository navigation
Particle effects Version 1 & 2 - #3520
LizardKing777 wants to merge 8 commits into
Conversation
Both function independently of one another, so if a game was released using either version it should work flawlessly. Got it figured out - V2 particle animations now move at whatever speed the game is moving at, without overloading the vector.
|
some stuff to consider /*
* This file is part of EasyRPG Player.
* ... (license header) ...
* Based on DynRPG Particle Effects V1 by Kazesui. (MIT license)
*/the generated code ignores the license code (my llm rigging of it had it removed to be economical, but it should be manually pasted) Other thing thing, does the v1 and v2 share or repeat code? |
|
Does this code address the non-working fast forward support? When pressing "F" to speedup the Player the particles (e.g. in Deep8) kept the same speed (or even worse: On 120 Hz displays the particles were twice as fast than the rest of the game). This was this "nobody understands the code Kazesui wrote" issue where I couldn't figure out how to split the Update and Draw logic. |
|
As far as I know, the two versions are basically independent of one another, so probably keeping the code separate for now is probably the pragmatic way to go. I added the license info back and got V1 to sync with the acceleration (they were keeping the same speed and calling at the accelerated rate, which was creating a neat but undesirable effect. Basically moving the particles from "Draw" to "Update" - but it's causing a "Vector Substack Out of Range" overload on the V2 particle effects, so I'm going to have to play around with that one a bit more. |
|
Is the particles V2 based on my deep8 code from here? https://github.com/DeepIA8/easyrpg-player-deep8/blob/latest2/src/dynrpg_particle.cpp (Just asking as the simplest way to review it would me doing a diff so I know what I wrote myself) |
|
Originally it was but it's pretty much been completely re-written. Using a compare tool it appears 328 lines were taken out and 258 were added. So I would treat it as its own code. |
|
Could you link the kazesui dynrpg particle v1 source code? It looks like you "ported" it based on the dynrpg plugin but no idea where v1 can be found (I only have the V2 code) |
|
No idea how long this has been sitting in my RPG Maker folder, but here it is! |
|
I cannot see the plugins source code in this folder. That's a game with a DLL |
|
Sorry, wrong zip. Try this one. |
|
Ugh, I forgot to update the CMakeLists.txt file to include the new .cpp and header files. Hopefully this compiles now. |
(Obviously AI assisted) Rename Particle to ParticleV2
…n helper function to match DynRPG loadFromFile better
…lse cases instead of lookup-table + some lambdas and static functions DynRpg: Add another ParseArgs function that accepts an index Now the warnings give the index proper. Fix ODR violation with particle plugin
|
Thanks for your submission. According to my tests this is all working in general. Even the fast forward, yeah. Now the problematic part which is why I'm currently trying to fix but git is complaining: Something is completely messed up here. Besides the whitespacing (which you fixed) somehow also the line ending is incorrect (CRLF instead of LF). No idea how this can even happen considering we have an editorconfig. Afterwards I'll add multiple cleanup-commits to fix inconsistencies, e.g. V2 has a wild mix of static functions, lambdas and if-conditions for the function names. I will unify this and also fix the naming. So mostly refactoring and further checking here. Also the naming conventions are way off but this is to be expected as its directly ported over from the original code. So weird issues + lots of cosmetics. Commits coming soon (tm) |
287d43b to
722cf6a
Compare
…top of everything Not entirely correct as it should be able to render over transitions but this just feels wrong Fix plugin load order
722cf6a to
482a999
Compare
|
Jenkins: Test this please What a mess (and the plugin is pretty complex maybe you should have started with a simpler one first xD). Still no idea how the code of Kazesui actually works and I don't really want to understand it but all my refactoring didn't seem to have broken your code. So I guess this is okay now? Just needs more testing... I only tested with provided sample games which appear to work. Their arent really alot of games using this. Unfortunate considering how cool this plugin is 🤷 . I only see Zelda ToP DX in my list. Well and Deep8 but this uses custom stuff so cant be used for testing. |
|
Thanks for the testing but I'm not sure what you were doing with these commits. I had renamed the files to |
|
Sorry - did not realize you had renamed the files. I'll update them with the fixes I found while I was testing. |
|
It would appear so - my apologies for not seeing that. I'll review what Ghabry fixed in my code and re-test (preliminary testing suggests the Hearts effect in V1 needs another argument but everything else appears to work fine.) |
|
The heart map misses an argument for the rndSpeed. Looking at the original source code there is no range checking at all (only if the effect exists): int index = parsedData->parameters[0].number;
if(index >= 0 && index < effects.size())
{
effects[index]->spd = parsedData->parameters[1].number;
effects[index]->rndSpd = parsedData->parameters[2].number;
}When you don't provide enough parameters it will just read out of range and read garbage data. Though unlikely to crash as the read is not that much out of bounds. To be more precise what happens (asked AI to read the assembler code from DynRPG): When arguments are missing the data is stale. So if there was any command before which filled parameter[2] it will read this stale data here. The real question is: Should this yield a sane default value or emit a warning? |
|
I like the warning - it helps track down issues. I added a second check for effect_speed and that appears to have resolved the problem without breaking anything else. Will begin testing with Zelda: The Trident of Power DX next. |
|
btw you are creating lots of merge commits ( (though don't worry about the messy commit history - this can be fixed before the merge with a rebase) |
|
I recomend Lizard to learn how to use Rebase instead of Merge whenever he needs to download recent updates into his code. |
Fixes the Heart Animation by adding a check for a second argument to the effect_speed code.
9a82ddd to
8b83379
Compare
|
Jenkins: test this please I sent you an invite for the Player team. When you accept all your PR updates will automatically trigger our CI system (= you can see if it compiles and it generates binaries etc) I fixed your mess a final time. Pleeeeease DO NOT try to do any commits here anymore. I wasted again 30 minutes to unbreak the branch. ONLY test, no commits! The code is ready imo. Everytime you add a commit here it somehow breaks my git and I cannot rebase. I had some untracked files right after the checkout. I don't even know how this can happen. I have never seen such an error before in the last 10 years. (I already had the same problem 2 weeks ago with that branch) Especially stop commiting files with Windows line endings (CR LF). Use a text editor that doesn't suck and respects our editorconfig. (Sorry for the rant this shall not demotivate you to contribute. But pls learn how to use Git. At least your other PRs look clean.) |




















Both function independently of one another, so if a game was released using either version it should work flawlessly.