Original Post
For the record, I am deciding to call my project "Lemming Quest" until I find somthing better, findout it is allready used, or get sued.
Anyways, I have run into some design problems now that I have the ball rolling and I thought mabey If I wrote about them here, It would help me figure out what I need to do, or mabey somone else will have an idea. Please note that this is a C project (newbie). I dont know why you should note that, but err.. lets get down to it:
The ENGINE:
The engine is very simple (reletive to current games) and the design is based on Lemmings for the Nintendo/Famicon (hense forth referred to as LEM). The main difference between my engine, and LEM is the enviroments. LEM used a tile-based engine however, with the huge availiblity of RAM on modern PC''s, I decided to take a more simplistic approach. I just load a scene as one large bitmap. A scene is defined by the program as any part of the level that is considered "solid" and can be destroyed (eg. by a digger or explosion). So, to make a long story short, gravity is calculated by the program by assuming that masked pixels on the scene bitmap are open space and non-mashed pixels areound the base of a lemming are used to determine the vertical movement of a lemming.
The Problem
Anyways, the above idea has been working pretty well and allows for some pretty fluid movement and realistic looking levels with minimal effort
But the first problem I run into is climbing. If I remember LEM correctly, either all walls were vertical or lemmings we unable to climb walls which were not vertical. BUt how should my lemmings handle climbing since the terrain can be so unpredictable? Never in nature would you find a perfectly straight wall to climb. My first level (Just an engine test relly) is geometricly, quite complicated. I have jagged rocks, over-hanging cliffs, ect, ect...
One idea would be to make the lemming "climber" more of a "pro" by equpping him with a long rope with one of those metal hook things. This would work well I think, but Im afraid it might be too attention consuming for Real-time stratedy. To make a single lemming climb you would have to select the lemming, action, and place to throw the hook-rope. Another variation on that idea would be to have a FIXED point (in relation to the lemming) where the hook-rope will always go.
actually, i just figured out the awnser to my problem... thanks for the halp guys. :D
I am going to have an elected climber continue to walk like normal until an obstruction is detected (in the appropiate coordinates) such as an approaching ridge or cliff above the lemming. then the lemming will throw the rope and begin to climb it. when he gets to the top he will turn around and reel in his rope (selfish bastard lemmings) then contine walking in the same direction he started. What do you think?
My only other dillema is.. Should i use a simple animation for the rope and hook being thrown? Or go the more ellaborate route and write a multi segment line tracing routine that draws little (Rope pieces) every couple of pixels tracing along the line. This would allow alot more controll over the ropes movement as it is being thrown whatnot but at the expense of some processor power and extra effort (on my part).
hmmm.... I think I''ll go with the line tracing routine. What''s your guys'' thoughts?
- Twisted Matrix