Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Title: Introduction to Splashkit Audio and Music Functions

## Introduction

In this tutorial, you will learn how to work with audio and music in the Splashkit framework. We
will explore various functions that allow you to load, play, pause, and control music tracks within
your Splashkit projects. By the end of this tutorial, you will have a solid understanding of how to
incorporate background music into your games or applications using Splashkit.

## Prerequisites

Before diving into this tutorial, it is essential to have the following prerequisites:

1. **Basic Programming Knowledge:** Familiarity with programming concepts and a general
understanding of coding practices.
1. **C++/C# Programming Language:** Understanding of the C++ and/or C# programming languages,
including variables, functions, loops, and conditional statements.
1. **Integrated Development Environment (IDE):** An IDE set up for C++ development, such as
[Visual Studio Code](https://code.visualstudio.com/)
1. **Splashkit Framework:** Installation of the Splashkit framework on your system. You can find
installation instructions for your operating system on the
[Splashkit website](https://splashkit.io/articles/installation/).

## Functions Used (Link to Splashkit documentation)

1. [load_music](https://splashkit.io/api/audio/#load-music)
1. [music_filename](https://splashkit.io/api/audio/#music-filename)
1. [music_name](https://splashkit.io/api/audio/#music-name)
1. [music_named](https://splashkit.io/api/audio/#music-named)
1. [play_music](https://splashkit.io/api/audio/#group-play-music)
1. [pause_music](https://splashkit.io/api/audio/#pause-music)
1. [resume_music](https://splashkit.io/api/audio/#resume-music)
1. [stop_music](https://splashkit.io/api/audio/#stop-music)
1. [music_playing](https://splashkit.io/api/audio/#music-playing)
1. [music_volume](https://splashkit.io/api/audio/#music-volume)
1. [fade_music_in](https://splashkit.io/api/audio/#group-fade-music-in)
1. [fade_music_out](https://splashkit.io/api/audio/#fade-music-out)

## Table of Contents

1. **Introduction to Splashkit Audio and Music**
1. **Loading and Playing Music**
1. Load music from file.
1. Get music file name.
1. Get music name by index.
1. Play, pause, resume, and stop music.
1. Check if music is currently playing.
1. **Controlling Music Volume**
1. Adjusting the music volume.
1. Fading music in and out.

## Tutorial Details

This tutorial is designed for beginners with a basic understanding of programming and the C++
language. We will cover fundamental audio functions provided by Splashkit, focusing on loading and
playing music tracks. The tutorial will be presented in a step-by-step manner, providing clear
examples and explanations along the way.

## Expected Learning Outcomes

By the end of this tutorial, you will have gained the following skills:

- Loading music tracks from files and accessing their information.
- Playing, pausing, resuming, and stopping music.
- Adjusting the volume of music.
- Fading music in and out for smooth transitions.

## Conclusion

Understanding how to work with audio and music is essential for creating engaging and immersive
experiences in your Splashkit projects. By mastering the functions covered in this tutorial, you
will be equipped to incorporate background music seamlessly into your games or applications.
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
## Tutorial Proposal: Managing Audio Resources in Splashkit

### Introduction

Welcome to Tutorial 3, where we will delve into the art of managing audio resources in Splashkit. In
this tutorial, you'll gain valuable insights into efficiently handling music and sound effects,
allowing you to create more immersive and engaging gaming experiences.

### Prerequisites

Before diving into this tutorial, you should have a basic understanding of programming concepts and
be familiar with working in a development environment. It will also be beneficial to have a grasp of
Splashkit's audio functionalities, as we'll be building upon those concepts.

### Functions Used (Link to Splashkit Documentation)

1. [`free_music`](https://splashkit.io/api/audio/#free-music)
2. [`free_all_music`](https://splashkit.io/api/audio/#free-all-music)
3. [`has_music`](https://splashkit.io/api/audio/#has-music)
4. [`free_sound_effect`](https://splashkit.io/api/audio/#free-sound-effect)
5. [`free_all_sound_effects`](https://splashkit.io/api/audio/#free-all-sound-effects)
6. [`has_sound_effect`](https://splashkit.io/api/audio/#has-sound-effect)
7. [`audio_ready`](https://splashkit.io/api/audio/#audio-ready)
8. [`open_audio`](https://splashkit.io/api/audio/#open-audio)
9. [`close_audio`](https://splashkit.io/api/audio/#close-audio)

### Table of Contents

1. **Introduction to Managing Audio Resources**

- Importance of Efficient Audio Resource Management
- Benefits of Organizing Audio Assets

2. **Freeing Music Resources**

- Releasing Allocated Music Resources
- Freeing All Music Resources Simultaneously
- Checking for the Presence of Music

3. **Freeing Sound Effect Resources**

- Releasing Sound Effects Appropriately
- Freeing All Sound Effects
- Verifying the Existence of Sound Effects

4. **Optimizing Audio Functionality**
- Ensuring Audio System Readiness
- Opening and Closing the Audio System

### Tutorial Details

This tutorial is geared toward individuals with intermediate-level programming knowledge,
particularly those who are working on game development projects using Splashkit. We will provide
step-by-step guidance with practical examples to solidify your understanding of managing audio
resources effectively.

### Expected Learning Outcomes

By completing this tutorial, you will achieve the following:

- Master the techniques to properly release music and sound effect resources in Splashkit.
- Understand how to efficiently organize and manage audio assets within your game projects.
- Gain proficiency in verifying the availability of music and sound effects.
- Learn to optimize audio functionality by ensuring audio system readiness and appropriate system
opening and closing.

### Conclusion

Incorporating captivating audio resources is essential for creating memorable gaming experiences.
This tutorial has equipped you with the skills to efficiently manage audio assets in your Splashkit
projects. By following these best practices, you'll be better equipped to craft games that immerse
players in a world of captivating soundscapes. Start implementing your newfound knowledge to enhance
your game development endeavors!
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
## Tutorial Proposal: Working with Sound Effects in Splashkit

### Introduction

In this tutorial, we will delve into the world of sound effects in Splashkit, a library designed to
facilitate game development. By the end of this tutorial, you will have a solid understanding of how
to incorporate various sound effects into your game projects, enhancing the overall gaming
experience.

### Prerequisites

To make the most out of this tutorial, you should have a basic understanding of programming concepts
and familiarity with using libraries in your projects. It will also be helpful if you have worked
with Splashkit before, as this tutorial builds upon its audio functionalities.

### Functions Used (Link to Splashkit Documentation)

1. [`load_sound_effect`](https://splashkit.io/api/audio/#load-sound-effect)
2. [`sound_effect_filename`](https://splashkit.io/api/audio/#sound-effect-filename)
3. [`sound_effect_name`](https://splashkit.io/api/audio/#sound-effect-name)
4. [`sound_effect_named`](https://splashkit.io/api/audio/#sound-effect-named)
5. [`play_sound_effect`](https://splashkit.io/api/audio/#group-play-sound-effect)
6. [`sound_effect_playing`](https://splashkit.io/api/audio/#group-sound-effect-playing)
7. [`stop_sound_effect`](https://splashkit.io/api/audio/#group-stop-sound-effect)
8. [`sound_effect_playing`](https://splashkit.io/api/audio/#group-sound-effect-playing)
9. [`fade_sound_effect_out`](https://splashkit.io/api/audio/#fade-sound-effect-out)

### Table of Contents

1. **Introduction to Sound Effects in Splashkit**

- What are Sound Effects?
- Importance of Sound Effects in Games

2. **Loading and Naming Sound Effects**

- Loading Sound Effects from Files
- Assigning Names to Sound Effects

3. **Playing and Controlling Sound Effects**

- Playing Sound Effects
- Checking if a Sound Effect is Playing
- Stopping Sound Effects

4. **Enhancing Sound Effects**
- Fading Out Sound Effects
- Applying Sound Effects to Game Scenarios

### Tutorial Details

This tutorial is suitable for beginners and intermediate developers interested in game development
using Splashkit. We will guide you through each step with clear examples and explanations. The
tutorial content is structured to gradually build your knowledge from the ground up.

### Expected Learning Outcomes

Upon completing this tutorial, you will be able to:

- Load various sound effects into your game projects using Splashkit.
- Play, pause, and stop sound effects to synchronize them with game events.
- Apply fading effects to smoothly transition sound effects.
- Incorporate sound effects to enhance user engagement and immersion in your games.

### Conclusion

This tutorial has equipped you with the essential knowledge to manipulate sound effects in your
Splashkit-based game development projects. By mastering these techniques, you can create more
dynamic and captivating games that leave a lasting impression on players. Embrace the power of sound
effects and take your games to the next level!s
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
## Title: Understanding CMakeLists.txt for Building the SplashKit Core Library

As a Splashkit developer I want to learn how the CMakeLists.txt file works for building the
SplashKit core library, So that I can effectively compile and link SplashKit on various platforms
for my game development and multimedia projects.

### Introduction

This tutorial aims to provide readers with a basic understanding of the CMakeLists.txt file used for
building the SplashKit core library. CMake is a powerful build system generator that simplifies the
process of compiling and linking projects across different platforms. By the end of this tutorial,
readers will have a solid grasp of how CMakeLists.txt works for building SplashKit and will be able
to modify it for their own projects.

### Prerequisites

Readers should have:

- Basic knowledge of C++ programming language.
- Familiarity with CMake and its basic syntax.

### Functions Used

1. None

### Table of Contents

1. **Introduction to CMakeLists.txt**

- Understanding the purpose of CMakeLists.txt.
- The role of CMakeLists.txt in building SplashKit.
- Basic CMake syntax.

1. **Directory Setup and Platform Detection**

- Setting up directories for the SplashKit project.
- Detecting the current platform (Windows, macOS, Linux).

1. **Linking Libraries and Frameworks**

- Configuring library and framework flags for different platforms.
- Linking SplashKit with external dependencies.

1. **Source Files and Includes**

- Organising source files for building the SplashKit core library.
- Including directories and header files.

1. **Building the SplashKit Core Library**

- Creating the SplashKit shared library.
- Compiling and linking on Windows (MINGW), macOS, and Linux.

1. **Modifying CMakeLists.txt for Custom Projects**
- Adapting CMakeLists.txt for custom projects.
- Adding new source files and directories.
- Linking additional libraries.

### Tutorial Details

This tutorial will provide a comprehensive explanation of the CMakeLists.txt file used to build the
SplashKit core library. It will cover directory setup, platform detection, linking libraries,
handling source files, and compiling the shared library on different platforms. The tutorial is
aimed at computer science students and programmers who want to gain a deeper understanding of CMake
and learn to customise it for their projects.

### Expected Learning Outcomes

After completing this tutorial, readers will:

- Understand the structure and purpose of CMakeLists.txt in building the SplashKit core library.
- Know how to configure CMake for different platforms (Windows, macOS, Linux).
- Be able to link libraries and frameworks with the SplashKit project.
- Learn how to organise source files and include directories effectively.
- Feel confident in modifying CMakeLists.txt for their own projects.

### Conclusion

Understanding CMakeLists.txt is a valuable skill for readers interested in managing complex build
processes. By mastering the concepts presented in this tutorial, readers will be well-equipped to
work with CMake and customise it according to the requirements of their projects. So, let's delve
into the world of CMake and unleash the full potential of SplashKit in game development and
multimedia applications!
Loading