Jump to content


Looking for help


5 replies to this topic

#1 rogerdv

    Member

  • Members
  • PipPip
  • 99 posts

Posted 21 July 2003 - 10:40 PM

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.

#2 Ed Mack

    Senior Member

  • Members
  • PipPipPipPip
  • 1239 posts

Posted 21 July 2003 - 11:20 PM

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:
http://www.koyote.dk...les/iso_max.zip

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:
http://www.xbdev.net...ats/3ds/3ds.php - very good
http://www.the-labs....DS-details.html - basic format
http://gametutorials.com/Tutorials/OpenGL/.../OpenGL_Pg4.htm - Many brilliant loaders source code

http://www.cevis.uni-bremen.de/~uwe/opengl...gl/glOrtho.html - ISO ala orthogranic projection

So, enjoy and learn :)

#3 rogerdv

    Member

  • Members
  • PipPip
  • 99 posts

Posted 22 July 2003 - 02:35 PM

Havent looked at the code yet, but looks nice! Much like what I want to implement. Thanks a lot.

#4 Ed Mack

    Senior Member

  • Members
  • PipPipPipPip
  • 1239 posts

Posted 22 July 2003 - 05:01 PM

You're welcome, but beleive me the links are a million times more valuable. It's imperitive that you learn to do it yourself :)

#5 baldurk

    Senior Member

  • Members
  • PipPipPipPip
  • 1057 posts

Posted 22 July 2003 - 05:25 PM

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.
baldurk
He who knows not and knows that he knows not is ignorant. Teach him.
He who knows not and knows not that he knows not is a fool. Shun him.

#6 rogerdv

    Member

  • Members
  • PipPip
  • 99 posts

Posted 22 July 2003 - 08:15 PM

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*.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users