Should I use some kind of engine or start from scratch?
I want to learn how to make cool graphics, like lighting, shadows, water, etc. I also want to eventually turn it into a game. Creating a game is second on the list though, and I really want to focus on making good graphics first.
So anyways, what's the best way to go about doing this? I want to use OpenGL 3.0+ because I don't like using outdated stuff, and I MUST be able to transfer the same code between linux and Windows 7 and have it run without changing anything.
I've been looking at trying to start from scratch so far, but I can't seem to find a good way to create an up-to-date OpenGL 3.0+ context that is cross platform. I've been searching all over and trying things like SDL to help be more platform independent, but I've found pretty much everything has different versions on Windows than Linux, so it's pretty much impossible to make it cross platform w开发者_JAVA技巧ithout having to do significant code changes.
So then i started thinking about using some kind of engine. I'm not really sure what I'm looking for in an engine, but I was hoping I'd be able to find one that makes it easy to be cross platform with the same code. I was thinking about using OGRE, but that seems like it takes care of all of the stuff like lighting and shadows for you. Is there any other kind of engine of some sort that'll let me focus on making cool graphics while being platform independent?
Does anyone have any suggestions on what I should do or use?
I've been hacking on a project over the past few years using C# and OpenGL. I originally started with the Tao Framework for the OpenGL bindings, however the Tao Framework is no longer in active development and didn't include new OpenGL bindings.
My most recent work has been on converting the engine over to OpenGL 3, so I've switched to OpenTK (http://www.opentk.com/) which has all the bindings you need for OpenGL 3, and is also cross platform. Currently I develop on Linux (MonoDevelop) and Win7 (VS2010), and my friend happens to be using Mac OS X. We can pass the binaries directly between each other without any problem. So, I'd suggest something like this if you'd like OpenGL 3, cross platform capability and you're okay with using the Mono Framework.
Ogre (http://www.ogre3d.org/) can be configured to use new materials/scripts/etc, so you could write your own shadow shaders, etc.
In my opinion - using OpenGL directly instead of relying on a full featured engine is more fun. However, it's also more trying and you won't see a game develop until you've written the boilerplate code that might be included with something like Ogre.
Good luck!
tl;dr: Check out OpenTK for cross platform mono/.net bindings for OpenGL 3. Ogre is also a good cross-platform engine and you can always create new materials/shaders and experiment without writing the low level code.
Depending on what kind of game you are thinking of, you could use Blender. I haven't used it, but I thought in using it one day. There is an engine in Blender to produce games, for example:
http://www.tutorialsforblender3d.com/
http://colinmaxwell.wordpress.com/2010/08/10/3d-games-with-blender/
http://www.techimo.com/articles/index.pl?photo=60
I finally choose JMonkey Engine : http://jmonkeyengine.org/ . It is a game engine in Java, and by nature it is cross-platform. It has very nice render speed and it is very easy, as it is in Java :)
And about your question, I think it depends on your skills. If you are a master in C/C++ then you could do it from scratch. But why reinventing the wheel? there are pretty good game engines out there (as the ones I posted). That could help you to start right with the design and leave aside many implementations.
精彩评论