Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4

Author Topic: C++ Cube based 3D engine: I give up. Starting fresh.  (Read 8446 times)

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: C++ Tile based 3D engine
« Reply #30 on: February 02, 2010, 03:53:04 pm »

Okay, rendering. GLUT goes out, SDL goes in. Which means more rebuilding. I should've started from scratch again  :-[
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: C++ Tile based 3D engine
« Reply #31 on: February 04, 2010, 05:37:09 pm »

SDL is quite awesome by the looks of it. Got 1.2 working, at least.

Of course we'll be using the openGL 3.2 with SDL 1.3 developer libraries, and installing those in mingw/gcc is... a pain in the ass.

Especially since the mingw website was hijacked JUST when I needed it. It's up now, and now configuring msys (which needs fixes) to be able to compile SDL 1.3, to be able to use the new shiny stuff. While that's compiling, I'm doing a rewrite of the engine, using SDL's superior event handling, rewriting the game loop, adding support for more material types than "rock" (How undwarvenly! Who'd need that?) and eventually use GLtransforms instead of moving the viewport, so I'll have to redo most of the camera-turning math again (which needed redoing anyway since 3rd-person view is awesome but hard to do with matrices. Going for the angle approach instead of matrices: more calculation but less math ;) ).

After that, player movement. Then I'll make some screenshots...


Edit: Whoohoo, got SDL1.3 to compile, init, and run! Also made a nifty timer in the game loop, and hope that one day DF will have one of those as well instead of hogging 100% cpu even when paused... ;)
« Last Edit: February 04, 2010, 06:44:31 pm by Siquo »
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: C++ Cube based 3D engine: Compiling SDL
« Reply #32 on: February 21, 2010, 10:51:22 pm »

posting to check it out.  Damn it.  I keep finding interesting things when I'm supposed to be sleeping.
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: C++ Cube based 3D engine: Compiling SDL
« Reply #33 on: February 22, 2010, 03:40:01 am »

Yeah, it's been standing still for a little while. The project was conceived to flex my brainmuscle (that's why I'm taking the hard road), because I was bored at work. Lately, work became more interesting, so this got a bit slower. Started last weekend again though.

Current status: Rewrite of the terrain-engine is mostly done, implemented static VBO's, but now Glew fails to work correctly. And I'd hate to define and lookup all the functions needed for vertex buffers by hand.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: C++ Cube based 3D engine: GLEW is nice. When it works. Which it doesn't.
« Reply #34 on: February 22, 2010, 10:30:13 am »

Also, found a blog by a guy that designed some orbital space-shuttle coupling simulation, who had to be able to draw stuff to the millimeter, in a world the size of the lunar orbit. He had some great ideas regarding openGL, floats, jittering, and precision and still using static VBOs. It was a really easy solution using 2 floats and combining them in the shaders, although it does exceed the default videocard pipeline-size.

However, both the shadercompiler and the VBOs aren't working, so far. In any event the totally relative world-idea went overboard so I'll be able to use static VBOs for the terrain.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: C++ Cube based 3D engine: GLEW is nice. When it works. Which it doesn't.
« Reply #35 on: February 25, 2010, 07:18:15 am »

Awaiting resolvement of my GLEW issue on the OpenGL forums, I rewrote the terrain-navigation again.

Keeping a pointer to every neighbour in every tile was kind of superfluous, as it speeds up crawling but costs more memory, and crawling isn't used that often, and the status of the terraintile is now nicely put in an int, AKA bit-array, using enums. This reduces the number of calls (I can now get multiple statuses by using getStatus(EMPTY | FILLED) ) and the amount of memory, since one bool takes up at least a byte.



Still frustrated at GLEW. I really don't want to define everything by hand...
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: C++ Cube based 3D engine: GLEW is nice. When it works. Which it doesn't.
« Reply #36 on: February 25, 2010, 07:32:49 am »

Are you using GLEW because of the portability features?  That's the main goal of the extension.

How hard was it to move from GLUT to SDL?  Similarities? 
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: C++ Cube based 3D engine: GLEW is nice. When it works. Which it doesn't.
« Reply #37 on: February 25, 2010, 07:42:24 am »

Yes, I'm developing on Windows but want to have it portable from the start. Which is a pain if you've got to do the openGL extensions by hand. GLEE is another option, but I like GLEW's way of calling functions better.

SDL is way more awesome than GLUT. Initialisation is a few more commands, but keyboard handling and event handling is very nice. I took an example from a tutorial that makes a CEvent.h and .cpp with ALL events captured in virtual empty functions, and then you can inherit from that object, and easily override all events you want handled with your own custom functions. OpenGL context creation is simple, but you can't use SDL's own display stuff anymore if you go for OpenGL. GLUT also needs static callback functions for events, and since I do everything with instantiated objects, that was harder implement than SDL's event methods.

And I haven't even touched 10% of what SDL can do, yet.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: C++ Cube based 3D engine: GLEW is nice. When it works. Which it doesn't.
« Reply #38 on: February 28, 2010, 04:50:54 pm »

So, Siquo, where are you right now? Any progress?

Glad you asked, I'm right here:

Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile

Ok, now I get segfaults BEFORE my first statement in main(). Doomed, I say. DOOMED!

Starting fresh.

New install, new source code, new libs, new project.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: C++ Cube based 3D engine: I give up. Starting fresh.
« Reply #40 on: March 02, 2010, 01:52:03 pm »

Hey! sometimes that is the best idea you could have had...

damn, I screwed up with my keyboard configuration, somehow... Hence the lack of apostrophes and the usage of longer english... :P

What are your short term goals now that you have already taken some sort of approach to the problem? 
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

monkey

  • Bay Watcher
    • View Profile

Ok, now I get segfaults BEFORE my first statement in main(). Doomed, I say. DOOMED!

If on windows (visual studio), a thing to check is that all libraries are compiled with the same "Code Generation", those that says Multithreaded DLL (/MD) / Multithreaded (/MT) / etc, i think.
Also, could be that if you have static instances of classes, you can segfault in the constructors.



Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: C++ Cube based 3D engine: I give up. Starting fresh.
« Reply #42 on: March 02, 2010, 04:15:42 pm »

Using Code::Blocks with mingw gpp, but did switch compilers halfway to TDM's gpp (yes there was a good reason). Also had some dynamic libs, some statically linked, switched some of those' major versions, and no clue.  ;D

Starting over is good. A lot of crud had built up, it was a chain of proof-of-concepts that changed and morphed into something ugly.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: C++ Cube based 3D engine: I give up. Starting fresh.
« Reply #43 on: March 02, 2010, 08:49:56 pm »

Yay! I like Code::Blocks, so that makes me happy.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: C++ Cube based 3D engine: I give up. Starting fresh.
« Reply #44 on: March 03, 2010, 03:52:32 am »

I don't really. But the alternatives I tried were worse :P

Of C++, I get the language and most of its intricacies, I get the compiler and what bugs to avoid, but the linker still mystifies me sometimes. If anyone knows a tutorial or explanation somewhere on what the linker exactly does, how and where and when, I'd be much obliged.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))
Pages: 1 2 [3] 4