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

Pages: 1 ... 4 5 [6] 7
76
Window / Re: how to create a "input text fields" and save it in variables
« on: January 09, 2017, 09:33:32 pm »
creating a system for handling ui is actually more complicated than one could think it is.

The easiest (although not very flexible) solution here is storing a pointer or any kind of reference (not strictly in C++ meaning) to the active text field. Handling keyboard input differently if there is a valid pointer to a text field than when there is just a nullptr.

But that feels very hacky and not right for me. If it's same with you, try looking for an established GUI library like SFGUI or Imgui that handles these things for you. Or have a look at how they handle this kind of scenarios and get inspired.
 

77
SFML projects / Re: Simple Chess Variant
« on: January 05, 2017, 09:50:16 pm »
@nmb: You're very welcome!

I do agree with Mario that getting rid of the textures is an excellent idea. As to the idea font representing the chess pieces, it's even more splendid. You can choose a font supporting the Unicode block you need here, for instance: http://www.fontspace.com/unicode/char/265A-black-chess-king

Good luck!

78
SFML projects / Re: Simple Chess Variant
« on: January 04, 2017, 09:27:50 am »
Hi!
Welcome to the SFML forums!

I have just a couple of offtopic notes.
  • when posting your project to Github, don't ZIP it up. It prevents browser users from browsing the code without having to download the whole ZIP and extract it. Viewing the commit changes is impossible on Github as well then
  • When posting a game here on the forum it's always nice if people don't have to download, compile and play the game to get any impression from it. Short gameplay video or screenshots are therefore always welcome.

79
Graphics / Re: The sprite is moving very slow and with bugs.
« on: December 29, 2016, 12:10:04 pm »
Would you provide MCVE where you reproduce this problem so we don't have to guess where it went wrong?

80
General / Re: Callback based logic?
« on: December 27, 2016, 10:37:06 pm »
I don't consider callbacks to really be the way to go. Have you given a thought to an idea of an event queue where all the events are passed and all the observers are notified about them whilst only the observers interested in that particular type of message handle them and the rest simply ignores them?
This is highly influenced by my hunt for the ultimate ECS, hence this may not be exactly what you're looking for. It is what I am looking for though, ergo I am giving you my 2ยข.
I can't find the article right now, the reason why I see it as a better alternative is that the event queue can be easily implemented in a way where the emitters and receivers of the events are completely decoupled. There's probably a way of dealing with this with callbacks, however, as I mentioned earlier, I have never really attempted to implement a massive callback system and I don't have the insight.

81
SFML website / Re: SMF displays weird post time
« on: December 22, 2016, 04:49:20 pm »
12-hour system, I haven't seen this one for a while :)

@eXpl0it3r: Thank you, I have found it under the "Look and Layout" tab. No more 12-hour weirdness :D

82
SFML website / [SOLVED] SMF displays weird post time
« on: December 22, 2016, 01:02:11 pm »
Hey!

I have just noticed how weird the time is displayed on this forum.  As it can be seen in the attachment, it appears that the replies had been sent before the thread was even created. I don't know if this is caused just by my messed up time settings (although I don't remember changing them) or if everyone sees it like this. (Here's the link to the topic)

Could something be done about it? I mean, it's not too bad, but it annoys me :D


83
General discussions / Re: Scripting Language Question
« on: December 22, 2016, 12:46:18 pm »
I'd consider using ChaiScript. C++ like, easy to integrate (header-only, so it comes with elevation of the compile time), easy to read and write. Requires C++14.

Example:
class Rectangle {
  attr height
  attr width
  def Rectangle() { this.height = 10; this.width = 20 }
  def area() { this.height * this.width }
}
var rect = Rectangle()
rect.height = 30
print(rect.area())

84
Window / Re: Errors when initializing a sf::RenderWindow variable
« on: December 15, 2016, 08:41:20 pm »
No problem, glad I helped! :)

Good luck with your SFML projects! And make sure you let us know about them :)

85
General / Re: How to calculate a field of view?
« on: December 13, 2016, 02:53:05 pm »
The corners of the objects are essentially the vertices of the polygon representing the object.
For instance, if you use sf::ConvexShape, vertices are the respective points you set with the setPoint() method.

87
Window / Re: Errors when initializing a sf::RenderWindow variable
« on: December 12, 2016, 05:38:09 pm »
Please, always use Google before posting on any kind of forum. You'll avoid asking about one of the most asked question ever. :)
http://stackoverflow.com/questions/7004031/c-unresolved-externals

Unresolved externals error usually means that you have linked something incorrectly.  Please go through the tutorial and only when you get stuck come back with the question and a note where exactly you got stuck.

88
SFML projects / Re:creation - a top down action adventure about undeads
« on: November 28, 2016, 03:15:22 pm »
I do not have the needed insight, but it seems, that you  have 2 main states (non-dialogue and dialogue), with 2 more levels of depth for the former, whilst each state has up to 2 possible transitions.

Try to draw diagrams and also go hierarchical. FSMs are always easier with diagrams.

90
SFML projects / Re: Stardust Sector-Editor 0.8 Beta for testing purposes
« on: November 23, 2016, 02:19:33 pm »
I can't find it. It would be more suitable if you uploaded the source code on Github or BitBucket (or the like), where people can have a look at the code and project structure without the need to download the whole archive file.

Pages: 1 ... 4 5 [6] 7
anything