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

Pages: 1 ... 4 5 [6] 7 8 ... 11
76
SFML projects / Re: Dispersio has been Greenlit!!!
« on: October 20, 2016, 09:41:21 am »
Congrats!

77
SFML projects / Re:creation - a top down action adventure about undeads
« on: October 06, 2016, 10:27:46 pm »
Damn, people can be such jerks.  It reminds me of when people would IM the guys who created Super Meat Boy asking for help with a bogus support problem, edit the conversation to make the developer seem like he was an asshole, and then post it on reddit / social media. 

On the bright side, I think this is indicative of you creating something that is worthy of attention, so at least there's that. 

78
SFML projects / Re: It Always Ends In Nuclear War
« on: November 10, 2015, 04:46:48 am »
DUDE!, looks cool man. I have a question for you, how are you loading your maps? I'm curious because I'm working on an RTS that needs a good efficient way to load some maps, and google doesn't help, but you seam to have it down.

Thanks!

For loading maps, it depends on what you mean.  I'm generating a different map every time the program starts.  I have a class called Tile, which stores (among other things) a number representing what tile type it is (0 for grass, 1 for water, etc).  I'm creating an array of thousands of tiles, and each tile in this array gets assigned a type at the start of the program based on a a pseudo-random number generator and some logic.   

Because of the way computers work, if I want to generate the same map again, I just need the number (usually called the seed) that the random number generator started with and used to generate the map the first time, and then it'll spit out the same map back.  This is because computers can't do true random number generation, it's just making calculations based on the first number that we gave it.  So for me, saving my entire map (at least the terrain portion of it) is as simple as saving a single number. 

Most RTS games have maps that someone created before hand, though.  I know a few people use Tiled to create maps, and I've definitely seen a few examples around the forum of people using it with SFML.  I can find you some links if you're interested.



I've never used Tiled before, but pictured there is a screenshot of what you can do with it.  You can see that each map is just a grid of tiles.  I imagine that after you're done creating a map in Tiled it will save its map information to something like a text file.  So for a super simplified example, if you made a map like that, Tiled might spit out a text file which looks like a bunch of numbers.  Each tile might have a certain amount of these numbers associated with it, such as what sprite to use, whether or not the tile is walkable, or whatever arbitrary information you want a number to convey.  When it comes time for your game to read this data, you would open this text file and create your map based on what's inside. 

79
Feature requests / Re: Pausable clock...?
« on: October 04, 2015, 03:36:22 am »

80
SFML projects / American Gothic in the Palette of Mona Lisa…
« on: September 26, 2015, 11:26:32 pm »
Disclaimer:  I made this a while ago, and it was a one off low effort type of thing.  What I'm trying to say is that the code quality is pretty awful, even by my standards, but I've decided to go ahead and throw it out there anyway. 

I saw this post and decided that it would be a fun challenge.  The task is to create a program which takes two images and attempts to recreate the second image by rearranging the pixels of the first image.




The code:  https://github.com/DanielJPetersen/American-Gothic-in-the-Palette-of-Mona-Lisa

81
SFML projects / Re: SFML based game on greenlight! - Pilot Crusader
« on: July 11, 2015, 06:55:09 pm »
Nice!  Congrats on releasing.

82
SFML projects / Re: It Always Ends In Nuclear War
« on: June 07, 2015, 10:19:10 pm »
Thanks for the interest!  I'm trying pretty hard to get it done, all in good time I suppose.

83
SFML projects / Re: Goal and rules of this forum
« on: June 07, 2015, 10:16:34 pm »
I believe he wants to know if he's allowed to create a thread asking for ideas on what projects to work on, because he's not sure. 

If that is indeed the question, it's really up to you to decide what to work on.  I learned quite a lot making small games like Solitaire, Conway's Game of Life, Breakout, Tetris, and Tic Tac Toe.

84
SFML projects / Re: It Always Ends In Nuclear War
« on: June 06, 2015, 03:17:08 am »
Still alive and working on this!

I've been working on the GUI system lately.  I just finished working on a simple automatic layout system so that I don't have to worry about manually positioning GUI items on the screen.  This was surprisingly hard to do, but I did come up with something that I'm happy with.  It's not the greatest thing in the world as I only have so much free time to work on the game, but it should definitely help me out in the future.

At the most basic level, I'm thinking of each GUI component as a rectangle that takes up space on the screen.  The layout system just manipulates rectangles for me by positioning and sizing them based on properties that I define for the rectangles.  So if for whatever reason I want a GUI component to span half of its container in width, and all of its container in height (a container the size of the screen is always the top most container), be anchored to the left edge of its container with an offset of however many pixels, be centered vertically, as well as have constraints on the size (min/max width and height), I can do that really easily.  The cool thing is that each GUI component can have other GUI components as children, allowing me to embed and use these position properties inside other GUI components. 

I'm going to be working on the GUI system until it's finished.  I very much want to be done with this task and start work on the actual game again, but I think patience always pays off in the end.  It should be worth it to have a good base so that I can quickly create / iterate on the GUI screens.  In terms of components, at the moment I have a


I think that's a pretty good list of things, but I still need to build out a tab container, dropdown list, input box for text, a list view, numeric spinner, and a color picker.  I also want some way of making certain components scrollable.  I have some vague ideas on how to go about making the components scrollable, but I'm not really sure how I'm going to do it yet.

I'm also trying to pick out color schemes for the GUI.  I am not an artist, so I'm going to be going with plain colors / shapes instead of using premade images as a lot of games do.  I'm thinking something simple like white text on a semi transparent background as shown here looks pretty good.


85
SFML projects / Re: Game on Kickstarter 28 May!
« on: May 30, 2015, 06:11:32 pm »
For anyone curious, I checked it out and the page is live.  Figured I'd post the link here

https://www.kickstarter.com/projects/147621009/luman

86
SFML projects / Re: Game on Kickstarter 28 May!
« on: May 25, 2015, 06:41:14 pm »
How much are you guys going to be asking for? 

I'm sure I'm going to come off as a jerk, but I think the reality is that indie platformers are a dime a dozen nowadays, and you'd have to have something that looks pretty amazing for it to be successful on Kickstarter.  It's unfortunate and it defeats the purpose a bit, but you really need something that looks more or less complete, and you need an active following in order to have a successful kickstarter. 

I'd look at Moonman as an example.  Extremely professional art / animation, relatively popular dev blog (3k+ comments, 800k+ views), exposure from multiple news sites + staff pick on Kickstarter, and even that struggled to reach its modest goal.

Don't get me wrong, I think it's really cool what you've managed to build so far.  I suppose it all depends on the goal you set, but with no gameplay other than a character running around, and with the state the art / animation is currently in, it's going to be a rough road.   :-\

87
This might not look that great, but you could calculate a radius around the player, and make any vertices which fall in that radius semi-transparent while keeping those outside non-transparent.  You should get a smooth gradient between verts of different colors, check out the triangle on this page.

http://www.sfml-dev.org/tutorials/2.1/graphics-vertex-array.php

I'm not sure where there's a good / comprehensive shader tutorial

88
General discussions / Re: SFML 2.3 released!
« on: May 17, 2015, 11:37:41 pm »
Whew!  Congrats guys, this is pretty awesome.

89
Graphics / Re: Resizing a RenderTexture?
« on: May 17, 2015, 08:51:00 pm »
That makes a great deal of sense.  Thanks for the quick reply, I appreciate it  :D

90
Graphics / Resizing a RenderTexture?
« on: May 17, 2015, 08:41:01 pm »
I can't figure out how to resize a RenderTexture. 

This is some test code I've tried.  The desired result is a screen which is entirely green, but instead I'm left with a screen that's 1/4th green.

The code creates a render texture at half of the windows width and height, and then clears it red and draws the RenderTexture to the screen.  It then calls create again with the full window width/height, and repeats the process but this time with the color green.  Green does indeed get drawn, but the size remains half window width/height.

What am I doing wrong?

#include <SFML/Graphics.hpp>

int main()
{
        sf::RenderWindow Window(sf::VideoMode(200, 200), "SFML works!");
        sf::RenderTexture RT;

        //create half screen size
        RT.create(100, 100);
        RT.clear(sf::Color::Red);
        RT.display();

        sf::Sprite Sprite;
        Sprite.setTexture(RT.getTexture());

        Window.clear();
        Window.draw(Sprite);
        Window.display();
       
        //Right now the screen is a red rectangle starting from the top left to the middle
        //lets try to resize the render texture so that the entire screen is filled by it
        RT.create(200, 200);
        RT.clear(sf::Color::Green);
        RT.display();

        Sprite.setTexture(RT.getTexture());

        //doesn't seem to have an effect though.  The RenderTexture will clear green, but the
        //rectangle will still only go from the topleft to the middle

        while (Window.isOpen())
        {
                sf::Event event;
                while (Window.pollEvent(event))
                {
                        if (event.type == sf::Event::Closed)
                                Window.close();
                }

                Window.clear();
                Window.draw(Sprite);
                Window.display();
        }

        return 0;
}

I've also tried to make it a bit more explicit by making the RenderTexture a pointer, and allocating it with new
#include <SFML/Graphics.hpp>

int main()
{
        sf::RenderWindow Window(sf::VideoMode(200, 200), "SFML works!");
        sf::RenderTexture *RT = new sf::RenderTexture();

        //create half screen size
        RT->create(100, 100);
        RT->clear(sf::Color::Red);
        RT->display();

        sf::Sprite Sprite;
        Sprite.setTexture(RT->getTexture());

        Window.clear();
        Window.draw(Sprite);
        Window.display();
       
        //Right now the screen is a red rectangle starting from the top left to the middle
        //lets try to resize the render texture so that the entire screen is filled by it
        delete RT;
        RT = new sf::RenderTexture();
        RT->create(200, 200);
        RT->clear(sf::Color::Green);
        RT->display();

        Sprite.setTexture(RT->getTexture());

        //doesn't seem to have an effect though.  The RenderTexture will clear green, but the
        //rectangle will still only go from the topleft to the middle

        while (Window.isOpen())
        {
                sf::Event event;
                while (Window.pollEvent(event))
                {
                        if (event.type == sf::Event::Closed)
                                Window.close();
                }

                Window.clear();
                Window.draw(Sprite);
                Window.display();
        }

        return 0;
}

Pages: 1 ... 4 5 [6] 7 8 ... 11