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] 4 5 ... 21
31
Audio / Re: Playing a sound wave
« on: December 22, 2015, 10:19:26 pm »
Either, as long as they produce the result of playing back an entered sound wave. My original plan was to change the amplitude over time based on the graph function, but I had also thought of precalculating the amplitudes and storing them in an array then playing it at a set rate.

32
Audio / Playing a sound wave
« on: December 22, 2015, 09:29:16 pm »
I have a function that allows a user input maths function (such as y = 2 *sin x) to be evaluated for whatever value of x. Is it possible to play this wave via SFML? The only way I've seen it done is via a callback that would pass the time value to the evaluation function, and then the result would be passed back to the library (done using PortAudio). As far as I know, you can't do that with SFML, so is there some other way to do it?

33
SFML projects / Re: My First SFML Game! A Game Like Space Invaders!
« on: December 21, 2015, 11:28:15 pm »
even the GameWindow.draw(dsdfasf) calls should be present inside the handler function of enemyclass.
Now this aint a necessity but if you want your code to be as beautiful as your, i think you should do that.
Then why did you say this?

34
SFML projects / Re: My First SFML Game! A Game Like Space Invaders!
« on: December 21, 2015, 11:25:37 pm »
Actually, putting both the updating and drawing of an object in the same function is generally a bad idea. Not only because it means you get update thing1, draw thing1, update thing2, draw thing2, which leaves a large gap between the updating of the things, but also because it means you can't decouple game logic and drawing. This is why you would usually have something like an update function as well as a draw function, or possibly updateLogic, updateAnimation, draw.

35
Rewrite that if statement. You can't have if a == b || c, you need ( a == b || a == c ) , with the brackets in this case.

36
Feature requests / Re: sf::Distance ?
« on: December 08, 2015, 09:40:38 pm »
May I just ask why this would be useful? It's extremely easy to convert between said units and anyway, what's wrong with just using your own arbitrary unit system, rather than a standard, arbitrary system which probably wouldn't fit everyone anyway?

37
SFML projects / Re:creation - a top down action adventure about undeads
« on: December 06, 2015, 09:20:14 pm »
No I'll be honest I haven't tried stuff like that. I was merely guessing at the amount of code that goes into something like this because it's similar to an unfinished old project of mine which I used to be able to compile in 10 seconds.

38
SFML projects / Re:creation - a top down action adventure about undeads
« on: December 06, 2015, 04:21:31 pm »
That's my rule as well (except with .hpp and .cpp), I just thought that once you had split stuff up that much, the shear amount of files that would have to be compiled, especially if a header file was changed could be what's taking ages. I just remember Elias saying something about it taking at least 2 minutes to compile, which is weird because in my experience things take 15 seconds tops, usually closer to 2 seconds to compile unless you're doing a full rebuild.

39
SFML projects / Re:creation - a top down action adventure about undeads
« on: December 06, 2015, 03:53:39 pm »
Just out of interest, why do you have so many files? How much do you put in each? That might well be the reason for your compile time taking minutes unlike the usual few seconds.

40
Graphics / Re: Problem when resizing view to be same size as new window
« on: December 04, 2015, 11:49:48 pm »
No matter what the starting size is, when I resize to an even height, I get the weird corners and when I resize to an odd height, I get a no change in the shape.

41
Graphics / Re: Problem when resizing view to be same size as new window
« on: December 04, 2015, 11:36:00 pm »
I'm on Windows 10 64 bit with a GeForce 820M which via dxdiag has a driver version number of 10.18.13.5362 (which is from 23/07/2015).

42
Graphics / Re: Problem when resizing view to be same size as new window
« on: December 04, 2015, 08:51:45 pm »
Nope, I changed the centre of the view to be 0,0, then commented out the line in the handling of the resize event that changes the centre, and the problem remains exactly the same. I'm really confused as to why this is happening as no zooming is happening, so I don't know why there are what look like interpolation errors.

43
Graphics / Problem when resizing view to be same size as new window
« on: December 02, 2015, 08:20:44 pm »
Using this code
(click to show/hide)
and the attached "image.png", when I press the resize button, the sprite stays exactly the same size as expected, however some parts of it are changed, and this looks very weird in my full project, especially since everything is drawn to line up at the pixel level. I've attached the image used, as well as a screenshot from before, and one from after with red circles identifying some of the weird bits. I am on windows 10 using a version of SFML I build myself last July with CMake and MinGW 5.1.
EDIT: I forgot to say, the console output says that the new width is 1920 and the new height is 1001.

44
SFML projects / Re:creation - a top down action adventure about undeads
« on: December 01, 2015, 07:01:12 pm »
Same. I think I'm possibly anticipating this more than any professionally made game at the moment.

45
DotNet / Re: KeyPressed Event Not Firing When Expected (SFML.NET 2.2)
« on: November 30, 2015, 08:33:52 pm »
It sounds to me like what you want is not events, but real time state checking, which in normal SFML is sf::Keyboard::isKeyPressed(), I'm not sure how/if the dotnet binding is different.

Pages: 1 2 [3] 4 5 ... 21
anything