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 - Xorlium

Pages: [1] 2 3 ... 6
1
General discussions / Re: SFML Game Development by Example - 4th SFML book
« on: February 14, 2017, 02:36:54 pm »
Thanks. I bought it :) Looks good.

2
General discussions / Re: SFML Game Development by Example - 4th SFML book
« on: February 13, 2017, 02:50:48 pm »
I want to buy the new book (it's on sale!) , but I have a couple of questions first:
1. Is it multiplatform? Im on linux.
2. Is it required to have the first book?

Thanks.

3
SFML projects / Re: New RichText class
« on: March 11, 2013, 09:07:38 pm »
Hi,

Nice class. Unicode doesn't work for me (using linux) and I only see squares instead of the normal stuff. I also had to change the end of lines from windows to unix in the source.txt.

Not sure how to deal with that though...

Thanks.

4
General discussions / Cross-platform targeting
« on: February 22, 2011, 07:03:39 am »
You will need to recompile on each platform, no matter if it's dynamic or static.

You can develop in whatever you want, and if you keep an eye out and plan accordingly from the start, it should be very easy to recompile in all three platforms (Just don't use stuff like windows.h)

5
Graphics / Playing .avi et c with SFML
« on: November 29, 2010, 02:05:12 am »
Oh, sorry, I forgot to mention, yeah, you only need ffmpeg shared-dev. It includes all you need.

6
Graphics / Playing .avi et c with SFML
« on: November 29, 2010, 02:03:36 am »
Hehe, I only bashed windows once.

Anyway, in codeblocks, go to Project->Build Options. This opens a window. On the left panel of the window, it should say:
myProject
   Debug
   Release

where "myProject" is of course the name of your project. Click there. Then go to "Linker settings" and then click "Add" and enter "avcodec". Then click "Add" again and enter "avformat". Then click "add" and enter "swscale". This is how you should link to sfml too. So you should also have "sfml-graphics", "sfml-window" and "sfml-system" in there too (and maybe audio and network).

Then go to "Search Directories" and for the "Compiler" tab, add the include directories. For the "Linker" tab add the place where the dll's are.

Xorlium

7
Graphics / Playing .avi et c with SFML
« on: November 28, 2010, 08:27:36 am »
Hi,

I assume you are using windows (since on linux it's super-easy, as usual). (If you don't know what you are using, or don't know what an operating system is, then you are using something called "windows".)

To install ffmpeg, you must download the "shared-dev" package from here: http://ffmpeg.arrozcru.org/autobuilds/

Make sure you download the shared-dev.

To make it even easier for you, for win32, it's here:
http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/mingw32/dev/shared/

and for win64, it's here:
http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/mingw-w64/dev/shared/

If you don't know what you are using, you are using windows 32.

Then download it and uncompress it, and put the .dll's in either your directory or somewhere, and then tell visual studio or codeblocks or whatever IDE you are using where they are. Also, tell it where to use

And finally, if you don't want to deal directly with ffmpeg, Celyo's sfml video player is pretty good:
http://www.sfml-dev.org/forum/viewtopic.php?t=3463

Or if you just want image, and no sound, you can use mine, and you use it just like you would use an image:
http://www.sfml-dev.org/wiki/en/sources/video_integration

I'm a geek, so maybe I can't write tutorials :) If so, I apologize.

8
Graphics / Can't load image in loadfromFile
« on: November 26, 2010, 07:12:35 pm »
I don't think it's the directory. If it was, the program would return 5, because sfml wouldn't have been able to load the image.

Have you tried with other types of images?

9
General / Window Movement
« on: November 24, 2010, 07:21:41 pm »
Oh, I see :)

I know what Qt is (I didn't know it was called Qt and not QT), but I didn't know what "window manager" meant. I thought window manager was what Qt or wxWidgets or GTK is (I fully expect someone to now say those three are completely different things, but I think they are the same thing :))

Xorlium

10
Graphics / Combining two or more shaders?
« on: November 24, 2010, 07:14:03 pm »
Hi,

Is it possible to apply two different shaders to the same sprite/image?

Something like App.Draw(Draw(mySprite, shaderA), shaderB); (I know that's not proper c++ notation)

Thanks,
Xorlium

11
General / Window Movement
« on: November 23, 2010, 08:30:19 pm »
Ah. Okay then. But I think Hiura was refering to the window manager. I don't think QuickTime has the feature Mr_Gnome was asking for :)

12
General / Window Movement
« on: November 23, 2010, 08:13:49 pm »
No it doesn't! QT is this: http://qt.nokia.com/products/

QuickTime is this: http://www.apple.com/quicktime/

See? Different things. QT is a very good window manager. QuickTime is one of the worst video players there are :)

Xorlium

13
Graphics / Transparency Gradient
« on: November 18, 2010, 01:30:11 am »
No, no, what (s)he is asking is different from what you guys answered.

What you want is a perfect example on when to use shaders.

The shader should be something like this (I'll be overly verbose for clarity. You might want to do it all in a single line)

Code: [Select]

uniform sampler2D current; //set this to sf::Shader::CurrentTexture as explained in the tutorials

void main()
{
  vec2 thisposition = gl_TexCoord[0].xy;
  float alpha = thisposition.y;  //this is the y coordinate, from 0 to 1
  vec4 pixel = texture2D(current, gl_TexCoord[0].xy);
  pixel.a = alpha;
  gl_FragColor = pixel;
}

14
General / Best way to load the same image multiple times
« on: November 18, 2010, 01:19:02 am »
Yeah, I know static wouldn't be very extensible, but that's exactly what this person asked at the beginning, (s)he wanted the same image to be shared by all the bullets. I just pointed out that if you want some data to be shared between all objects of a class, you make it "static".

If it's a big project, then yeah, you need one. But if it's for a homework that's due tomorrow, and you don't want different bullets to have different images, whatever, why not?

Xorlium

15
General / Best way to load the same image multiple times
« on: November 17, 2010, 06:02:22 pm »
You could also make the image static, so it's shared by all the bullets. This is assuming nothing else will use that same image.

Code: [Select]

class wBullet
{
    int speed;
    double x,y;
    Sprite bullet;
    static Image bHolder;
    wBullet();
};


And then in the cpp file (and this is important) do something like this (not in any function)

Code: [Select]

Image wxBullet::bHolder;


and then in the constructor for wBullet:
Code: [Select]

wBullet::wBullet()
{
  static bool hasImageBeenLoaded = false;
  if (!hasImageBeenLoaded)
  {
    Image.LoadFromFile("myfile.png");
    hasImageBeenLoaded = true;
  }
  //other stuff
}

Pages: [1] 2 3 ... 6