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

Pages: [1] 2
1
General discussions / Re: Distributing a game on Linux
« on: August 20, 2012, 01:47:18 pm »
Once SFML 2.0 is released, it will shortly be part of the official distributions repositories, and most important, it will be stable and backward compatible. So providing your own build of it may cause more problems, in fact.

"shortly" is a variable definition in this case. Debian Wheezy has now been frozen with 1.6 still in place. Derivative distro's (Ubuntu included) will need to package their own sfml 2.0 for it to be included. The maverick arch linux maintainer has had 1.99git included for over a year. Surely bundling the version you want to run is the safe option in this case?

2
General / Building 1.6
« on: October 11, 2011, 02:43:12 am »
Thanks Laurent. I'm so used to typing cmake ./ or .configure, make etc I didn't see the tiny instructions of running just "make install" :)

3
General / Building 1.6
« on: October 04, 2011, 01:01:54 pm »
Hi folks,
Using the amusing power of bullet points I shall explain my predicament.
    * New laptop with ARCH linux on it
    * ARCH only has 1.99git
    * My game needs 1.6 until 2.0 is stable on major distros
    * Download 1.6 SDK
    * Readme points to tutorial on website to build
    * Tutorial on website is for cmake and sfml 2.0
    * There's no CMakeLists.txt in the 1.6 archive.

    No idea how to get 1.6 installed. The archive doesn't hold valid instructions.


Hmm, after reading that back, bullet points may not be that amusing. Love sfml, it's been great so far. Any help much appreciated.

4
General / Bundling for linux release
« on: September 13, 2010, 05:44:40 am »
If I rely on the distro's SFML package then I can't provide a binary in a tar.gz file as I don't know where the SFML libs will be on the users particular distro. Clearly my only real option at this stage is to provide a source bundle and have them build it myself like most linux releases. I always wondered why Linux binaries outside of distro's never were popular and now I can see why.

Thanks for your help.

5
General / Bundling for linux release
« on: September 12, 2010, 12:24:23 am »
Hmm, that´s not going to happen. This is a rough techdemo release and there´ll be fast beta style iterations over the coming year. Ive tried bundling the libs in the current directory but it looks like my compiled (I use cmake on linux) binary expects them in /usr/lib. I presume static compiling is the easiest way to acheive what Iḿ after.

6
General / Bundling for linux release
« on: September 10, 2010, 06:48:51 am »
Hi folks,
Can someone tell me how I should be building my linux game to run standalone on other peoples machines without them having to install SFML separately? I assume this involves either bundling the lib.so files or statically linking. What's the standard way of distributing a release on linux?

7
Graphics / sf::string, newlines and getline
« on: May 15, 2010, 05:24:23 am »
Yeah, silly me. Ta.

8
Graphics / sf::string, newlines and getline
« on: May 14, 2010, 01:03:51 pm »
Hi,
I'm parsing some map files that include a paragraph of descriptive text. I then wish to display this using sf::String and the usual Text processing. In other parts of my game I join strings together like this;

Code: [Select]

str="      "+selectedCreature->name;
str+="\n      "+tool.stringFromInt(selectedCreature->xp);
str+="\n      "+tool.stringFromInt(selectedCreature->strength);


This works fine and the newlines work as intended. In my map file I have some text with the \n's already in it like this;

Code: [Select]

There's been a report of some strange noises coming from a \n
local farm. I request you to investigate. Send a couple of \n
men out there and sort those peasants out.


I read those lines in using getline joining the lines together into one string like this;

Code: [Select]

introText+=line;
getline(mapfile,line);


When I send this string to my rendering it prints the \n's like they've been escaped. introText is a std::string object.

9
General discussions / FindSFML for CMAKE
« on: April 14, 2010, 02:50:33 am »
Osbios,
Also worked great here. Also on Archlinux i686 using Svenstaro's SFML package from AUR. Much better than the previous script too as I can now do a proper find package for individual components. Well done.

10
Graphics / Alpha question
« on: February 14, 2010, 06:55:50 am »
Solved. image.SetSmooth(false).

11
Graphics / Alpha question
« on: February 14, 2010, 05:00:48 am »
This is probably a bit of a n00b question but I'm a bit confused after some tests. I have a png sprite, on top of that I have another png sprite that's a Crosshair. This crosshair is basically a red box with a transparent background. When I render the crosshair over the background the red bit is partially see through and appears blended in some manner. The rest of the alpha channel is 100% clear which is correct. Does this mean the alpha channel under the red bit is set at 50% or something? How do I mask it off completely and only allow just the "erased" bit of my image to show through?

I've been using Acorn to draw the images.

12
General discussions / SFML 1.6 released soon
« on: February 03, 2010, 05:33:50 am »
Any chance of sf::Image.CopyScreen() producing a flippedY image being fixed?

13
Graphics / Improving performance on Netbook
« on: January 27, 2010, 09:25:11 pm »
If I turn off renderMap then the only thing that is drawing is the overlay. This is drawing 3 players (squad based game) which are drawn using last weeks sf::String method. It now shows 0.04 with GetFrameTime so over 20fps. I'll change this routine to sprites as well.

SFML2 isn't an option until a Mac version shows up. I'll implement delta's on the map, get rid of any legacy sf::String stuff, further optimise my own bit of the pipe and it'll probably be acceptable. My main aim at this point is to have the netbook good enough to develop on, rather than actually have users play the game on it.

It would be interesting to see how see how it runs on Windows7 which this machine dual boots with. I'd not be surprised to find some Intel/XOrg driver issues here as well.

Thanks very much for your patience and help Laurent.

14
Graphics / Improving performance on Netbook
« on: January 27, 2010, 12:46:07 pm »
Righty. I now have a nested vector of sprites created once. THen every frame I iterate and draw them. GetFrameTime() shows an average of 0.35 per frame so around 2-3fps.

Code: [Select]

void GfxEngine::createMap(std::vector<std::vector<Terrain> >& mapArray)
{
// this is called once
    mapSprites.resize(MAPHEIGHT);
    for (int i=0; i<MAPHEIGHT; i++){
        mapSprites[i].resize(MAPWIDTH);
    };
for (int n=0; n < MAPHEIGHT; n++){
for (int m=0; m < MAPWIDTH; m++){
   sf::Sprite tileSprite;
            tileSprite.SetImage(tileImage);
tileSprite.SetPosition(m*TILEWIDTH,n*TILEHEIGHT);
tileSprite.SetColor(colorLookup[mapArray[n][m].screenTile.color]);
   mapSprites[n][m]=tileSprite;
        }
    }
}

void GfxEngine::renderMap()
{
// this is called every frame
for (int n=0; n < MAPHEIGHT; n++){
for (int m=0; m < MAPWIDTH; m++){
m_mainWindow.Draw(mapSprites[n][m]);
}
}
}

15
Graphics / Improving performance on Netbook
« on: January 27, 2010, 09:52:00 am »
Ah I have it. Then when the tile changes, I simply change the sprite's image pointer.

Pages: [1] 2
anything