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

Pages: [1]
1
SFML projects / Re: Sassy GUI
« on: August 13, 2015, 06:05:02 pm »
SASSY: Straight-forward And Super Simple... Yeah...

2
General / Re: Diamond Square
« on: May 11, 2015, 02:01:54 am »
Y'know, you're 100% correct. I actually misread the article I was reading, which caused my confusion. I also solved the problem (after closer analysis, I realised my issue was in working out how to divide a single line into 2 lines and so on). The algorithm I was writing was a basic 1D midpoint displacement algorithm.

3
General / Diamond Square
« on: May 11, 2015, 01:03:27 am »
Hello.

I'm not sure if this is the right place to ask this, but it seemed to be the most appropriate.

Does anyone have a 1D implementation of the Diamond Square algorithm in SFML? I'm entirely new to fractals and procedural generation, and this algorithm seems to fit my needs the best, but I'm not quite sure about how to get started. I have a general understanding of the algorithm, but not in the implementation details for SFML. Just to clarify, by 1D I mean a single line.

Thanks.

4
System / Re: Threads
« on: March 11, 2015, 11:51:18 pm »
Thanks! I completely forgot about std::thread, since I started this at my uni where we use VS2010.

5
System / Threads
« on: March 11, 2015, 11:30:44 pm »
Hello.

Today I started looking into using sf::Thread. I've made a class that has an sf::Thread, which is initialized in the constructor. My question is, if the function that runs in that thread has parameters, how would I pass them in?

class ClassWithThread{
public:
    ClassWithThread()
    :mThread(&ClassWithThread::FunctionToUse, this){  //How would I pass the int into that function?

    }

    void FunctionToUse(int x);
private:
    sf::Thread mThread;
};
 

I'm not sure if this is an issue with me not understanding sf::Thread properly, or if it's something I simply can't do.

Thanks in advance for any help.

EDIT: I thought it would be prudent to mention that I'm using SFML 2.1 and Visual Studio Community

6
SFML projects / Tile map editor.
« on: October 15, 2014, 06:15:43 pm »
Hi guys!

I've been working with C++ and SFML for a short while and when I was learning, I was told that having a multidimensional array or vector was a good way to load tile maps. I'm new to SFML and games development in general, so I worked with this for a while. After setting up a few small programs that used this, I began thinking about other methods of storing maps that allowed a little more freedom, and eventually came up with my current method. I'm not sure if it's in use elsewhere, as I was basically "winging it" and building it as I went instead of doing research on the topic.

Basically, I start with a single sprite and a single texture. I then set up the sprite how I want it, and push it back into a 1D vector of sprites. I then change the sprite again and push it back again. I do this over and over, until I have my map set up. To assist this, as writing it every time was a huge pain, I wrote a small level editor. It's not as feature-rich or nice to look at as something like Tiled, but I was programming to fill a need and it worked well for my projects, so I thought I'd share it.

Some information:
-Maps stored in txt files
-Tiles bound to a grid or freely placed art (or a combination) can be used
-Includes very, very basic collision
-Fill tool
-Rotation
-Adjustable tile and grid size
-Adjustable screen resolution
-Editor, test application, sample art, levels and test application source code in just over 3mb
-Compressed in a 7Z to under 1MB for attaching to this post
-More information in the readme

If this can be of use to you, feel free to use it in any way you like. I'd appreciate being credited, but it's not a requirement. There is absolutely no copyright on this whatsoever. Attached to this post is 3 screenshots and a the editor. The source code for the editor is not included, but I may release it if anyone actually uses it.

Thanks.

Pages: [1]