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

Author Topic: Sigvatr's Newbie Thread  (Read 21263 times)

0 Members and 1 Guest are viewing this topic.

Sigvatr

  • Newbie
  • *
  • Posts: 32
    • MSN Messenger - msn@sigvatr.com
    • AOL Instant Messenger - SigvatrAIM
    • View Profile
    • http://www.sigvatr.com
Sigvatr's Newbie Thread
« Reply #30 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:


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Sigvatr's Newbie Thread
« Reply #31 on: September 15, 2009, 05:44:54 pm »
I think you'd better use OpenGL directly. You can clone the PostFx class and adapt its Render function, it should be easy to do ;)
Laurent Gomila - SFML developer

Sigvatr

  • Newbie
  • *
  • Posts: 32
    • MSN Messenger - msn@sigvatr.com
    • AOL Instant Messenger - SigvatrAIM
    • View Profile
    • http://www.sigvatr.com
Sigvatr's Newbie Thread
« Reply #32 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.

Sigvatr

  • Newbie
  • *
  • Posts: 32
    • MSN Messenger - msn@sigvatr.com
    • AOL Instant Messenger - SigvatrAIM
    • View Profile
    • http://www.sigvatr.com
Sigvatr's Newbie Thread
« Reply #33 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Sigvatr's Newbie Thread
« Reply #34 on: September 16, 2009, 08:52:27 am »
Quote
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?

There's nothing more to do than what PostFx does (reset current fragment program and textures on units > 0).

Quote
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.

You're right, and there's currently no way to use compressed textures in SFML. Do you really need it?
Laurent Gomila - SFML developer

Sigvatr

  • Newbie
  • *
  • Posts: 32
    • MSN Messenger - msn@sigvatr.com
    • AOL Instant Messenger - SigvatrAIM
    • View Profile
    • http://www.sigvatr.com
Sigvatr's Newbie Thread
« Reply #35 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?

K-Bal

  • Full Member
  • ***
  • Posts: 104
    • View Profile
    • pencilcase.bandcamp.com
    • Email
Sigvatr's Newbie Thread
« Reply #36 on: September 16, 2009, 10:16:39 am »
Quote from: "Sigvatr"

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


Give the constructor of sf::RenderWindow for the third parameter a sf::Style::Fullscreen.
Listen to my band: pencilcase.bandcamp.com

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Sigvatr's Newbie Thread
« Reply #37 on: September 16, 2009, 10:46:07 am »
Quote
Although I'm sure that I can probably just tinker with OpenGL to get the DDS to work?

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.

Quote
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.

Can you describe the kind of project you're working on? I'm curious :)
Laurent Gomila - SFML developer

Sigvatr

  • Newbie
  • *
  • Posts: 32
    • MSN Messenger - msn@sigvatr.com
    • AOL Instant Messenger - SigvatrAIM
    • View Profile
    • http://www.sigvatr.com
Sigvatr's Newbie Thread
« Reply #38 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Sigvatr's Newbie Thread
« Reply #39 on: September 16, 2009, 08:45:20 pm »
Quote
Obviously this is an extremely ambitious project

This is exactly was I was going to say after reading the list of features ;)

Quote
especially for someone who has only been using C++ for about two weeks now

:shock:
If you really succeed to make this game then... WOW.
Laurent Gomila - SFML developer

Spidyy

  • Sr. Member
  • ****
  • Posts: 493
    • View Profile
Sigvatr's Newbie Thread
« Reply #40 on: September 16, 2009, 08:50:50 pm »
It will take several mounth.. Maybe years to complete, but the result will be awesome. Cheers. =p

Quote
- Dynamic, procedurally generated music


I'm not fan of the generated music. :( One only and single music is, I think, greatly better to listen than generated. Even if it don't apply to the action, having one great musical theme is better than stop randomly played instrumentation (For exemple : Dark Age of Camelot) or channel-separated played music (Unreal Tournament 3) =p

It is my opinion.

Sigvatr

  • Newbie
  • *
  • Posts: 32
    • MSN Messenger - msn@sigvatr.com
    • AOL Instant Messenger - SigvatrAIM
    • View Profile
    • http://www.sigvatr.com
Sigvatr's Newbie Thread
« Reply #41 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.

Sigvatr

  • Newbie
  • *
  • Posts: 32
    • MSN Messenger - msn@sigvatr.com
    • AOL Instant Messenger - SigvatrAIM
    • View Profile
    • http://www.sigvatr.com
Sigvatr's Newbie Thread
« Reply #42 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Sigvatr's Newbie Thread
« Reply #43 on: September 17, 2009, 03:04:32 pm »
I think I already answered this question, didn't I?

Quote
Quote
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.

You're right, and there's currently no way to use compressed textures in SFML
Laurent Gomila - SFML developer

Sigvatr

  • Newbie
  • *
  • Posts: 32
    • MSN Messenger - msn@sigvatr.com
    • AOL Instant Messenger - SigvatrAIM
    • View Profile
    • http://www.sigvatr.com
Sigvatr's Newbie Thread
« Reply #44 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.