Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Sigvatr

Pages: [1] 2 3
1
General discussions / Sigvatr's Newbie Thread
« on: September 20, 2009, 12:07:45 am »
I'm having issues getting Fullscreen to work in Windows Vista. When I run my SFML app in XP, there are no problems changing to the new screen resolution. On my Vista computer, the application doesn't technically become fullscreen. Instead, it stretches the RenderWindow to the size of the current screen resolution and also includes a title and border.

Here's my code:

Code: [Select]
/* Create window */
RenderWindow *Annihilator = new RenderWindow;
Annihilator->Create(
VideoMode( windowWidth, windowHeight, 32 ), /* Window width, height and color bit depth */
"Annihilator Game Engine Version 0.1.0.0", /* Window title */
Style::Fullscreen, /* Window mode */
WindowSettings( 24, 8, 0 ) /* Depth buffer, stencil buffer and antialiasing level */
);
/* Set window parameters */
Annihilator->SetFramerateLimit( 60 );
Annihilator->UseVerticalSync( 1 );
Annihilator->ShowMouseCursor( 0 );
Annihilator->SetCursorPosition( windowWidth / 2, windowHeight / 2 );
Annihilator->PreserveOpenGLStates( 1 );

2
Feature requests / Batching and other graphical improvements
« on: September 19, 2009, 12:25:43 am »
I'm doing the same thing as you guys and using straight up OpenGL. I'll keep you posted if I come up with any ideas.

3
General discussions / Sigvatr's Newbie Thread
« on: September 17, 2009, 03:07:41 pm »
Alright, I just got confused when you said:

Quote
Like in the OpenGL sample of the SDK, you can use sf::Image to load the image file and then pass its pixels to your own OpenGL texture.

4
General discussions / Sigvatr's Newbie Thread
« on: September 17, 2009, 11:59:19 am »
When I load a .dds using sf::Image, does the LoadFromFile function convert the .dds into a bitmap, or does it load the .dds exactly how it is?

If the latter, what method can I use to load .dds files into memory without converting it into a bitmap?

5
General discussions / Sigvatr's Newbie Thread
« on: September 16, 2009, 09:03:53 pm »
Well, I have estimated that I could take up to 4 years to complete this project, but I have the time and resources to dedicate towards that. Accomplishing difficult tasks is not the reason that I have set such a long time frame for this game, but because I want to pay a lot of attention to detail.

I agree that dynamic and/or random music in the past has mostly been very bad. I've done a lot of research in music theory and I'm taking a completely different approach to procedurally generated music than has ever been tried before. My method is primarily based on Hindemith's theory of dissonant intervals, but I'm still working on the design documents at the moment so it will be a while before I try and implement it.

I already have a rudimentary dynamic music system put in place in the code but it's pretty useless so far because I haven't applied a musical composition model to it yet.

6
General discussions / Sigvatr's Newbie Thread
« on: September 16, 2009, 07:47:01 pm »
Well basically I worked with as a graphic artist with a programmer for over two years to make a game. We split up a couple of weeks ago because we couldn't agree on a lot of stuff, even though the game was getting pretty far into development, and also because he wasn't implementing enough of the features I wanted because he was too lazy. So, not knowing very much about programming at all, I decided to keep all of my artwork and learn how to code the game by myself.

I've only been programming this game for around two weeks now, but essentially I'm creating a game that has already been thoroughly designed and documented over the past few years, so I know pretty much exactly what I need to do to get it done.

That being said, it's a team-based 2d platformer with cross-platform online multiplayer support and a unified campaign that players all around the world can participate and have an influence over. It's actually distinctly different from the game I was working on before, but that's because I have complete control over it this time.

Some of the features the game is going to have:
- Normal, specular and luminescent mapping
- 6 layered parallax scrolling
- A versatile random map generation system, including the ability to randomly generate map graphics. All maps are based on seeds and generated client side, so servers never need to transfer files to players. Maps are stored on the hard drive in image format and streamed into memory when they are needed, allowing for very large, high quality maps.
- Destructable terrain
- World-wide, unified campaign that all players can participate in and have an influence over
- Dynamic, procedurally generated music

Obviously this is an extremely ambitious project, especially for a single person, and especially for someone who has only been using C++ for about two weeks now. However, I've been working on the game for > 80 hours a week since I started working on it two weeks ago, so I've been making fast progress. Also, the fact that I've already for the most part documented the design of this game over the past few years helps me to move ahead quicker too because I already know what I'm supposed to be doing.

We were using Irrlicht before, but I didn't really like it because it was slow and full of 3d stuff I didn't want. I'm using SFML primarily because I want cross-platform capability.

I just want to clear up any misconceptions about me being clueless or strictly a hobbyist. To be honest, I think coming up with your own functional normal mapping shader algorithm within two weeks of learning C++ is a pretty good effort.

7
General discussions / Sigvatr's Newbie Thread
« on: September 16, 2009, 09:56:57 am »
I'm using a streaming method to load into memory only the graphics that I need at any particular time and I want to take advantage of that and squeeze as much detail as possible in there.

Although I'm sure that I can probably just tinker with OpenGL to get the DDS to work?

I'm considering using SFML for all non-graphical things and then trying my luck with doing straight forward OpenGL code for all of the graphics. The graphics capabilities are good for people breaking into programming and making hobby games, but I don't think they are flexible enough at the moment for my needs.

Also, btw, how do I make an sf::Window fullscreen?

8
General discussions / Sigvatr's Newbie Thread
« on: September 16, 2009, 02:40:05 am »
Also another question, I noticed that loading compressed DDS textures didn't have any effect on my VRAM usage compared to any other file format. Is there a way to store and make use of compressed DDS textures in SFML programs? Right now, I think SFML can load DDS files but stores them just the same as any other image.

9
General discussions / Sigvatr's Newbie Thread
« on: September 15, 2009, 11:31:10 pm »
Alright, OpenGL translation has been going good so far, but I would prefer not to have to use PreserveOpenGLStates if I can avoid it.

How can I manage my OpenGL states manually in the code so that my .Draw and .Display don't screw it up?

Cheers.

10
General discussions / animation library, spline, spring, keyframe tool
« on: September 15, 2009, 11:03:32 pm »
In my game, which is 2d, I actually use 3d models which are always displayed from the same perspective, so you can't really tell they are 3d.

11
General discussions / Sigvatr's Newbie Thread
« on: September 15, 2009, 05:34:06 pm »
Until the next SFML version comes out (when is that going to be anyway?), how can I side step this issue of PostFX rendering to the entire screen? Is there any easy edits I could make to the source code, or do you think that I should just manually use OpenGL without the SFML plugs?

EDIT: By the way, everyone who I have sent my program to for testing gets the vertical flipping too.

And here's what my normal mapping looks like in case you're interested:


12
General discussions / Sigvatr's Newbie Thread
« on: September 15, 2009, 03:51:03 pm »
EN9800 GT with latest drivers, XP Service Pack 3, Intel Core 2 Quad CPU Q6600 @ 2.40GHz, 3.00 GB of RAM.

13
General discussions / Sigvatr's Newbie Thread
« on: September 14, 2009, 11:02:44 pm »
Er, I don't know what you mean :/

14
General discussions / Sigvatr's Newbie Thread
« on: September 14, 2009, 10:50:44 pm »
1.5. Yes, I tried that sample. Everything gets flipped for some reason and as far as I am aware there is no way to flip a PostFX object.

15
General discussions / Sigvatr's Newbie Thread
« on: September 14, 2009, 09:15:33 pm »
Haha ok.

What I am concerned about is whether or not this is simply a problem on my computer or some other peoples, so that when I release my game some people will have flipped images and some won't.

MAIN.CPP
Code: [Select]
#include <SFML/Graphics.hpp>
#include "type_conversion.h"

using namespace sf;
using namespace std;

// Normal Mapping Test
int main()
{
    /* Create window */
RenderWindow SYS(VideoMode(512, 512, 32), "Annihilator", 1, WindowSettings(24, 8, 0));
SYS.SetFramerateLimit(0);
SYS.UseVerticalSync(0);

    /* Declare clocks */
    Clock SystemClock;
Clock ClockSeconds;

/* Load System Font */
Font System;
if(!System.LoadFromFile("systemfont.ttf"))
{
return EXIT_FAILURE;
}
String SystemFont("Frame Processing Time: 0.0000ms", System, 15.882f);

/* Load normal map */
Image *NormalMapImage = new Image;
NormalMapImage->LoadFromFile("normalmap.png");

/* Load shader */
PostFX *NormalMap = new PostFX;
NormalMap->LoadFromFile("normalmapping.sfx");
NormalMap->SetTexture("NormalMap", NormalMapImage);
int mouseX;
int mouseY;

// Test area


    // Main loop
    while(SYS.IsOpened())
    {
        /* Receive input */
        Event Event;
        while(SYS.GetEvent(Event))
        {
            /* Escape key pressed */
if( ( Event.Type == Event::KeyPressed ) && ( Event.Key.Code == Key::Escape ) ) { SYS.Close(); }

/* Mouse moved */
if( Event.Type == Event::MouseMoved ) { mouseX = Event.MouseMove.X; mouseY = Event.MouseMove.Y;  }
}
/* Determine light positiong */
NormalMap->SetParameter( "lightPosition", float(mouseX), float(mouseY) );

/* Clear screen */
        SYS.Clear( Color( 128, 128, 128 ) );

/* Render shader */
SYS.Draw(*NormalMap);

/* Render text */
SystemFont.SetColor(Color(0, 0, 0));
SystemFont.SetPosition(3,-3);
SYS.Draw(SystemFont);
SystemFont.SetColor(Color(255, 255, 255));
SystemFont.SetPosition(2,-4);
SYS.Draw(SystemFont);

        /* Render buffer to screen */
        SYS.Display();

/* Reset clock */
if ( ClockSeconds.GetElapsedTime() >= 0.5 )
{
SystemFont.SetText("Frame Processing Time: " + FloatToString( SystemClock.GetElapsedTime() * 1000 ) + "ms");
ClockSeconds.Reset();
}
Sleep( 1.000f / 60.000f - SystemClock.GetElapsedTime() );
SystemClock.Reset();
    }
    return EXIT_SUCCESS;
}


NORMALMAPPING.SFX (this doesn't actually normal map yet, it just renders the original texture)
Code: [Select]
texture NormalMap
vec2 lightPosition

effect
{
    // Get the value of the current screen pixel
    vec4 pixel = NormalMap(_in);

    // ...
    float red = pixel.r;

    // ...
    _out = vec4(pixel.r,pixel.g,pixel.b,255);
}

Pages: [1] 2 3
anything