Comments (4)
Ugh. So, in original game on contact each missile spawns another invisible "bullet" with a predefined lifetime for an each level:
Missile: 10/15/5
Super Missile: 10/14/6
Each frame this "bullet" deals damage to an npc: 1 for missile, and 2 for super missile. Each 3 frames it spawns explosion effect and 2 smoke clouds.
This works fine for lv1 and lv2, however explosions from lv3 missiles for some reason sometime live for another frame, dealing additional dmg.
When shot from a large distance there's large pauses between missile hits and so only one (last) missile deals damage for additional frame. When shot from small distance - two last missiles deal damage for additional frame.
This actually looks like some bug in bullet handling in original game, because there's absolutely no special logic for that in code.
from nxengine-evo.
Oh god, i found it. First of all, frame times above are wrong, they all should be +1 (or not, depending on Pixel's intention)
So: there's an array of bullets. SetBullet adds new bullet to the first found empty slot. ActBullet and HitNpCharBullet just go through this array.
Now, in missile ai calls SetBullet to spawn explosion, that deals actual damage.
Because it's called inside ActBullet loop, if explosion is added to the end of bullet array - it's respective ai gets called on the same frame, thus not dealing damage on this frame.
However, when explosion is added to array somewhere before missile, that spawned it - oops, it's ai is not called on that frame, but only on next one (and on next one it already deals damage, because HitNpCharBullet goes before ActBullet).
Ugh.
from nxengine-evo.
Now, the only problem is i need to somehow reproduce this bug, without completely rewriting how bullets work (they are just objects, without some additional queue)
from nxengine-evo.
Fixed in 8dab4de
Note that sprites.sif is modified.
from nxengine-evo.
Related Issues (20)
- Hitbox: Stuck on Outer Wall after Nemesis
- issues with arabic translation HOT 2
- Where is the widescreen option? HOT 9
- Fullscreen doesn't work well on Wayland
- Bring the Vita port to VitaDB to make it easier to find the game HOT 1
- [Switch] nxengine-evo does not start if /switch/nxengine does not exist
- Fix compiling with GCC 13 HOT 3
- nxengine-evo not looking for game data in present working directory HOT 3
- Add seperate gamepad controls section (suggestion/Feature Request)
- Publish it on flathub HOT 1
- Can't rebind buttons on PS Vita HOT 1
- Unable to find files after going through compile and extraction steps HOT 11
- Asking for 60fps on Vita Port
- I've translated the strings to basque
- Linux AppImage crashes at runtime on Linux Mint 21.3 due to undefined symbol: Mix_PlayChannel HOT 2
- Keyboard controls dont work
- Web port HOT 2
- Make a flatpak and put it on flathub HOT 1
- Framerate hitches when firing (psvita)
- Skip cutscene [feature request]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nxengine-evo.