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

Pages: [1]
1
Thank you. I pulled the latest build and is indeed a lot faster. Though it is still fairly slow (takes ~10 seconds to load all the sounds vs less than 1 second in 2.3.2). Are there any plans to take another look at this?

2
Just chiming in on this. I think a new solution will need to be found. This is incredibly slow and it's unrealistic for real-world games to suffer a minute+ delay just from loading sounds.

At a bare minimum, a non-compile bypass will need to be added (eg, an ignoreMetaData argument in SoundBuffer::loadFromFile)

edit: I took a quick look at the code. I'm not 100% how the read() function works, but couldn't the decode function return the number of bytes read, and the current position be tracked that way, instead of using tell()?

3
General / Re: Now to the ram "issues"
« on: December 07, 2017, 12:02:27 am »
Speaking in a very general sense, most of the time there is a trade-off:
  • Lower in-memory usage, but slower access (because items need to be dynamically processed).
  • Faster access, but more memory usage.

This trade off can easily be seen via things like math lookup tables. You can run the function pow(2, x) every time you need it, or if you know that x will always be a positive integer, you can build a table ahead of time and look it up instead. The former uses less memory but is much slower, the latter uses more memory and is much more limited, but is a lot faster.

The conclusion, therefore, is to draw little connection between ram consumption and performance.

4
General / Re: How would i make the games logic
« on: December 06, 2017, 11:46:52 pm »
I don't like needless polymorphism, so all my enemies and items are the same class, with a few minor differences between them:
  • They each have an objectType enumeration that can be used to tell their generic type apart
  • They are added to different object lists for things such as collisions. For example, only the player can collide with and interact with items, only enemies and obstacles can collide with player bullets, etc. These lists can also be used by the code to loop through a specific type quickly.
  • Their major differences are handled via scripting, but that might be a bit too advanced for a first game. Our game currently uses Lua, but I would highly recommend ChaiScript because of its ability to directly map to your C++ data. Since the introduction of C++11, Lua has become more and more problematic to work it. Its one major draw is its ability to use coroutines, which allows for very clean scripting. However, C++ may gain coroutine capabilities as early as C++20, so soon ChaiScript may also support them.

5
Feature requests / Axis 9 and 10 for proper Xbox trigger support
« on: December 05, 2017, 10:27:23 pm »
Based on this article the 360/Xbox One trigger issue can be solved by accessing axes 9 and 10. SFML currently only supports up to eight axes, so this solution cannot be used. Are there any difficulties in adding access to a ninth and tenth axis?

6
Feature requests / MP3 is now free
« on: July 05, 2017, 09:35:28 pm »
Since all known mp3 patents have expired as of April 2017, the format is now technically "free," and can be included in SFML with no legal issues. Just thought you should know.  ;)

Pages: [1]
anything