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

Pages: [1]
1
DotNet / Re: C#, How to code an entity Drawable and Transformable?
« on: June 19, 2020, 04:13:40 pm »
Oh damn! I feel so bad with myself xD, thanks so much!

2
DotNet / C#, How to code an entity Drawable and Transformable?
« on: June 18, 2020, 03:26:02 pm »
Hi all, I'm porting my project from C++ to C# and I encountered a problem, I have a class Entity that inherits from Drawable and Transformable, but C# doesn't allow multiple inheritance. How can I do that? Thanks in advance.

3
General / Re: Count events pending
« on: July 25, 2019, 07:03:49 pm »
The idea is doesn't call translate function every frame, only when specific events occurs. I will use flags for detecting it then. Anyway, thanks.

4
General / Re: Count events pending
« on: July 25, 2019, 06:12:31 pm »
why do you need to call a function when you process the last event?
I'm making an Input Handler System that contains a circular buffer, capturing all inputs (pressed and released), only of buttons I previously defined for player asociated to the Input Handler.

The circular buffer stores tuples like this std::tuple <Game::Buttons, int , bool>; First one is an action I can do asociated to a key, second one is realtive delay between this button and the last one, and the third one indicates if button was pushed or released.

[Game::UP_BUTTON,   0, 1]
[Game::UP_BUTTON,   1, 1]
[Game::UP_BUTTON,   1, 1]
[Game::UP_BUTTON,   0, 0]
[Game::UP_DOWN,     2, 1]
[Game::UP_LEFT,     1, 1]
[Game::UP_DOWN,     2, 0]
[Game::A_BUTTON,    3, 1]
[Game::B_BUTTON,    0, 1]
 

My Input Handler System calculates what commands were released in each frame. For example, according to the table above:
- In the first frame with events only UP was pressed. Is equal to U (UP).
* Buffer: U
- In the second frame with events only UP was released. Is equal to -.
* Buffer: U
- In the next frame with events there was two events, press and release UP, then is equal to - (nothing happends).
* Buffer: U
- In the next frame with events DOWN is pressed. Is equal to D (DOWN).
*Buffer: U D
- In the next frame with events LEFT is pressed (and DOWN is still pressed). Is equal to DL (DOWN-LEFT).
* Buffer: U D DL
- In the next frame with events DOWN is released (DOWN and LEFT were pressed). Is equal to L.
* Buffer: U D DL L
- In the next frame with events A and B are pressed at the same time. Is equal to A + B.
* Buffer: U D DL L A+B

My translation system from buffer to commands works perfectly, but I have to call this function after capturing all inputs. If I translate them while I capture each event there are problems, for example: I press and release UP at the same frame, then my system translate it to: "U" (UP), but "U" was released, then, it should happends nothing. Other example is when I calculate move inputs: I need to know what move commands where pressed or released at the same time to calculate a move command according to the next logic table:

UPDOWNLEFTRIGHTCOMMAND
0000-
0001R
0010L
0011-
0100D
0101DR
0110DL
0111D
1000U
1001UR
1010UL
1011U
1100-
1101R
1110L
1111-

Because of I need to have captured all events for translating buffer to readable commands thats the reason I need to call translate function after all events are polled.

Sorry if my English is bad, and sorry about writting to much xD.

5
General / Count events pending
« on: July 24, 2019, 09:07:26 pm »
Hi all. I need to know how many events of a specific type are pending before processing all of them because when I process the last event I need to call to a function. Is there a way to iterate all events pending? Thanks in advance.

6
General / Problems with CodeBlocks and SFML
« on: January 19, 2019, 10:26:11 pm »
Hi all, I tried to configure CodeBlocks with SFML. I followed the guide and I got an error when I execute a SFML program (sorry, it's in Spanish but I think you can understand it):



The program is compiled without problem.

I configured CodeBlocks with SFML before and it worked, but I don't know what can be the problem now, I used GCC 5.1.0 TDM (SJLJ) - Code::Blocks - 32-bit and TDM 5.1.0 (32-bit).

Thanks in advance.

7
General / Re: SFML and QT IDE
« on: March 28, 2018, 10:54:32 pm »
ok! thanks to Exploiter and AlexAUT! I will try it tomorrow.

8
General / SFML and QT IDE
« on: March 28, 2018, 06:08:58 pm »
Hi all, I'm new here. I'm working in a proyect since 3 months ago and I have a problem, I hate Visual Studio IDE and I would like to work in QT IDE. Before configuring QT I would like to know if it's possible to use SFML libraries with QT IDE without problem, I'm not going to use QT libraries, only IDE. Thanks a lot in advance and sorry if my English is bad.

Pages: [1]