Jump to content
  • Advertisement


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


engine objects

This topic is 5958 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i am new to game programing but very good at c/c++. My question is if ia going t use directx for the render should i create my own classes(lights,mesh,color,etc.....) for the engine. one soul to use many lives to live!

Share this post

Link to post
Share on other sites
DirectX (more specifically D3D (since its what I know a little about)) already provides some of what you may want to use. There are mesh, light and colour objects in d3d8 (as part of the d3dx gear). You can use these if you want, but you don''t have to.
If you use per-vertex lighting then using the d3d lights may be a good way to go. If you''re using precomputedl ightmaps for your lighting then they aren''t that much use, except to keep track of lights which may exist, but not actually provide any support for lighting itself.
As far as mesh classes go, depending on your needs the D3DXMESH stuff may suit you but then again it may not.
Have a look at the DX structures. If they look like you could use them effectively then go for it. Otherwise feel free to write your own - you''ll learn more too.

Also keep in mind that a lot of your engine may not be related to these. If your building an octree/bsp/whatever based engine then of course you''ll have to write classes to support these.
Building an engine takes probably 3 things:
Time, Patience and lots of re-writes and re-thinks about the way you do things.
When writing an engine (I''m still in this process) you''ll throw many things away but will learn a lot from the design / implementation mistakes you made. Eventually one hopes that they''ll get it right.
Go experiment - its the only way you''ll find out.

good luck

Gobsmacked - by Toby Murray

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!