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

Pages: [1] 2 3 ... 199
1
Graphics / Re: Enemies path following
« on: July 09, 2020, 10:23:03 pm »
Honestly, I'm not sure what you're having a problem with.

Related to this small piece of code, I have to say that is sometimes given me problems because getting closer to the next point becomes difficult as the higher the speed of the enemies is.
Which problems? What is difficult?

Is there any other way to be more accurate on path following independtly of the enemy speed?
What do you mean by "accurate" here?

2
Audio / Re: Audio output only on one channel
« on: July 09, 2020, 10:16:44 pm »
My only other suggestion that I can think of at the moment is probably too obvious that you've checked this already (if it applies) but do you have any outboard effects (between card and speakers) and are they switched off/turned fully dry?

Other than that, I'm not sure what else to suggest. Sorry :-[

3
Audio / Re: Audio output only on one channel
« on: July 08, 2020, 10:20:07 pm »
That seems correct too. It looks like this is a sound card/driver issue to be honest.

Do you have any global "environment" effects? e.g. reverb.

Is your speaker setup identical to what the driver thinks it is? e.g. headphones for headphones, 2-channel for 2 speakers, 5.1 for 5 speakers and subwoofer. It could be mixing surround sound into fewer channels or vice versa.

4
Audio / Re: Audio output only on one channel
« on: July 08, 2020, 01:04:07 am »
Rather than create a stereo buffer with one channel as silence, you could create a mono buffer from that stereo buffer. Or, create two from it and control them separately.
You should note that spacial positioning only applies to mono sound sources; stereo sounds are always stereo (I'm guessing this is where you're finding some error).

I've already given an example that shows how to split a stereo SFML sound buffer into two mono SFML sounds buffers. You can find that here:
https://stackoverflow.com/a/50078065/6158263

That said, you seem to already understand how to create a buffer from scratch. Try just a mono buffer (1 channel) and the move it's position in space to the left (as you mentioned).

5
Graphics / Re: texture.loadfromfile causes crash?
« on: July 08, 2020, 12:44:32 am »
Without seeing any code, I would guess that you're passing the font around by value which makes copies. Passing by reference (or pointer) would allow any operations on it to be done directly to the actual font rather than a (temporary?) copy.

If a text is pointing to a font and that font disappears/gets destroyed then the text is now pointing to invalid memory and can cause these crashes.

6
SFML development / Re: Threading
« on: July 08, 2020, 12:41:51 am »
Hi and welcome. :)

std::thread

7
General / Re: How to delay the process of drawing
« on: July 06, 2020, 11:05:20 pm »
Chrono would be very useful for timing to use for the animations. SFML also provides a simple-to-use clock, which can be very useful for everything other than extremely advanced time manipulations.
You may also find some interest in Kairos, a timing library that uses chrono. One thing provides clocks that can be paused, slowed, reversed etc..
For animations where you can control in a similar fashion to time-line animation software, you could find some use of Plinth, maybe especially the SFML module, although the main timeline stuff is in the main module (SFML part not needed). I used it exclusively to animate everything in the Selba Ward example video

With all that said, you'll have to be more specific in your problem if you want a more specific answer/help, sorry.

8
General discussions / Re: VertexArray Isometric
« on: July 05, 2020, 04:58:38 pm »
Remember that the ratio is only really defining the shape/size of the diamond not the actual textures used inside them. If you place a square image inside a diamond shape, it will rotate, skew and stretch to fit.

The only reason I mentioned "true" isometric is that the simpler version is not "technically" isometric but is often just considered it as it's close enough. There's no real requirement to use the correct term unless you're being very clear about it to people that know the difference.

Generally, just go with whatever ratio looks good/right to you. 1/2 is common and simple for calculations. 2/3 is relatively simple but may feel "a bit high from the ground". 1/(sqrt(3)) is a pretty complex value and your tiles would never be anywhere near integers, which are always easier to deal with.

I've only been addressing the shape of the diamond, not the layout of the grid nor efficiency.

Maybe one day, I'll add an 'isometric' tile map to Selba Ward... :-\

9
Feature requests / Re: Set Window Position on Creation
« on: July 04, 2020, 08:10:56 pm »
You could create the window at size (1, 1), quickly move it offscreen (e.g. -2000, -2000), resize it to the size you want and then reposition it. This is much less noticeable than moving it onscreen but works even better if the window doesn't need decorations.

One thing I haven't tried is to create the window after setting its position but I would guess that the setting position method affects the actual created window, not the sf::Window object, which would've allowed you to set the position first and that position taken into account when the actual window is created.

With all that said, users tend to accept "imperfect" motion when a window is first set-up and when applications are first started.

10
General discussions / Re: VertexArray Isometric
« on: July 04, 2020, 07:51:10 pm »
The "ratio" is the ratio between width and height of the diamond shape.

True isometric requires all length to be equal in each direction and so all angles are to be equal (30 degree elevation). This would require a "ratio" of (1 / sqrt(3)) - approx 0.57735, meaning the height of the diamond would be ~0.577 times the width of that diamond.

An easier type of orthographic projection uses very close to isometric projection with a slight change of angles. Only two of the angles are the same (instead of three) so it's called a form of "dimetric" projection. It's very similar and tends to be refered to as isometric as a general term. This special type of dimetric makes the height 0.5 of the width, allowing for simple calculations and makes it possible for older devices or pixel art to look pleasing.

11
General / Re: GPU usage permanently jumps up after a while
« on: July 03, 2020, 09:24:54 pm »
Do you get the same result when starting directly from the executable, bypassing the IDE completely?

12
Window / Re: Desktop/Fullscreen resolution with multiple monitors
« on: July 03, 2020, 09:23:21 pm »
I don't the exact intention for getDesktopMode() but it seems to be quite intuitive to just copy whatever the operating system has defined as its desktop. This would allow, for example, creating a window (not fullscreen) that is the size of both displays (in theory).
The native resolution should be listed in the list given by getFullscreenModes(); it should be the first one, if I remember correctly.

I guess that the one thing you're actually looking for is the current video mode of a single display - a bit like "current fullscreen mode".

With all that said, I'm not 100% sure of getDesktopMode() always returning the entire desktop. Knowing current single display mode would certainly help with "fullscreen window" applications. I'm vaguely remember doing this but can't remember if it was SFML...

13
Window / Re: Desktop/Fullscreen resolution with multiple monitors
« on: July 02, 2020, 10:53:51 pm »
Are you saying that you modified it so that the desktop mode is different from the actual desktop mode and ignores the second display?

There may be something wrong if SFML's fullscreen modes is missing the native resolution for that 2560x1440 display, assuming, of course, that it's the primary/default display.

14
General discussions / Re: VertexArray Isometric
« on: July 02, 2020, 10:48:15 pm »
True, if it's a perfect diamond, there shouldn't be any distortion. Apologies.

15
General / Re: Changing the world origin in C++ SFML
« on: July 01, 2020, 05:22:24 pm »
G, I would say that it would simpler to just set the view's center to (0, 0) ;D

Pages: [1] 2 3 ... 199
anything