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

Pages: 1 [2] 3 4 ... 15
16
Well the majority of the audio module has been rewritten to remove libsndfile as such there might well be an issue on the current master.

Can you provide the ogg file?

It's orchestra.ogg from the sound example in the SFML examples folder, though I can recreate it by converting to an MP3 file as well, and in the code that I found this issue in originally WAV files from loading SoundEffects from a stream also falls down.

Porting to a FLAC file via Audacity, interestingly, does seem to work. So this stands as a temporary fix for me, but obviously not ideal.

Commenting out the openFromStream logic logs:
Quote

Starting...
AL lib: (EE) UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead
AL lib: (EE) GetHrtf: Incompatible format: Stereo 48000hz
Done

And the AL lib stuff still gets logged if commenting out the stream loading, so I suspect it's a red-herring and it's the stream reading logic that falls down (Graphics still load from streams correctly).

17
#include <SFML/Audio.hpp>
#include <SFML/System/FileInputStream.hpp>
#include <iostream>
#include <cstdio>

int main() {
    std::cout << "Starting..." << std::endl;
    sf::Music fileMusic;
    if (!fileMusic.openFromFile("sample.ogg")) {
        std::cerr << "Too early boom?"  << std::endl;
        return 3;
    }

    sf::Music music;
    sf::FileInputStream stream;
    if (!stream.open("sample.ogg")) {
        std::cerr << "Too early boom?"  << std::endl;
        return 2;
    }
    if (!music.openFromStream(stream)) {
        std::cerr << "BOOM!"  << std::endl;
        return 1;
    }
    std::cout << "Done" << std::endl;
    return 0;
}

 

sample.ogg is orchestra.ogg from the examples folder.

Loading from a file works, but trying to load music from an InputStream seems to fail. Am I doing something wrong, or has this broken on master? This used to work until I updated to the latest master.

18
Feature requests / Re: Setup an official AppVeyor/Travis-CI for SFML?
« on: March 11, 2015, 01:15:28 am »
Awesomesauce! Ignore me then :) This publicly visible yet and I've just managed to miss it, or is it SFML-team only?

19
Feature requests / Setup an official AppVeyor/Travis-CI for SFML?
« on: March 10, 2015, 11:16:42 pm »
So my building of SFML stopped working for some reason. Originally I feared it was broken by a recent commit, but I created an AppVeyor pointing at SFML and it built: https://ci.appveyor.com/project/MorleyDev/sfml/build/1.0.1

Normally I'd fix the issue with my machine and move on with my life, but I want to use this as an opportunity to raise that it may be time to establish official automated builds on Windows  through something like AppVeyor for SFML's master branch (and Linux through Travis-CI?).

This is useful to sanity check building doesn't fall down, and also acts as something to point to if this happens to someone else.

20
General discussions / Re: distributing SFML projects on Linux (binaries)
« on: February 13, 2015, 08:19:13 pm »
If you're using CMake as a build system, there is also support for configuring your projects like Jesper suggests via setting the RPATH: http://www.cmake.org/Wiki/CMake_RPATH_handling

21
General discussions / Re: distributing SFML projects on Linux (binaries)
« on: February 07, 2015, 05:26:10 pm »
Not sure how good a practice this is, probably a terrible one, but at the moment when I'm doing C++ stuff then as a part of my build process, I have CMake copy some launch scripts to the root install directory. The launch script for linux looks something like this:
Code: [Select]
#!/bin/sh

LD_LIBRARY_PATH=$(dirname "$(readlink -f "$0")")/lib exec $(dirname "$(readlink -f "$0")")/bin/engine

Basically it adds the lib folder to the LD_LIBRARY_PATH (and works regardless of where the script is ran from) and then runs the engine executable in the bin folder.

You can actually kinda fake this behaviour for windows too if needed. The equivalent script on windows looks like:
Code: [Select]
@echo off
setlocal
PATH=%PATH%;%~dp0\lib
"%~dp0\bin\engine.exe"
endlocal

22
General / Re: Game Server Structure
« on: October 22, 2014, 08:48:28 pm »
Wasn't a critique, more meant as an additional bit of info :) The you was meant to be a general you, not you you. Kinda confusing, I could of worded it better. As in "Actually this can be surprising, I find it rather interesting". Sorry that intent wasn't clear ^^

23
General / Re: Game Server Structure
« on: October 22, 2014, 07:26:00 pm »
Generally, using a linked list is preferred if you're removing very often from the middle - and especially if you're also storing a large amount of elements.

Actually you'd be surprised. Whilst theoretically list does do the removal quicker, the search for what to remove is still O(N) for both vector and list, and vector has better cache coherence so performs this search significantly faster due to less cache misses. Fast enough that vector can outperform list overall, simply because all those cache misses add up.

It's this reason that even himself advocates viewing vector as the default container, and only using a specialisation like list or set when needed (i.e you need iterates to remain valid after a remove) or when profiling shows you that the removal is costing performance and that the specialisation does indeed overall out-perform a vector.

24
it eliminates the need for that class to access many different systems. Then you are able to keep the physics code for bullets and other things together somewhere and the rendering code together somewhere, without it being intermingled by having bullet code together, code for other single real world object together.

That sounds like exactly what you get with clean OO designs? Like, that's how I'd expect an OO system to look: A place for everything and everything in it's place.

People seem to get way too hung up on the extreme/worst examples "Object Orientated", "Functional" or "Data-Driven" when most applications have to deal with multiple interacting requirements that often are each best suited to different approaches. So which of those approaches should you use? Yes, yes you should.

In the end, all of these approaches exist to solve problems in specific contexts, context matters and often one approach is well suited for one area of the code but isn't for another. Has "Mix-and-match programming" been coined yet? :)

25
General discussions / Re: CLion - A new IDE from JetBrains
« on: September 10, 2014, 07:57:03 pm »
CLion uses the same base as IntelliJ, and a lot of the refactoring functionality it provides is shared with Resharper for C++. If you still want Visual Studio, I highly recommend checking out Resharper for C++.

As the ability to refactor quickly and easily is one of the most useful features an IDE can give you, and as one of the most important parts of any long-term software development is the refactoring, and as good refactoring tools are what JetBrains do best....you can see the appeal of this IDE. Plus, free.

26
General discussions / Re: CLion - A new IDE from JetBrains
« on: September 08, 2014, 09:17:47 pm »
I've been in on the pre-public EAP, is nice IDE. All-in-all by now it's one of the best C++ IDEs I've found, rivalling and surpassing in some aspects Visual Studio. It's based off of the same core as their other IDEs, which are also generally of high quality (IntelliJ is by far the best Java IDE, even Google has replaced Eclipse with it for Android Studio).

27
SFML projects / Re: FlapBoy [#gbjam3] [Flappy Bird Clone]
« on: August 07, 2014, 06:41:12 pm »
That's the recording software. My PVR died this morning so I did the recording quick-and-dirty using SimpleScreenRecorder on my Linux box and it seems for some reason to add a bunch of tearing that isn't in the actual video :S

28
SFML projects / Re: FlapBoy [#gbjam3] [Flappy Bird Clone]
« on: August 07, 2014, 04:12:59 pm »
Point, I've lowered it in the code (it was playing at 100% volume, now it's 20%). I'm not an audio engineer, and heard it so many times it's just white noise at this point. Thanks ^^

EDIT: And video with lowered sound uploaded.

29
SFML projects / FlapBoy [#gbjam3] [Flappy Bird Clone]
« on: August 07, 2014, 03:59:23 pm »
A Flappy Bird clone I made for the #gbjam3, the game is written in C++ using SFML. Supports multiple difficulty modes. Don't hit the pipes or leave the screen. Basically an excuse to play around with some game architecture ideas. And because I figured I was possibly the last programmer on the planet who hadn't cloned Flappy Bird yet.

Screenshots


Videos


Default controls
InGame:
- W: Jump
- Escape: Return To Menu
- P: Toggle Debug View

In Start Menu:
- W: Change Menu Option
- D: Change Difficulty
- Enter: Select Menu Option
Close the window or choose "Quit Game" from the menu to quit.

Download
GameJolt Page to Download
To run, launch FlapBoy.cmd

30
Any scripting system worth it's salt can be interacted with both via script files, but also just executing arbitrary strings it's given. It's useful for debugging.

Almost every commercial game engine out there has a debug command console. Source engine, the Unreal Engine, even the elder scrolls games all give you access to a console for commands. It's a practice that dates all the way back to Doom (okay, probably in games before Doom too but "dates all the way back to Doom" just sounds nice).

It's useful for developers for testing the game, and sometimes gamers will use it to either get out of a bugged situation (turn off collision detection if they get stuck in a wall, for example) or just to cheat (enable god mode, for example).

Pages: 1 [2] 3 4 ... 15