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

Pages: [1] 2 3 ... 6
1
SFML projects / Re: FM Composer - A sound & music creation tool
« on: June 02, 2018, 02:34:45 pm »
I successfully merged your work into the master branch, you're now part of the contributors to the project :)

I saw LAME MP3 was disabled by some ifdef conditions, is it because it wasn't possible to compile LAME on your distrib ?

2
General / Re: player.move() sends player into wal
« on: June 01, 2018, 04:17:04 pm »
The usual way of doing this is to separate the collision checks depending on the acceleration sign :

// player moving to the right
if(xacc > 0 && collision) xplayer = xwall - widthplayer;

// player moving to the left
if(xacc < 0 && collision) xplayer = xwall;
 

It'll works great for any speed lower than your object/tile width

3
General / Re: How to do text selecting?
« on: May 31, 2018, 05:47:32 pm »
it doesn't has much to do with SFML, but i'd create an enum listing your choices

enum choices{CHOICE_FIGHT, CHOICE_FLEE.....};

Then you have some variable telling where your cursor is :

int currentChoice=0;

Then you listen for the player moving the cursor :

const int maxChoices = 2;

if(key.up && currentChoice >0) currentChoice--;
if(key.down && currentChoice <maxChoices -1) currentChoice++;
 


... Then you do the appropriate action if he press enter :

if(key.enter)
{
switch(currentChoice)
{
case CHOICE_FIGHT: doFight();break;
case CHOICE_FLEE: doFlee();break;
}
}


If you need to add more choices, simply increase maxChoices and add a new case in the switch...
Does that answer to your question?

4
Feature requests / Re: Better gamepad support
« on: May 31, 2018, 02:04:08 pm »
I'd like to add gamepad support for my game, is there some place I can found something already written ?

I can help but please, don't debate endlessly if it should be included or not in SFML, most likely it should. If SDL did something, it's probably for a good reason, it's worth for SFML to take inspiration from it.

5
General discussions / Re: SFML 2.5.0 released
« on: May 30, 2018, 05:27:13 pm »
I hate AVs even more than viruses. People need to know the truth -- all they need is an up-to-date OS, a good browser and a brain. Nothing more!

From my experience, I had false positives when my app wrote files in its own directory. Everything were fine after I started to use the AppData (ProgramData on Win10) folder which is meant for this purpose. I'm still not a big fan of having an app writing things in multiples directories but seems we don't have the choice

6
Graphics / Re: sf::Color toInteger() returns ARGB instead of RGBA ?
« on: May 29, 2018, 10:37:49 pm »
Well sorry I did a mistake somewhere, it's totally my bad. I was expecting that:
buffer[4*(i+j*width)+0]=R;
buffer[4*(i+j*width)+1]=G;
buffer[4*(i+j*width)+2]=B;
buffer[4*(i+j*width)+3]=A;
(for a pixel buffer to load with image.create())

Was the same as
uintbuffer[i+j*width]=RGBA; // RGBA = 0xff0000ff for a red color for example
 

But for some reason it's reversed (some endianness thing ?), I need to write the int in ABGR format to get the correct color once loaded with image.create()

7
Graphics / sf::Color toInteger() returns ARGB instead of RGBA ?
« on: May 29, 2018, 09:55:48 pm »
Hello

I found that the toInteger() function from sf::Color returns components in ARGB instead of RGBA format, which is not very compatible with the rest of the API which uses RGBA format. Is it a bug or it's meant to work like that ?

8
It depends, if it's a global object that is allocated only once at game startup then you don't need to delete it, although it's considered good practice to delete everything manually so everything is cleaned up properly in the right order

9
SFML projects / Re: FM Composer - A sound & music creation tool
« on: May 20, 2018, 12:06:42 pm »
Can I link your repo in the project's description and on the website ?

Would be nice to have the compiled binary too, to avoid linux users having to build it manually (however i'm not sure how the compatibility works - If you compile on Ubuntu, will the binary be Ubuntu-compatible only?)

10
SFML projects / Re: FM Composer - A sound & music creation tool
« on: May 20, 2018, 03:59:48 am »
Aww great work !
I looked at bit at your changes, most of them should be harmless, in fact for some of them it's my fault (like the "struct export export" which is ok in my compiler but bad practice).

Are templates better than defines for things like min/max/clamp ?

The only potentially problematic thing is :
/* avoid slow float denormals + round floats down (needed if program compiled with QIfist option (FISTP) fast int/float conversion) */
+               #ifdef _WIN32
                _control87(_RC_DOWN, _MCW_RC);
+               #endif
 

FM Composer is expected to be compiled with the QIfist flag (probably VC++ specific) that allow to speed up float to int conversions by using faster FISTP assembly calls than the slow ftol() from the C library. This method also rounds floats instead of trucating them down as a collateral effect, thus this _control87 force floats to be rounded down again. There are two possible choices :

- Use default C int/float conversions and remove _control87 like you did, which works but worse performance (would be nice to see how much worse it is, maybe it's acceptable)
- Find some way to do it on Linux. I don't know if some compiler flag exists like MSVC's QiFist, but basically it does something like this for conversion :

int convert(float x)
{
    int n;
    __asm {
        fld x
        fistp n
    }
    return n;
}
Then we'd need to find a way to tell the fpu to round down the floats, like _control87 did.


I'd be happy to try your code and integrate it into the main branch once we've tested it !

11
SFML projects / Re: FM Composer - A sound & music creation tool
« on: May 11, 2018, 05:26:53 pm »
FM Composer songs can be easily played in any C/C++ software

https://github.com/stephanedamo/fmcomposer/tree/master/src/fmengine

I wrote a short manual on how to use FM Composer's FM engine in your applications.

It should be very easy to integrate into any SDL/SFML/other app.

You basically create an instance of the FM player, tell it to play a .fmcs file, and that's it. The FM engine can render classic stereo 16 bit audio data that is easily sent to a custom SFML audio stream (see https://www.sfml-dev.org/tutorials/2.0/audio-streams.php )

I'm waiting for the first games that will use this :)

12
SFML projects / Re: FM Composer - A sound & music creation tool
« on: April 19, 2018, 12:04:04 pm »
Have you tried it ? It may be a bit confusing if you never user trackers or DAWs, but I think you can rapidly get some results by looking at the existing songs. A good basis would be to look at Dustin Stroh's songs, he shared his source files here : http://fmcomposer.org/resources.php

Apart from that, new features were added : like mutitrack export, high-density screen support, lowered CPU usage... :)

A new song created with FM Composer by another user : QIem2E&list=PLHv0qOxpb31967tQHFbwWplSMPTgd152H[/url]


Enjoy!

13
SFML projects / Re: ALAGEngine - 2.5D Isometric Shading Engine
« on: April 17, 2018, 05:51:50 pm »
Wow, it looks very nice !

The only thing that makes those water movements unrealistic is (in my opinion) the linear speed which seems to be applied to them. Having different speeds depending on the 'wave state' would make it less floaty (like a wave is slowly rising, then rapidly falling/splashing, with parts of it moving faster than the main water mass)

14
SFML projects / Re: FM Composer - A sound & music creation tool
« on: April 03, 2018, 04:38:33 pm »
Thanks ! Don't hesistate to ask me for any question or feature request :)

I'm very happy with SFML, approx 600 downloads and nobody had any problems running the program on their computer.


One of my users created this mario remix :



And I did a little cover of this famous boss music from FF8 :




15
SFML projects / Re: ALAGEngine - 2.5D Isometric Shading Engine
« on: February 27, 2018, 11:53:55 am »
In fact, from my experience, the two things that made me drop Holyspirit was the production of assets (it requires a lot of time and it's not really my cup of tea, even if I was helped a lot by my brother at that time) and the messy code (at some point it was not bearable to do bug chasing and add functionnalities, so I would like not to fall in this trap again).

I had the same problem with assets. I started a nice platformer with a sonic-like engine (handling momentum and walking on slopes), but when the asset creation time came, I felt overwhelmed by the amount of work that needed to be done and got demotivated.

For the code don't try to make the best the first time, follow a simple rule "every time I modify my code, I should make it of equal quality or better, not worse". I've applied this rule to my program and worked very well. Every time I worked on a piece of code that started to get out of control, I took some time to improve it just enough to make it easy to work with again. Then repeat the process... It allows to avoid focusing too much on 'over engineering', just add the needed level of complexity, not more.

Pages: [1] 2 3 ... 6