Archived

This topic is now archived and is closed to further replies.

TrevorGdCh

Simp Engine Help!!!

Recommended Posts

Hello all: Ok, so I have the Open GL Game Programming book, and it kicks!!! But does anyone know how I can modify the engine/game -- what is going on here? There are 14 cpp files!!! Do I gotta study ''em all? Anyone else facing this problem? Stuff I want to keep: MD2 model handling Collisions Stuff I want to add: Gun cam [chase camera] Custom levels!!! Sincerely I''ll be wading through this mess while checking for replies ... And when you''''re done, go shoot yourself ...

Share this post


Link to post
Share on other sites
Well, to answer your first question, you probably don''t have to study them all. Alot of the stuff in the SimpEngine is based on what we did throughout the book.

So, MD2 functionality is in md2.cpp and md2.h. I believe the MD2 class is derived from CEntity, which is derived from CObject, but that''s fine since if you''re just modifying the engine to your liking, you''ll want those classes anyway.

Collisions are handled by the objects. This is not necessarily the best way to do things, just as the SimpEngine is not necesssarily the best way to do things, but it''s "simple".

To add a chase camera, just take the current camera implementation and modify it to suit your needs (camera.cpp and camera.h). Maybe a chasecamera.cpp and chasecamera.h.

For custom levels, check world.cpp and world.h. I believe terrain.cpp and terrain.h represent the current world/level implementation.

This is all I can remember at the moment. When developing the SimpEngine, I tried to keep it as easily extensible as possible. Of course, you''re going to have to learn some parts and modify others to suit your needs, but the base framework is there and ready to go.

Kevin

Share this post


Link to post
Share on other sites
Guest Anonymous Poster

Hi:

Thanks for the feedback --

After studying the code I realized it''s not as bad as I thought --

and your reply helps me understand how it''s all put together --

the engine is not a ''mess'' (did I say that?!) it''s just that sometimes my brain is a mess ...!!

I''ve thought about what it would mean to modify the camera class -- could you restrict what it renders to a viewport? Say in the corner of the screen -- that would be ideal!!!

Sincerely



And when you''''re done, go shoot yourself ...

Share this post


Link to post
Share on other sites
I think it is possible to render something into a smaller window. I may be way wrong on this, but I think in order to do that you would need to setup 2 different cameras, and render one to the entire screen, the other camera you would render into a smaller area over the entire screen, for example, do the regular camera and display setup, then set up a different camera that is positioned where you want it to, then define a rectangle, then render into the rectangle for the second camera, now i may be really wrong on this, since i''ve never done this, but that''s the way i think you would do it. good luck.

Share this post


Link to post
Share on other sites