To keep anyone who cares up to date on the status of the side-scroller:
I began mapping my objects out today.
My focus at this point is on the actors on my stage. That’s hazards, creatures and the player. This needs a lot of work, and I don’t have all the methods and fields down pat yet. What I’m really focusing on right now is figuring out what is shared between all objects and how they all relate to eachother.
I’ve temporarily made the decision to distinguish against creatures and hazards. At first I had them the same, but when I thought about it, a spike that comes out of the floor isn’t really a creature, and I probably don’t want it to be destroyable at this point. Sure, I *could* give the player the ability to get a “welding” power-up to slice through that metal spike, but I don’t at this point for-see that.
I’m thinking that I’m going to be testing collision first against hazards, and then against creatures. I don’t think I want the bad guys to be able to “hit” eachother, so I won’t test them against eachother (which will speed the game up), but I might want them to be obstructed or effected by hazards, so it will be good that I store them separately.
I went with interfaces for “move-able”, “destroy-able” and “damaging” because hazards and creatures both share these properties.
So what’s next? Well, I still need to flesh all of this out, and then I need to start on the actual “environment”. This will include doors, secret doors, walls, floors, ceilings. I think the whole thing may be “tile” based. I’m not actually sure at this point what my other options are, but we’ll see.
Problems? Collision detection for one. I don’t like “bounding boxes” especially because you are a circle, and it will be very frustrating if you get hurt when you aren’t even hitting something or (if I shrink the box) don’t get hurt if you do hit something. Of course other methods are extremely slow, but I’ll continue looking more into them. I might combine the bounding box method with another method so that you do the “slow” method -only- if the bounding box test comes back positive (If you don’t know what a bounding box is, that’s ok, I plan on making a very detailed post of my solution in the future. It’ll make it all clear then).
Also… slopes… If I’m doing tiling, those are squares. How will I have a sloped surface? I know I could theoretically make a sloped tile, but then how do you quickly do collision detection against that? Again, might have to do the whole bounding box, then slow method for this one.
I need to look around and see how other people address all of this…










