Sign in to follow this  
Maze Master

Modifying big engine (scary!)

Recommended Posts

Hi. For several years I've been kicking around the idea of making a FPS game mod where you can walk on surfaces that are curving around in 3D, like a sphere or mobius strip. I think there could be a lot of possibilities for interesting gameplay with maps that utilize the full 3d-ness of it (you could sneak up literally underneath someone, or something like that). Here is a concept image of what I'm talking about: My background is in applied mathematics, and I love linear algebra and differential geometry, so no problems in that department. However, I don't have experience working with huge codebases like game engines, and it is very intimidating. I'm alright at writing my own small programs and things of that nature, but that is where I write everything and know exactly what everything is and what everything does. The languages I know are python, scheme, matlab/octave, and to a lesser extent c++ and java. I'm not great at any of them (except matlab, I rock at that), and my c++ skills are poor so I'm sure I will be making all sorts of memory leaks and so forth. My question is: How do you wrap your mind around a piece of code as complex as a whole game engine written by someone else? How much work do you think it would take for me to learn an engine and make such a mod? What engines would you recommend? Any other words of wisdom? Thanks!

Share this post


Link to post
Share on other sites
From the sounds of it, not much of what you want to do requires modifying an existing game engine.

A game engine is simply a more abstract tool you build on top of with a more specific and/or concrete idea. The game engine will supply you with rendering support, animation support, camera support, hopefully input device support, and hopefully some other functionality such as collisions and maybe even physics.

Essentially once you have your basics down (i.e. your player character walking around in a basic FPS scheme) it's simply up to you to use what the engine provides to you to create your vision.

Mario Galaxy pretty much does exactly what you describe in terms of navigating the "full 3D-ness of environments", so maybe you could play that for inspiration or ideas.

Share this post


Link to post
Share on other sites
With the game idea, how are you going to keep people from getting sick, like I read somewhere if the screen rotates more than 45 degrees it can make the person sick.

As in halflife 2 on the boat level, I felt very nauseous when the screen rotated, although in jet games I don't have that problem.

..It is a very interesting idea.


Anyway as for engines, you could look at Panda3d, which you can use python with.

Share this post


Link to post
Share on other sites
Serious Sam used that concept in some levels. I remember one room in SS:The First Encounter which was shaped like the inside of a sphere; no matter where you ran, you were always facing down while enemies ran towards you along the "walls". It's an interesting concept; you should be able to use the Serious Engine as is.

Share this post


Link to post
Share on other sites
Serious Sam does have gravity properties for surfaces, so you can make the gravity from any surface 'extend' a certain distance outwards from the surface, and either override or accumulate with other gravity fields.

You could use it as-is. Just have to learn the severely non-intuitive map editor.

Share this post


Link to post
Share on other sites
What would be really fun is to be the guy flying around in that place in some sort of ship, blasting people with your cannons! Don't forget to add that bit.

It would also be interesting if you could fall off those small spindly structures, and just be stuck floating there until you land on something else or someone picks you off.

When you get around to it anyway. I guess all that is a little premature.

Share this post


Link to post
Share on other sites
Quote:
How do you wrap your mind around a piece of code as complex as a whole game engine written by someone else?


Code Reading: The Open Source Perspective. Addison Wesley, 2003. ISBN 0-201-79940-5

really good book on understanding code in the context of which you speak.

Share this post


Link to post
Share on other sites
Thanks all. I will look into Serious Sam, Panda3d, and Code Reading: The Open Source Perspective.

As for the half-life 2 nauseus thing, I felt that too a little, but I think that was more the hl2 engine rather than necessairily the 3d rotation of things. I was also thinking of adding a ship that flies around like theOcelot says, or perhaps jetpacks. That could get some very interesting gameplay, whatwith a player dodging around 3d structures to avoid the ship.

Share this post


Link to post
Share on other sites
Ive actauly studied this "gravity" idea when mario galaxy came out. What I have come down to is that its done using the HAVOK physics engine. And reading alittle into that engine... they called it Welding. (The act of an object being drawn to another)

As for an engine I would recommend HL2 one if you want to make money off it there is a good chance that Valve will help you distrubute it through steam. Second it uses the Havok engine. And lastly there is alot of tutorials and documentation on the engine that will help you through this. As for the welding though your gonna have to read about the HAVOK engine (Ive done that once its perty complex Im currently writing my own physics engine cuz HAVOK was too complex lol)

Ive have writen very simple stuff using the HL2 Engine it can be kinda difficult but with hard work I promise it will definately help your understanding of C++.

As for the getting sick thing. You just need a fixed HUD that doesnt move that the person can focus on. The reason you get sick in the boat section of HL2 is because the cross hair moves with the boat too. You need to have something fixed on the screen that doesnt move at all so the person doesnt get simulation sickness.

Hope that helps.

Share this post


Link to post
Share on other sites
Quote:
Original post by LittleFreak
What I have come down to is that its done using the HAVOK physics engine. And reading alittle into that engine... they called it Welding. (The act of an object being drawn to another)


Havok has nothing to do with this, any physics engine can do it:
- ray cast in the opposite direction of the player's up vector
- align the player's up vector with the hit normal
- rinse and repeat

Share this post


Link to post
Share on other sites
O I fully agree with you agi_shi. I was just saying Havok has the ability already in it. And Mario Galaxy does use Havok. It could save him some work and prevent unexpected glitches because the system would be alot more complex them what you said. He would have to cast rays in every direction find out which object he is closer to and the pull the character towards that. Plus Havok has a weighting system that could how things to have differnt mass. The large object might still pull in a character even if he closer to a smaller on.

Share this post


Link to post
Share on other sites
I am reading the documentation for the Havok physics engine (page 219-221), and it says that welding has something to do with keeping the contact normal vectors correct for an object that is moving while keeping constant contact with other objects (such as a box sliding across triangles in the ground mesh). However, it seems that welding does not actually create any sort of force.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this