nightm4re To load sounds from code, create a "/sounds/" folder in your main project directory (NOT the /resources/ directory!) where you place your sound files. Then, call Sound.get("zombie-scream1.ogg") to load an example Sound.
Just a clarification: It doesn't necessarily have to be a folder called
The most important thing about assets in general (images, fonts, sounds, textfiles, ...) is that the path that they are retrieved by should be relative to the application folder. All the folders that contain such resources should be defined as
src classpath entries. During compilation, the contents of these files will then be copied to the respective output directory and thereby be available on the root dir. Thereby, you never have to specify the base folder (e.g. sounds, resources) when accessing assets via
Example from a
<?xml version="1.0" encoding="UTF-8"?>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="resources"/>
<classpathentry kind="src" path="maps"/>
<classpathentry kind="src" path="sounds"/>
Example files: (assuming
misc are source folders)
Sidenote: also localization should not force the subfolder
localization/ and should behave similarly to images and fonts. I've opened GitHub Issue #189 for this topic.