Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Lua Game Development Cookbook
  • Table Of Contents Toc
Lua Game Development Cookbook

Lua Game Development Cookbook

By : Mário Kašuba
4.3 (6)
close
close
Lua Game Development Cookbook

Lua Game Development Cookbook

4.3 (6)
By: Mário Kašuba

Overview of this book

This book is for all programmers and game enthusiasts who want to stop dreaming about creating a game, and actually create one from scratch. The reader should know the basics of programming and using the Lua language. Knowledge of the C/C++ programming language is not necessary, but it's strongly recommended in order to write custom Lua modules extending game engine capabilities or to rewrite parts of the Lua code into a more efficient form. Algebra and matrix operations are required in order to understand advanced topics in Chapter 4, Graphics – Legacy Method with OpenGL 1.x-2.1 and Chapter 5, Graphics – Modern Method with OpenGL 3.0+. Sample demonstrations are coupled with binary libraries for Windows and Linux operating systems for convenience.
Table of Contents (11 chapters)
close
close
10
Index

Introduction


In this chapter, you'll learn how to use the sound subsystem in LuaSDL and to communicate over the network or between the threads with the ZeroMQ library.

Sounds and music in games can enhance the overall atmosphere or make them even more memorable to players. The LibSDL library itself contains only the basic function to send raw data to your audio card. Fortunately, the LuaSDL library bundles the LibSDL library with the SDL_Mixer add-on, which extends a number of audio file decoders and adds simple audio effects, such as volume control, fade-in, and fade-out. You can load sound samples by using one of these file formats: WAV, MID, MOD, OGG, or MP3.

Whether or not you plan to use multiplayer, the ZeroMQ library can solve many common problems with network communication or multithreading.

This library provides a robust yet simple communication system. It supersedes classic socket connections with reliable message transport and automatic reconnection. Optionally, connections can be...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Lua Game Development Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon