I was wondering how the game handles the skill named Spectral light. It just boggles my mind at every turn, it seems like it'd be impossible to make.
This is the skill in question:
As most of you probably know, you can swivel the skill in nearly a 180 degree range about the player (who acts as the axis). What I am curious about is how the hitboxes, rotation and animation loop code work.
1) Exactly how many 'points' or individual angles can the skill be fired from? For a better illustration of what I am referring to, here is a graphical representation of what I mean by 'points' at which the laser can be fired from.
The animation in question is rather smooth and as such I suspect a large number of points (perhaps around 15-20). Does anyone know for sure?
2) Hitboxes (obviously a normal rectangle isn't going to work for the various angles; did they re-plot a new polygonal hitbox that is associated with every point of rotation, or did Nexon use some other method?
3) Rotation- The actual 'loop' of the laser is 12 frames long. Are there 12 individual pictures in the data for every single 'point' from which Spectral Light can be fired? If this were true, there would be a staggering number of images within the data just for this one skill. Won't the method simply refuse to run/crash/suck up immense amounts of memory and then cause a crash? Does anyone have information on the extracted images within the files? How is this done?
4) Animation loop code- I understand that in Flash you can have an animated image that can be rotated while it loops its animation- however MapleStory is made in C++ and not Flash, so I was wondering how they accomplished this. Say frame 1 plays at point x, when you swivel to point y, how did the coder do it such that the game knows it must play frame 2 of point y and must not start again from frame 1 of point y? From the videos I've watched, the frames are looping as they should as you swivel the laser, and the laser's animation does not re-start from frame 1 when it is swiveled to a new 'point' of firing. How was this accomplished?