Felik Posted October 10, 2007 Report Share Posted October 10, 2007 Hello. Here is a tutor (or kinda) on how to imperfect the edge detection in 360 degree engine. I’ve posted it here because I’d like see Sonic Worlds as ideal sonic engine as possible. First of all here are sensors that are used to achieve that effect. 1. Sensor left 2. Sensor top 3. Sensor right 4. Sensor platforms 5. Off edge sensor left PLATFORMS (see explanation 1) 6. Off edge sensor right PLATFORMS (see explanation 1) 7. Sensor allow left (see explanation 2) 8. Sensors allow right (see explanation 2) 9. Sensor slopes 10. Sensor inner left 11. Sensor inner right 12. Sensor bottom (see explanation 3) 13. Off edge sensor left (see explanation 4) 14. Off edge sensor right (see explanation 4) 15. Off edge sensor middle (see explanation 4) Explanation 0 Sensors 1, 2, 3, 4, 7, 8, 9, 10, 11 are common sensors that are use in almost every 360 engine so I hope I shouldn’t explain their purpose. Explanation 1 Sensors 5 and 6 are used ONLY for moving platforms in this way: Explanation 2 I’d like to explain their shape because I think you’ve accustomed to see them as two horizontal lines that turn depending on character’s angle. I had to do this because of a very annoying bug in MMF2. This bug is that when object’s angle is 90 degrees and degree changing is triggered by fastloop it just disappears. You’ll ask: “Why don’t you use MMF’s standard 32 directions?” That’s because when character is running on a tight slope with high speed he just falls off them like that: That’s why I just use circle shape. Explanation 3 I think you’ve noticed that bottom sensor has a square shape. Actually it changes its shape from square to circle. When angle equals 0 degrees it is square, the rest time it is round, I’d made this to prevent this: And this is how it really works: Explanation 4 Sensors 13, 14 and sensor 15 (my invention) are REAL off edge sensors. Mechanism is very simple. When sensor 14 is colliding and 15 is not or conversely and sensor 15 is not colliding then it is edge. Treat is that sensor 15 can definetly tell us that we are standing on (or landing on or jumping off) straight surface. Some screens: Sensors 13 and 14 can also detect pseudo edges. For example if sensor 13 is colliding and sensor 14 is not or conversely and sensor 15 is colliding then it is pseudo edge. Pseudo edges differ from normal edges that when character stands on them, his animation changes to off edge animation but when he jumps from it or lands on it, they lead themselves as common slopes. You see, concept is very simple but it has a very strong effect. I also attached the MMF2 application to prevent any questions. P.S. I'm using that http://sfghq.emulationzone.org/view_info.php?sec=4&id=88 engine. Link to comment Share on other sites More sharing options...
Felik Posted October 10, 2007 Author Report Share Posted October 10, 2007 here is mfa How to do.mfa Link to comment Share on other sites More sharing options...
Kain Posted October 10, 2007 Report Share Posted October 10, 2007 Interesting sensor setup. Personally, I handle most of this stuff in my angle detection methods, however the way MMF handles loops, it is probably easier to have sensors #13/14. One thing bothers me about example #4, though. You say psuedo-edges are detected whenever one of sensor 13/14 are coliding and not the other (and 15 is), where a psuedo-edge is one where, when you jump on it, it'll convert your speed like normal and have you jump off. How do you check for the angle of the psuedo-edge? And if you have a method for checking the angle, why would you need to differentiate between an edge and a psuedo-edge? Is it some angle technique that screws up on flat surfaces? I'd love to see what you have in motion, because landing on 'psued-edges' as you call them is something that's bothered me for quite a while. Also, I don't really love the differentiation between angle = 0 and angle = ±1, etc, but I suppose it's fairly useful in practice. But #2 seems like a nice bug fix (not too familiar with MMF2 bugs, but if that solves that problem, great). The other 2 seem very minor and aesthetic, but I suppose any little thing towards the presentation counts. Link to comment Share on other sites More sharing options...
Donchi_The_Racoon Posted October 10, 2007 Report Share Posted October 10, 2007 Um, where is the MMF2 application, i can't see it. Link to comment Share on other sites More sharing options...
Felik Posted October 10, 2007 Author Report Share Posted October 10, 2007 Um, where is the MMF2 application, i can't see it. You are blind How do you check for the angle of the psuedo-edge? The answer is simple, I don't. This is somethig that I can't program without cracking the other code. But actually I don't want. I can explain. For example you jumps off 20 degree edge but engine thinks that it is for example 40 degrees (because there is alway a little slope at the most edge of edge ) but actually you don't notice this because you DON'T jump straight upwards and you don't notice this ±2 speed values. The same story is when you land on them. Link to comment Share on other sites More sharing options...
Donchi_The_Racoon Posted October 10, 2007 Report Share Posted October 10, 2007 I don't see the application, is it attached somewhere? Link to comment Share on other sites More sharing options...
Ayling Posted October 10, 2007 Report Share Posted October 10, 2007 DONCHI! here is mfa[ATTACH]505[/ATTACH] I wanted my 100th post to be epic, but I'll cater to the blind instead. I should derep you for acting blind, but sonic in brawl temporarily made me too nice. Link to comment Share on other sites More sharing options...
Donchi_The_Racoon Posted October 10, 2007 Report Share Posted October 10, 2007 That's not an application that's an mfa or source file. And i thought you where going to show us what you showed in the pictures? Link to comment Share on other sites More sharing options...
Ayling Posted October 10, 2007 Report Share Posted October 10, 2007 Thats the engine. Open it in mmf2 and view the events. Need less complicated help? I'll use spanish if you still don't get it. Link to comment Share on other sites More sharing options...
Slingerland Posted October 12, 2007 Report Share Posted October 12, 2007 DONCHI!I wanted my 100th post to be epic, but I'll cater to the blind instead. I should derep you for acting blind, but sonic in brawl temporarily made me too nice. And I should de-rep you for being an asshole, but you didn't do it, so... Link to comment Share on other sites More sharing options...
LarkSS Posted October 12, 2007 Report Share Posted October 12, 2007 That's not an application that's an mfa or source file. And i thought you where going to show us what you showed in the pictures? He did. >_> He included the events and objects that perform the actions he went over, just not built into the actual Sonic Worlds engine as it wasn't necessary. Link to comment Share on other sites More sharing options...
Felik Posted October 17, 2007 Author Report Share Posted October 17, 2007 I'd like to see what do Damzien and/or DW think on it. Link to comment Share on other sites More sharing options...
Recommended Posts