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

Pages: 1 2 [3] 4 5 ... 57
31
SFML projects / Re: Flappy-Bird Clone Attempt
« on: January 24, 2018, 10:14:13 pm »
Just skipped through it a bit, looks interesting.

But just some tiny hint I immediately noticed for your code – and since you're asking:

If you want to convert a single digit number to a character representing that digit, you can just add it to '0'.
Basically this:
Code: [Select]
int digit1 = 5;
int digit2 = 9;

char char1 = '0' + digit1; // this is now '5'
char char2 = '0' + digit2; // this is now '9'

You should try to properly indent your code so it becomes more readable.

Since you're doing a classic entity based design, you should put the logic into your entities. For example,
 add the bird controls into the Bird class.

32
Graphics / Re: How to implement a multipass shader
« on: January 18, 2018, 09:08:46 am »
Easiest solution for your multiple passes is to use two or more render textures:

  • Scene is rendered to render texture 1 using pass 1 shader.
  • Render texture 1 is rendered to render texture 2 using pass 2 shader.
  • Render texture 2 is rendered to render texture 1 using pass 3 shader.
  • Repeat as often as needed…
  • Render texture is rendered to the window using the last shader.

33
General discussions / Re: Why is SFML split with 1 dll file per module?
« on: January 18, 2018, 09:06:43 am »
Don't forget that SFML is not licensed under LGPL, so it has no licensing effect on your project no matter how you use it. You're not forced to use the shared library version. If you want something monolithic, you can just build or use the static version of SFML, either in your own library or right with the executable.

34
General discussions / Re: Is there an SFML Mario tutorial?
« on: November 17, 2017, 10:24:13 am »
I don't look into the forums for a month and people start cloning me? You really missed me, right? :D

35
SFML projects / Re: [KICKSTARTER] Mad Maze Attack
« on: October 18, 2017, 09:01:27 pm »
To be honest it took me quite a while to understand the concept of the game just by watching the video. It's basically an exploration/cooperation game like Don't Starve? Or how do the individual goals/mazes/maps mentioned play into this?

36
SFML projects / Re: This Grand Life
« on: October 18, 2017, 07:50:26 pm »
Awesome, the UI style reminds me a lot of Sim City 3000. Any chance for rounded edges? :)

37
Also keep in mind this doesn't necessarily mean your code will break. Depending on how you've written your program, what you're using, etc. it's certainly possible you wouldn't need any change at all.

38
General / Re: Windows 10 Touch Screen
« on: September 07, 2017, 01:15:40 pm »
This sounds like a bug in your code. Can you share how you handle those click/touch events?

In addition, the branch feature/windows_touch allows you to directly listen for actual touch events so you no longer have to rely on fake mouse clicks.

39
The basic promise is simple: Keep the OpenGL state vs. starting fresh. If you're using `ressetGLSStates()`, you're always starting fresh, which is perfectly fine. It's just a different approach to the same problem.

40
Audio / Re: Outputs a warning message upon exit
« on: July 11, 2017, 06:59:53 pm »
Talking about normal scoping and/or freeing of resources on the heap.

Maybe try to reproduce the issue with some minimal code example and paste it here so we can try to figure out the issue (whether it's in your code or in ours).

41
For the pixelation how can I ensure that my view and sprite position 1:1 math the pixels in screen?

Just set your view to the same size as the actual render area. E.g. if that section of the window is 640x480, set your view to the 640x480.

42
Window / Re: Question about redrawing the background
« on: July 11, 2017, 08:30:19 am »
The basic idea is that most modern hardware is basically able to redraw the background without using significant time (unless it's very complex, like a huge tilemap or something like that).

If you think your background drawing is too slow and there aren't significant updates between frames, just render your background to a sf::RenderTexture and then use a sf::Sprite to actually (re-)draw the cached background every iteration.

43
Audio / Re: Outputs a warning message upon exit
« on: July 11, 2017, 08:21:37 am »
Any chance you've got any static or global object from the audio module? Or something that's never freed?

44
General / Re: How to compile SFML programs in c++11 ?
« on: June 24, 2017, 08:52:20 am »
You're doing nothing wrong, the program just can't find the shared libraries belonging to SFML (since they're probably not installed in a standard path).

Put SFML's *.so files next to your executable and set your "LD_LIBRARY_PATH" to point there, e.g. run it like this:

Code: [Select]
LD_LIBRARY_PATH=. ./myProgram
There are other ways to achieve this, but I guess some of the Linux guys here knows those better than me. :)

As an alternative, compile a static version of SFML and link that.

45
General / Re: Writing to SFML Console
« on: June 24, 2017, 08:46:42 am »
In Visual Studio just make sure your debug build has the subsystem target set to "CONSOLE" (which gives you the console window by default) and your release build is set to "WINDOWS" (which hides the console window by default).

Pages: 1 2 [3] 4 5 ... 57