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

Pages: 1 ... 8 9 [10] 11 12 13
136
SFML projects / Danmagine
« on: May 14, 2010, 01:54:55 am »
Quote
If you're using SFML2, can I ask on which OS you compile your programs?


I'm still on 1.6 sorry. I fear change.

137
SFML projects / Danmagine
« on: May 13, 2010, 01:50:32 am »
Runs fine for me, it crashes on exit though, but I'm rockin it ATi style, lol. None of my own SFML programs crash though.

I look forward to this being finished so I can make some danmagic!

138
General discussions / getting colour from a sprite?
« on: May 12, 2010, 06:57:34 am »
I was doing something similar recently trying to get some destructible terrain happening, although I was reading directly from an image.

Code: [Select]
for (int x = 0; x < 1024; x++)
    {
        for (int y = 0; y < 768; y++)
        {
            if (terrainImage.GetPixel(x, y) == sf::Color::White)//if pixel is white
            {
                terrainArray[x][y] = 0;//acts as nothing
            }
            else if (terrainImage.GetPixel(x, y) == sf::Color::Green)
            {
                terrainArray[x][y] = 1;//acts as normal land

            }
            else if (terrainImage.GetPixel(x, y) == sf::Color::Black)
            {
                terrainArray[x][y] = 2;//indestructible pixel
            }
        }
}


I then later used the array as a reference to build an image/sprite pair that would be displayed. I used this method so I could make each separate area (sky, normal ground and rocks for indestructible bits) look a little more interesting by colouring each pixel semi randomly.

I think that should help. Feel free to ask for more if you want.

139
Graphics / Bad Huffman Compression
« on: April 28, 2010, 05:42:48 am »
PNGs use DEFLATE which uses huffman coding to compress data. I think JPEG also utilises the Huffman algorithm at some point.

When you say "occasionally", do you mean occasionally on a particular image, or occasionally you have one image that wont work and you can replace it and it works?

What do you use to create images?

140
SFML projects / Mappy tilemap engine playback library port for SFML
« on: April 27, 2010, 05:36:09 am »
Sorry, Ashenwraith, I though you were suggesting witchdoctor switching to Tiled.

I did like the look of Tiled, but with no example code for me to dig in to straight away, I went with Mappy. If someone wants to port Tiled to SFML, I'd certainly use it :)

141
SFML projects / Zion (tactical RPG)
« on: April 26, 2010, 03:43:48 am »
Looks promising, I'm liking the visual style so far.

A high level suggestion: combine orient into the move command. When you want to move, "draw" the path from the character for him to follow.

142
SFML projects / Mappy tilemap engine playback library port for SFML
« on: April 26, 2010, 03:28:49 am »
Tiled is good, but this is the SFML Mappy thread. Placing objects with Mappy really isn't very difficult to work out. AFAIK, Tiled doesn't already have map loading code for SFML.

I don't think switching to Tiled would be a good move at this stage, you're bound to run into just as many issues with that plus you would have to rewrite everything.

143
SFML website / Site often appears down
« on: April 22, 2010, 04:33:22 am »
Reload works fine for me too. I do occasionally have a thread that will just hang while loading, a quick refresh fixes that though. It's only when I open several threads in tabs at once.

144
Feature requests / SFML on Android using NDK?
« on: April 21, 2010, 08:50:11 am »
I think the "NDK" allows you to use C/C++.

I guess an early thing to do would be learning OpenGLES, if you already know OpenGL it shouldn't be too hard but I'm not entirely sure on the differences. I think I recall hearing that the NeHe tutorials got ported to Android.

I'm just thinking that porting SFML to a platform like this might end up being very different code/written from scratch and maybe you should look at just borrowing some code from SFML rather than porting it.

145
Window / Text box in SFML ?
« on: April 20, 2010, 02:35:31 am »
Sorry, I completely misread. I thought you were after a message box type thing.

TextEntered is the closest thing to a text box that SFML has. Like gsaurus said, it depends what you need it to do.

I just looked in the wiki, cpGUI has a text box object, but like I said I haven't really checked it out yet.

146
Window / Text box in SFML ?
« on: April 19, 2010, 07:35:48 am »
SFML doesn't include anything like that. Windows message box would work, but I would recommend using Qt for cross-platform goodness :)

There is also some sort of GUI thing in the wiki I believe, but I haven't looked into it.

EDIT: Come to think of it, you could just make a new window. Make your own buttons etc. Probably could even encase this in a class and have it return whatever based on which button was pressed, sort of like windows MessageBox.  :wink:

147
General discussions / Which language to use?
« on: April 16, 2010, 11:08:29 am »
std::cout is fine until you want to use something like sf::String and have numbers to print to it. I imagine this is what kolofsson is trying to do.

As pdusen said it's not that hard anyway, although it is a little bit more difficult than string += someInt;  :lol:

148
General / No executable ?
« on: April 16, 2010, 04:50:39 am »
If nothing else works you could always start a fresh project and drop your code into it.

149
General discussions / Which language to use?
« on: April 15, 2010, 02:58:23 am »
If you are going to be coding in Python, PySFML is most certainly the better choice.

150
General discussions / Which language to use?
« on: April 14, 2010, 03:12:57 pm »
Firstly, I'm not formally educated in programming or anything similar.

I would really recommend C++ above the rest, I found parts of it ridiculous while I was learning the basics but now I am glad C++ is what I focused on.

I'm not a real fan of programming in Python, it can be a useful tool for scripting and automation, but I do view it as a tool rather than a "proper" programming language, I've never looked into the Python SFML binding.

I'm pretty sure the .NET binding is very close if not the same as the C++ one, if you are interested in a .NET language.

If you already are learning C++, I say stick with it.

Hopefully this is of some help and not just confusing :)

Converting numbers to strings pisses me off too lol :P

Pages: 1 ... 8 9 [10] 11 12 13