Through numerous tests I've concluded that a fairly serious bug exists (at least for RPG makers). In an earlier build of the engine, I believe that when you assigned a group of objects (or one object reference with multiple locations on your game) a command (for example, if X collides with Y, X dies) it would stay specific to the affected object. For some strange reason, it's not working for what I'm trying to do. I just ran the exact test in the example I provided and it worked as it should. Yet in my actual application I'm building it's bugged. I'm trying to do a fairly simple occlusion system in a 3/4 sideview RPG game. First I tried this:Vice versa for >. Keep in mind that the Hot Spots for these two objects are correctly placed where they should be (at the base of the object). I then created two Counter objects. I set one to display the Y coordinate of a wall, and the other to display the Y coordinate of the player object. I then used pretty much the same code, except with the two counter values instead of Y positions. It worked. Keep in mind, though, that I had put a wall out to test. I created a new wall, I didn't move a previous one... So I thought to myself, well, maybe Y coordinate comparison is bugged, so I assigned Alterable Value A of both the player and the Foreground Scenery (which is the group of all the wall objects) to contain their respective Y coordinates. I then tried the same command with alterable values, and it didn't work. However, I had noticed something interesting. The Wall object which responded to the order changing was always the top one. Thus, when I tried on one wall, it would work only once, then switch to the next highest-ordered object in the frame. This is rediculous. How can I make an RPG if a simple occlusion system can't even work?Code:If Y Position of (Foreground Scenery) < Y Position of (Player), move (Player) in front of (Foreground Scenery)
PS: Thinking a little more about this, I'd then have to program the same effect for enemies as well. They 'order behind' and 'order in front' commands would likely conflict and cause issues. Is there an entirely different way to go about the occlusion system?
Edit: Apparently I had an 'Only one action when event loops' which was messing things up. There's still an occlusion bug unless I have them on the screen ordered from top to bottom in ascending order. Wierd... anyways, I know I'm going to run into serious problems with occlusion when I get to enemies. To be honest, though, does it even matter? After all, if an enemy is fighting me, occlusion can be cool graphics but generally will probably just get in the way (unless its short fences etc). Maybe I should only use occluding objects when they cannot be walked in front of (bridges, fenced-in platforms, etc). Still, it'd be nice to know if there's a good occlusion system with multi-action-object support (player + enemies + possible second player etc). I'll need the ability to do that for occluding enemies and players together. Walking on the ground and then suddenly on the enemy's head is sloppy to say the least :p




Reply With Quote