I want to start a new game project, but as Im very new with OpenGL, I have some problems creating the engine I want. What I need is an isometric like view and 3ds file loading. I would appreciate if somebody can donate any old testing code or work that i can study or adapt to my needs. I want to use C (not C++). I dont want a full featured engine, simply a couple of files I can add and use in my project.
Also, if somebody feels that have enough time to write it from scratch, can join me.
Here's something I have lying around. I made it on Linux, hence the funny end of lines and the makefile. But, it's SDL + OpenGL so you should be able to compile it ok.
It opens up hut.3DS and displays it in iso (although I'm not using orthgonic projection, as I hate not having some perseptive), it's iso angle anyway
Download my zip here:
This isn't the best code, it's just my first attempt, but it works and is quite well contained to separate files. I have one recursive function that does all the parsing, but I only grab the face and vertex data, nothing else! But the following links show you how to grab the rest.
I'll be changing hosts soon, so download it
Here's sources of info so you can learn these things:
- Many brilliant loaders source code
- ISO ala orthogranic projection
So, enjoy and learn
Havent looked at the code yet, but looks nice! Much like what I want to implement. Thanks a lot.
You're welcome, but beleive me the links are a million times more valuable. It's imperitive that you learn to do it yourself
My advice is to not use the code as a guide at all. Code is a terrible way to learn, as Ed Mack said, you should read up on the theory.
Failing that, use the code as a light guide, and re-write everything yourself. That doesn't mean typing it out again, that means writing it yourself, only referring to the code when you don't understand anything or there's a really tough bug to fix.
Well, that s my method: take code and modify it to see what happens. Currently im planning to rewrite some small parts of Ed s code, mostly create a struct to store the model and see why it hangs with some complex 3ds files. Also some research about how to add picking (that looks hard, forgot to mention Im bad with math) and texturing *submeshes*.