Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Wouter van Oortmerssen, posted on December 31, 2001




Image Description, by Wouter van Oortmerssen



Yes, this is yet another landscape engine IOTD, but quite a different one this time :)

Cube is my tiny fps game engine project using a very simple design, that does a lot completely differently from most fps engines, for the sake of simplicity. Some of its features:
  • automatic LOD on the whole map allowing for configurable fps / visual quality tradeoff on any hardware.
  • very high precision dynamic occlusion culling.
  • simplistic but effective lighting, that can do dynamic soft shadows & lights.
  • in-engine editing of the world in full 3D, even with multiple people (coop editing, a first!).
  • no map precompilation of any kind needed.
  • simplistic quad-tree world structure, with slopes (heightfields with caps) and slants.
  • collision detection & physics
  • client/server networking
  • multiplayer FPS game (weapons, items, game modes).
  • Feel free to have a run around the game/engine yourself, it is available at http://wouter.fov120.com/cube/

    My goal with this engine, besides having fun programming, was to keep things simple (there is that word again) so that I would actually have the time to make a full game out of it, rather than be stuck with a renderer that looks impressive but takes me 3 years to finish. Other goals were to make it very friendly for map editing, and to implement the kind of gameplay which seems to have grown unpopular in most recent games :)

    If you have any questions, I'll be happy to answer them.

    Wouter van Oortmerssen


    [prev]
    Image of the Day Gallery
    www.flipcode.com

    [next]

     
    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
     
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
     
    Alan Kivlin

    January 01, 2002, 04:51 PM

    Was that doom style strafe running I was doing when running around the levels? :)

    Excellent work Aard!

     
    Hiro Protagonist

    January 02, 2002, 01:07 AM

    Ha ha ha ho ho lol rotfl. Uhh, what was that supposed to mean exactly?

     
    jeti

    January 02, 2002, 03:02 AM

    Well, with a pseudo like that, you should remember SnowCrash
    a bit better. Hiro broke into Rife's cyberspace complex by
    exploiting a bug he introduced with his swordfighting
    algorithms. He 'fell' through the solid wall.

     
    IKillNetwork

    January 02, 2002, 05:08 PM

    It ran on my 533 mgz intel/celeron 4meg vid card(rage pro turbo) 98megs ram at 10-20 fps at 16bit mode

     
    Wouter

    January 02, 2002, 08:54 PM

    absurd: well, I happen to like quake-style fps'es :) I'll try to be original, honest :) Having more "rough" lighting is up to the mappers, really. Most of them seem scared of having dark spots :)

    phk: I will probably turn of those "stats" by default at some stage... does the health/armour display bother you?

    morgan: mostly crashes in SDL_SetVideoMode()... not saying it is an SDL problem.

    Lion_V: I very much doubt cube could ever be commercial, its way too simplistic for that.

    bgl: well, the music, as is most other media is a case of whatever I could legally get my hands on, and as such is variable in quality. This will improve I am sure. marathon/doom/duke3d are all essentially the same generation of engine.. cube has a lot in common with them but is a lot simpler. And yes, I will make moving cubes :)

    Alan: yes, a bug that I left in on purpose :)

    ikillnetwork: cube on your system is totally limited by the 3d card. your cpu could do >100 fps easily :)

    And thanks again everyone. sorry I forgot about the tutorial.

     
    DEVLiN

    January 03, 2002, 07:47 AM

    Finally tried it in multiplayer... what can I say... fast paced, yes... quite ugly characters... yes... fun... YEAH! :)

    Actually... the game was okay before... but after crankin' it up to 1024x768 it became very nice... and after binding my own keys it was suddenly very playable... :)

    I love the fact that rocket-jumps work in Cube as well :) :) :)

    Anyhoo... nice game all in all, and nice engine...

    Why don't you try to polish up the characters, get some larger levels and try publishing it as shareware?

    It's not as profitable as commercial, but it sure is better than nothing :)

    Keep up the good work!

     
    Quasar3D

    January 06, 2002, 09:04 AM

    Looks great!
    But when I look outside a window I see edges in your environment cube. I haven't heard anybody about that yet (or are that T junctions?), maybe it's only there on my computer, if not i have a solution for it. I assume you use 0.0 and 1.0 for your UV coordinates. because textures are repeated when your coordinates are larger then 1.0 or less then 0.0 and
    because you use bilinear filtering, the pixels(on the screen) between the most right texel(= a pixel in the texture) and the most left texel are also bilinear interpolated
    The edges in the sky cube are pixels that have started with wrapping.

    I know 2 ways to avoid this problem:

    this one is the best, but I don't know how to do it in OpenGL.
    in DirectX 7 is it:
    pDevice->SetTextureStageState(0,D3DTSS_ADDRESS,D3DTADDRESS_CLAMP);




    and it means that texture coordinates outside the range 1.0 & 0.0 are set to the colour at 1.0 or 0.0 respectively.
    Maybe you know how to do it in OpenGL, or maybe anybody at this forum knows it.

    this is the second way. the first way is better, but if OpenGL can't do that, you could try this
    Use this values for your UV coordinates
    1/[the with of the texture] instead of 0.0
    and
    1 - 1/[the width of the texture] instead of 1.0

     
    Wouter

    January 06, 2002, 08:33 PM

    thanks again, but I don't think much can be earned from that. I prefer to keep it free, for everyones enjoyment.

     
    Wouter

    January 06, 2002, 08:35 PM

    yup, opengl has texture clamping too, and I am already using it for the skybox. Thus I have no idea why you are still seeing the edges, as I sure don't (looks seamless on my gf2).

     
    Wim Libaers

    January 07, 2002, 06:15 AM

    There is a bug in NVidia OpenGL implementations. GL_CLAMP has the same behaviour as GL_CLAMP_TO_EDGE. Just using GL_CLAMP will result in the borders on correect implementations, but just testing on a GeForce will never show the bug. Try changing GL_CLAMP to GL_CLAMP_TO_EDGE (may be an extension).

     
    This thread contains 70 messages.
    First Previous ( To view more messages, select a page: 0 1 2 ... out of 2) Next Last
     
     
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.