Thread: Updated space game

  1. #1
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607

    Updated space game

    I've been working a lot recently on the space game I've been wanting to create.

    Here is a screenshot of one of the models in flyby camera mode. The cubic environment map for this sector is not done thus the black space. The model has been unwrapped for texture artists but I'm a bit short on um..texture artists.

    Right now I'm focusing on getting assets into the game and making sure my new resource system works.

    It's come a long way from a year ago. The screenie does not do justice to the rework under the hood.

    If you know of any good texture artists that have spare time (hehe right) let me know.
    Last edited by VirtualAce; 03-12-2011 at 11:41 AM.

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Nice job.

    George Lucas is gonna sue your ass.

  3. #3
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Looks pretty cool.

    If you can't find texture artists you can always "paint it chrome" and environment map it.

  4. #4

    Join Date
    May 2005
    Posts
    1,042
    I'd like more information on the rework since a year ago. Also, is unwrapping the model for texturing something done by Blender, or something you did mathematically?
    I'm not immature, I'm refined in the opposite direction.

  5. #5
    >>Also, is unwrapping the model for texturing something done by Blender

    Blender does this. It used to be bad at it but I understand recent versions have improved support.

    Quote Originally Posted by Bubba View Post
    If you know of any good texture artists that have spare time (hehe right) let me know.
    Heh. My 3D Artist hates doing textures too.

    Maybe its different in motion, but that screenshot looks like you're moving backwards? The stars seem to be stretching in the other direction. Am I on The Pot? And whats the genre of this game, Bubba? Is it one of those fast action, endless enemies, constant forward motion types?
    "There's always another way"
    -lightatdawn (lightatdawn.cprogramming.com)

  6. #6
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    The genre is the same for that as games like X3, Freelancer, etc. The game is much more along the lines of Freelancer but hopefully with a bit more 'life' to the universe. Gameplay will be pretty much mission based where different mission types will be available from the various stations. Each mission will increase/decrease your relationship rating with different factions and also get you some cold hard cash. Also I plan to have pirates and pirate bases. I really don't want the pirates to jump you nearly as much as in other games b/c it becomes annoying fast.

    The main goals for now:
    • Add trade lanes to the sector (2 to 5 days depending on how this is done)
    • Add freighters that follow the trade lanes and dock at various stations (2 weeks - models take some time)
    • Add AI for space combat. I want it fast, furious, and fun. Control of the ship is my number one priority because if it's done wrong the entire game will suck. Also I don't want each encounter to last twenty minutes because that gets tiresome as well. Two evenly matched ships could possibly chip away at each other for about a couple of minutes before one is destroyed. (30 days - this is not a simple task)
    • Add modules/weapons/items to upgrade your ships with. (1 week - models and upgrade system)
    • Create a basic editor that allows placement of hardpoints on models. Prob use MFC or C# for this. Nothing too fancy. (2 weeks)
    • Add static objects to the sector via editor mode (30 days - editor mode is done, all the models are not)
    • Implement dynamic object system that will spawn spacecraft correctly


    I have design docs but they are too extensive to go through here. The ultimate goal here is to create one complete sector that works 100%. After that I can add more sectors later. But once I know one works the rest 'should be' rather straightforward.

    Blender does this. It used to be bad at it but I understand recent versions have improved support.
    As long as you place the seams in the right place the model usually unwraps quite nice. I've found that selecting the edge loop in the middle of the object (Y midpoint - Z on Blender) and making it a seam and then doing unwrap usually works very well. I often cut out the engine, cockpit, and other items so that they can be worked on separately from the hull of the craft. Blender gets a bad rep for it's GUI which does suck. As long as you treat Blender as a non-GUI app and just use key shortcuts it actually does quite well.

    The stars seem to be stretching in the other direction.
    You are looking at the front of the ship. I had another person today tell me it was hard to tell what direction the ship was facing. Perhaps I did not make the cockpit noticeable enough. It is up on the top wing layer and juts out towards the camera. The stars are being rendered correctly in 'this' screenie because this is the flyby camera. I hit the screen capture just before the object flew by.
    Last edited by VirtualAce; 03-19-2008 at 04:54 PM.

  7. #7
    Quote Originally Posted by Bubba View Post
    You are looking at the front of the ship. I had another person today tell me it was hard to tell what direction the ship was facing. Perhaps I did not make the cockpit noticeable enough. It is up on the top wing layer and juts out towards the camera. The stars are being rendered correctly in 'this' screenie because this is the flyby camera. I hit the screen capture just before the object flew by.
    Ah, I see. It makes sense now. I'm sure that when textured, or even when moving, the ship will appear just fine.

    I'm actually working on a very simular project. Not that I've been able to get at it since basically september when I hit school for my Carpentery Red Seal, but I'll be back at it soon. I'm actually also at a very simular stage. And like yours, I'm sure, screen shots just don't do justice to the amount of work involved in simply reaching this stage in a stable state.

    Quote Originally Posted by Bubba View Post
    As long as you place the seams in the right place the model usually unwraps quite nice.
    I actually don't do my own modelling, thank the gods, as I'm quite horrific at it. But my brother is quite skilled and he churns out what I need at a simular crawl to the pace I'm able to advance the code at.

    Keep us updated on your progress. It's making me inspired and eager to return to my own project in a couple weeks when my course is over.
    "There's always another way"
    -lightatdawn (lightatdawn.cprogramming.com)

  8. #8
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    If it's a flyby with a still camera there shouldn't be any effect on the stars since their position and the camera's position is static.

  9. #9
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Hehe Perspective picked up on a fundamental flaw. He is right yet I left the effect in during flyby because for now it's the only indication you have that space is well - space.

    EDIT:

    Problem solved.

    When not moving or in a free-float or flyby camera I use a point list on the first half of the vertex buffer.
    When moving or in object camera or cockpit camera I use a line list and render the entire buffer with numstars/2 primitives.

    The second half of the vertex buffer is computed as I update the first half. This means I only have to iterate half of the buffer to alter the entire buffer.
    Last edited by VirtualAce; 03-20-2008 at 08:32 PM.

  10. #10
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    what would be really cool is if the actual ship had the stretch effect when in fly by mode

  11. #11
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I thought about that and I can easily do it with a skewed matrix but I'm not sure it would add anything noteworthy.

  12. #12

    Join Date
    May 2005
    Posts
    1,042
    wouldn't that obfuscate the normals, forcing you to apply the inverse of that skew matrix to each normal during rendering?
    I'm not immature, I'm refined in the opposite direction.

  13. #13
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Not sure haven't given it much thought really. Now I'm trying frustum culling and the stupid algo is still not working. I've taken code from books, the net, and everywhere and the culling just does not work.

    If I cannot get this simple culling to work I do not have a chance of making this game.
    I feel stupid for sure.

  14. #14

    Join Date
    May 2005
    Posts
    1,042
    Well somebody certainly hasn't eaten their wheaties, out of all of the stuff you've managed to implement I'm surprised you are having troubles with the frustum culling.

    For what types of shapes are you attempting to cull, and why do you think it is not working (object is never culled, culled at inappropriate times?)

    Once you have the frustum planes built correctly actually culling the objects ought to be trivial, so I'm guessing the math for getting those planes may be the issue (i'd like to see the code). As per how I do it (I got this from tutorials), you multiply the modelview matrix by the projection matrix and extract the plane normals and distances and then you must normalize each plane (which includes 'normalizing' the plane distances!)
    I'm not immature, I'm refined in the opposite direction.

  15. #15
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I've got the planes for the frustum. However I had another problem that was causing all AABB's to stay in model space which meant an all or nothing cull. Now that I've fixed this issue (a simple C++ temp object error) the other problem is that most algos are for AABBs and I'm actually using OBBs.

    What I'm going to do is start with an AABB, transform to get an OBB, and use the OBB to create a new AABB. The culling then will be done using the new AABB. If I take the min and max extents of the OBB I can derive a new AABB without re-iterating the vertices. So far I have not had to actually compute the AABBs from vertex data except once during loading.

    And yes to get the frustum planes I get a view-projection matrix and extract from the resulting matrix.

    Here is an example with culling off. With culling on it would cull out nearly everything on screen. I'm researching to find out why. I'm trying to get away with only testing 2 vertices in the AABB to determine if it is in or out.
    Last edited by VirtualAce; 03-12-2011 at 11:41 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Out of space when compiling kernel
    By NuNn in forum Linux Programming
    Replies: 3
    Last Post: 04-01-2009, 02:43 PM
  2. HELP!wanting to make full screen game windowed
    By rented in forum Game Programming
    Replies: 3
    Last Post: 06-11-2004, 04:19 AM
  3. Game Programmer's AIM Circle: Join Today
    By KingZoolerius66 in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 12-20-2003, 12:12 PM
  4. Galaxian or Space invaders for my next game (read this)
    By Leeman_s in forum C++ Programming
    Replies: 7
    Last Post: 11-07-2001, 09:28 PM