Space- Update 5/11/07- page 2.

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
big_o
Goblin
Posts: 279
Joined: Sun Feb 19, 2006 1:08 am

Post by big_o »

Space uses a newer version of the cg.dll than what comes with ogre 1.2.2(can't say about 1.2.3). Try copying the dll from Space or downloading Nvidia's cg sdk and getting it from there. I'm sticking with 1.2.2 for now.

Yes, 56k sucks very badly. It takes me nearly 3 hours just to upload a release.
User avatar
vgmdev
Greenskin
Posts: 110
Joined: Tue Feb 08, 2005 2:58 am
Location: MI, USA

Post by vgmdev »

Well the new dll works. But I get this, maybe the texrues are to blame?

Image
big_o
Goblin
Posts: 279
Joined: Sun Feb 19, 2006 1:08 am

Post by big_o »

I assume this all means that it works fine in my game?

I just downloaded the 0.2b release and discovered that I somehow messed up and put the source in the same zip as the game, but the shader runs fine in the release.

If it works fine in my game and the textures are the same (1 rgb for day, 1 rgb for night, and 1 rg for clouds/spec in that order), I really have no idea what is going wrong.

I won't be able to spend much time on this the next couple of days, but keep me posted. :)
big_o
Goblin
Posts: 279
Joined: Sun Feb 19, 2006 1:08 am

Post by big_o »

Finally got around to getting a web site set up. It is at http://big-o-space.sourceforge.net/index.html. It is my first web site, but I think I have done ok.

I also made a new release today, I have finished up a gui rewrite and fixed up some older code.

pic of the new main menu:
Image

I'm going to start writing some how to docs pretty soon.
User avatar
vgmdev
Greenskin
Posts: 110
Joined: Tue Feb 08, 2005 2:58 am
Location: MI, USA

Post by vgmdev »

Cool! Nice job. Its been a while since I look at this.

Unfortunately, I lost (wipe my drive) my codebase for my little project because xp and my data was a organized mess :(
big_o
Goblin
Posts: 279
Joined: Sun Feb 19, 2006 1:08 am

Post by big_o »

I know the feeling. That happened to me when I was just starting out coding and I completely lost interest in what I was working on.

I'm making some progress, but nothing worth a new release yet. School has got me pretty well tied up right now.
big_o
Goblin
Posts: 279
Joined: Sun Feb 19, 2006 1:08 am

Post by big_o »

I'm back and with a new release!

Links to screen shots [url=http://big_o.byethost7.com//index.php?option=com_easygallery&act=categories&cid=14&Itemid=26]here[/url]
Yes, I know the web site needs some work and the free hosting may have been a mistake, but oh well :wink: .

Be aware that right now D3D works as it should, and OpenGL doesn't.

For example, this simple shader works fine in D3D, but doesn't do a thing in OpenGl.

Code: Select all

void vert(
    uniform float4x4 inWorldViewProj,

    float4 inPos : POSITION,
    out float4 outPos : POSITION,

    float3 uv : TEXCOORD0,
    out float3 oUv : TEXCOORD4
)
{
    outPos = mul( inWorldViewProj, inPos );
    oUv = uv;
}

void frag(
    float3 uv		: TEXCOORD4,
    uniform float time,
    uniform sampler3D map1 : register(s0),
    out float4 oColor
)
{
    uv.z += time;
    float3 base_map = tex3D(map1, uv).xyz;

    oColor = float4(base_map, 1);
}
I am using it to animate the sun through several different frames. I'm assuming the problem is with the volume texture, but don't quite know what is wrong. The texture displays itself fine, but it is static, not changing like it should be.

There are also artifacts in the tech room in OpenGl and the game crashes after shutting down cleanly.

I'm probably going to be spending the next week or so bug-hunting.
big_o
Goblin
Posts: 279
Joined: Sun Feb 19, 2006 1:08 am

Post by big_o »

Figured I should probably post the change notes:

Code: Select all

Rewrote the data file loading functions. The data files can now be stored in multiple sub-folders and multiple files. The paths to the directories to be searched are located in data_paths.cfg. The program will search these directories and load the files found there based on their extension. The only files that have fixed paths are the player file and the gui files. 

I also implemented simple multi-line text for use with the static_text gui element. It is still slightly buggy, but is more or less able to start a new line when the width of the character's in a string exceed the width of the static_text element. It splits words and it doesn't work very consistently though.
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Post by KungFooMasta »

big_o, great looking project!

I haven't tackled creating a multi line text widget using overlay elements, I'm still trying to get the textbox working. :lol:

I might have to take a peek at your code. :wink:

KungFooMasta
big_o
Goblin
Posts: 279
Joined: Sun Feb 19, 2006 1:08 am

Post by big_o »

Just like I posted in the change notes, it doesn't always work as it should, but it works most of the time.

I never could figure out how to read the width of a space character in Ogre so I ended up replacing all the spaces in the string with ~'s and then setting them back to spaces after the string has been formatted to fix the box.

code from Text.cpp:

Code: Select all

 
void Text::setCaption(String caption)
{
    GameSettings* tmpSettings = GameSettings::getSingletonPtr();

    float sumCharacterWidth = 0;

    for (int i = 0; i < caption.length(); ++i)
        if (caption[i] == ' ')
            caption[i] = '~';

    for (int i = 0; i < caption.length(); ++i)
    {
        if (caption[i] == '\n')
            sumCharacterWidth = 0;
        else if (sumCharacterWidth >= data->size.x)
        {
            caption.insert(i, "\n");
            sumCharacterWidth = 0;
        }
        else
            sumCharacterWidth +=  font->getGlyphAspectRatio((int)caption[i]) * 
                                                   data->charHeight * tmpSettings->getAspectRatio() + 0.0004;
    }
    for (int i = 0; i < caption.length(); ++i)
        if (caption[i] == '~')
            caption[i] = ' ';

    text->setCaption(caption);
}
It should work well enough with different screen aspect ratios as well, but there is a little floating as to where the text will actually break and start a new line.

While typing this I might just have figured out a way to do simple scrolling text.
Post Reply