Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Cold Haven

Sign in to follow this  


I recently began development of a 3D Game Engine(Cold Haven).

Progress is kinda slow at this point, and I'm focusing more on the Math implementation now as well as a scripting language for the Engine.

The reason I'm focusing on the Math is mainly to release dependencies from stuff like DXMatrix's, or Glut Matrix's because I have learned from a fellow friend that it is good practice to use your own Math types like Vectors, Matrix's, etc instead of using the ones provided by OpenGL, and Direct X.

This way It's not only possible to port between OpenGL and Direct X, but you can also do a lot of code optimizations by actually doing some of the frequently used Math in Assembly.

At the moment I'm focusing more on Direct X, but as the engine progresses farther I will definitely include the option to switch between a DX and OpenGL renderer seamlessly

I am not the only one coding this Engine. My good friend Renato is developing the scripting system for the engine, and my friend Shawn is helping us get through without any hitch.

Ill be posting code snippets from time to time.

Anyways, Thanks for reading!
Sign in to follow this  


Recommended Comments

Usually your compiler can generate better asm than you can, so its probaly better not to do math operations in asm, I dont think you can optimize them much better than your compiler.

Goodluck and welcome to JL!

Share this comment

Link to comment
Well there are certain things you can optimize.

See..your compiler can only make a few assumptions about your C/C++ code, and at times it may put out crappy assembly code, which of course leaves room for you to make optimizations. Again, I learned this from my friend Shawn.

Pickup an assembly book sometime.

Share this comment

Link to comment
Welcome. [smile]

Are your math operations actually creating a bottleneck? Unless you've profiled and discovered that they're actually impacting performance it's generally better to leave optimisation till later; get something that works well and is clear and easy to understand in place first, then profile and optimise the bottlenecks if things aren't running fast enough. It's also a valid point that a modern optimising compiler is very good at producing optimal code - if you're going for hand written ASM I'd give it a run through a profiler to make sure it is indeed running faster.

That being said, it's a great learning experience to implement some functionality in ASM, and if you're still making reasonable progress and don't mind the increased development time there isn't much reason not to do it.

Since you're focussing on DirectX I assume your engine is for Windows? Any plans to port to other platforms or make additional efforts to write cross-platform code?

Share this comment

Link to comment
Thanks for the comments. And yes eventually it can be ported to other platforms, but I don't know if I will acctualy be doing any of the ports. I have no experience in coding for any Unix/Linux based systems, or MacOS. I could try, but there is no guarantee.

Since alot of the calculations will be independent from DirectX, and OpenGL porting should be relatively easy anyways.

I know pre-optimization is bad, and Im steering clear of it. Im acctualy getting most of the other crap done like input, sound, ect. I have a temporary Math class to work with until it comes time to optimize things.

Share this comment

Link to comment

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
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!