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

Pages: [1] 2 3 ... 21
SFML projects / Re:creation - a top down action adventure about undeads
« on: December 06, 2016, 11:36:17 pm »
If you want to be adventurous, Hyper Light Drifter has a pretty cool combat system iirc. It's not exactly like re:creation, but it is a 2d top down 8/16 style game, so I reckon if you use basic 2d Zelda combat as your base, you could take influence from more complicated systems like that of Hyper Light Drifter.

General / Re: I know it's not related to sfml but...
« on: September 16, 2016, 07:40:05 pm »
String is part of the std namespace, so it should be std::string nickname.

You are linking only the release libraries to your overall project, rather than linking the release and debug libraries in their respective targets. I don't know if the tutorial you used mentioned this, but the reason why the official tutorials are there is because if you follow them exactly, it will work.

SFML projects / Re: SFGUI (0.3.1 released)
« on: July 28, 2016, 07:54:16 pm »
I've seen that, my question was how to do it with predefined sfg::Widgets, rather than drawing primitives. I'm basically just talking about the InvalidateImpl() function, as I'm wanting to draw my custom widget's member Widgets, rather than creating all the shapes manually. What confused me more, is that IIRC, Box doesn't implement InvalidateImpl() and Frame only draws a rounded rectangle, so how do the children get drawn?

SFML projects / Re: SFGUI (0.3.1 released)
« on: July 28, 2016, 03:15:39 pm »
This seems like a stupid question, so I held off from asking it, but I haven't made any progress. How would I make a Widget (i.e. a class that inherits from Widget and can be added to Containers, drawn by the rendering engine etc), out of other predefined Widgets? I can do it by making a class which contains a Box that contains the Widgets, and having a GetWidget() method, for adding it into Containers, however I'd much rather make a class which is an actual Widget. As a simple and arbitrary example, the sort of thing I'm trying to do is make a dropdown box out of a Label, a Button and a ScrolledWindow (that's not exactly what I'm making, but it's much easier to explain).

SFML projects / Re: SFGUI (0.3.1 released)
« on: July 22, 2016, 10:51:25 pm »
I've changed it to this, and it now works:
(click to show/hide)
This looks a bit weird, and I'll probably change the program structure so that it seems a bit more natural, but if it looks stupid and it works, it isn't stupid. Thanks for clearing this up. :)

SFML projects / Re: SFGUI (0.3.1 released)
« on: July 22, 2016, 10:12:04 pm »
Is it possible to dynamically add labels/widgets into a box many times? I've put the code in a spoiler tab because it's 80ish lines, but it's based on the Hello World example, so I don't think it can be much cut down. Whenever I press the button, which packs another label into the box, a second time, the program crashes with Segmentation Fault (core dumped) printed to the terminal. When I run it in the Debugger, it comes up that the container::HandleEvent done by the Box which is having labels added to it crashing.
This was done with the GitHub version of sfgui from about a week ago.
(click to show/hide)

SFML projects / Re: Cendric: An RPG Platformer
« on: April 24, 2016, 10:39:27 am »
With your grammar corrections, 'as you've come here' is fine as long as it is being used to mean 'because you've come here', otherwise it should be 'as you came here' if it means 'while you came here'. Also 'you've drunk too much' is grammatically fine, although 'you drank too much' is also correct. The former seems more correct if you are telling someone before they have finished drinking (or maybe shortly after), whereas the latter refers to a finished activity from the past. Of course, I may be wrong, but you did say get a native speaker to go over it, so I thought I'd try and help.

General / Re: Problem with storing generated pixel locations
« on: April 17, 2016, 05:46:33 pm »
void createDiamondShape(int x, int y, int size)
    for(int i(0); i <= size; ++i) {
        if(i!=size) {
        if(i!=0) {
This seems to make the right shape for anything other than a size of 0. The x and y you pass are the centre of the diamond and the size is how many horizontal or vertical moves it would take to get from the centre to the edge of the diamond. Just call it with an incrementing size value and implement your own random colour algorithm.

General / Re: Problem with storing generated pixel locations
« on: April 17, 2016, 03:37:32 pm »
I'm fairly sure the problem is knowing which pixels have been modified, not modifying the pixels themselves, in which case, I think you are going about it wrong. If you want to make pixels expanding out from the centre, just make a diamond shape of different sizes around the central pixel. e.g. first you start with a pixel x,y then you make a loop that does (x+1,y),(x-1,y),(x,y+1),(x,y-1), then make a loop that does (x+2,y),(x+1,y+1),(x,y+2),(x-1,y+1),(x-2,y),(x-1,y-1),(x,y-2),(x+1,y-1), etc.

EDIT: unless of course you do actually want to store all modified pixels and have the function go on forever as each one modifies all the ones around it, which will never stop.

General / Re: Help! I'm an idiot (and new) pollEvent()
« on: April 16, 2016, 10:16:00 pm »
Thing is waitEvent and pollEvent are not the same. waitEvent is blocking whereas pollEvent is not, hence waitEvent is usually used if you have a thread dedicated to event handling. And I don't see why the name wouldn't make sense when you are polling the event queue to see if it has any events, and if it does, get what they are. That seems like a perfectly good use of the word.

General / Re: How to make a bullet curve
« on: April 03, 2016, 10:14:14 pm »
Do you mean if you are viewing it side on and the curve is caused by gravity? if that is the case, horizontal velocity should stay constant or gradually decrease due to air resistance, while you need to apply a constant vertical deceleration. So store position, velocity and acceleration as 2d vectors and apply each dependent on how much time has passed.

Window / Re: error:identifier 'window' is unidentified
« on: February 28, 2016, 10:59:02 pm »
Fixed in case anyone follows that link before looking at your reply.

Window / Re: error:identifier 'window' is unidentified
« on: February 28, 2016, 10:29:35 pm »
Function case for SFML is camelCase, not PascalCase, where have you got this code from, seeing as it isn't from the tutorials (http://www.sfml-dev.org/tutorials/2.3/start-vc.php )?

Window / Re: error:identifier 'window' is unidentified
« on: February 28, 2016, 09:12:18 pm »
You never actually created an object called Window, you just wrote sf::RenderWindow( instead of sf::RenderWindow Window(.

Pages: [1] 2 3 ... 21