• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 12:40
CEST 18:40
KST 01:40
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
BGE Stara Zagora 2025: Info & Preview27Code S RO12 Preview: GuMiho, Bunny, SHIN, ByuN3The Memories We Share - Facing the Final(?) GSL47Code S RO12 Preview: Cure, Zoun, Solar, Creator4[ASL19] Finals Preview: Daunting Task30
Community News
Weekly Cups (June 2-8): herO doubles down1[BSL20] ProLeague: Bracket Stage & Dates9GSL Ro4 and Finals moved to Sunday June 15th13Weekly Cups (May 27-June 1): ByuN goes back-to-back0EWC 2025 Regional Qualifier Results26
StarCraft 2
General
Firefly do had match fixing CN community: Firefly accused of suspicious activities The SCII GOAT: A statistical Evaluation How does the number of casters affect your enjoyment of esports? Serious Question: Mech
Tourneys
$3,500 WardiTV European League 2025 Bellum Gens Elite: Stara Zagora 2025 Sparkling Tuna Cup - Weekly Open Tournament SOOPer7s Showmatches 2025 Master Swan Open (Global Bronze-Master 2)
Strategy
[G] Darkgrid Layout Simple Questions Simple Answers [G] PvT Cheese: 13 Gate Proxy Robo
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 477 Slow and Steady Mutation # 476 Charnel House Mutation # 475 Hard Target Mutation # 474 Futile Resistance
Brood War
General
Will foreigners ever be able to challenge Koreans? BGH auto balance -> http://bghmmr.eu/ Mihu vs Korea Players Statistics BW General Discussion [BSL20] ProLeague: Bracket Stage & Dates
Tourneys
[ASL19] Grand Finals NA Team League 6/8/2025 [Megathread] Daily Proleagues [BSL20] ProLeague Bracket Stage - Day 2
Strategy
I am doing this better than progamers do. [G] How to get started on ladder as a new Z player
Other Games
General Games
Stormgate/Frost Giant Megathread What do you want from future RTS games? Armies of Exigo - YesYes? Nintendo Switch Thread Path of Exile
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
LiquidLegends to reintegrate into TL.net
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread Vape Nation Thread European Politico-economics QA Mega-thread
Fan Clubs
Maru Fan Club Serral Fan Club
Media & Entertainment
Korean Music Discussion [Manga] One Piece
Sports
2024 - 2025 Football Thread Formula 1 Discussion NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Cognitive styles x game perf…
TrAiDoS
StarCraft improvement
iopq
Heero Yuy & the Tax…
KrillinFromwales
I was completely wrong ab…
jameswatts
Need Your Help/Advice
Glider
Trip to the Zoo
micronesia
Poker
Nebuchad
Customize Sidebar...

Website Feedback

Closed Threads



Active: 21371 users

Student Game Dev Part 21 - Background music

Blogs > Soan
Post a Reply
Soan
Profile Blog Joined August 2010
New Zealand194 Posts
April 18 2014 21:59 GMT
#1
+ Show Spoiler [Previous parts] +
Part One - It begins
Part Two - Technical Foundation
Part Three - Game Design
Part Four - Input and Physics
Part Five - More Physics Things
Part Six - Even More Physics
Part Seven - User Interface
Part Eight - UI and the Editor
Part Nine - Editor Progress
Part Ten - Progress, and videos
Part Eleven - Fixing the Physics
Part Twelve - Unproductive
Part Thirteen - Context menu + enemies
Part Fourteen - Enemies and Problems
Part Fifteen - Play testing
Part Sixteen - Editor and Art
Part Seventeen - Video!
Part Eighteen - Layers and Music
Part Nineteen - Water and Enemies
Part Twenty - Score and decisions


This Week
Hello again TeamLiquid! Welcome back to my blog about the development of The Adventures of Sam the Pirate, the 2D platformer I'm creating as the final game project for my Bachelor of Software Engineering degree. Last week I talked about implementing the score and displaying it. I'll also talk about a decision I made regarding the number of levels, and have another new piece of music. This week I'll be talking about implementing FModto play background music. Bit of a shorter blog this week, as I've been looking for a new place to live, and shifting into some temporary accommodation in the mean time. So not as much time to work on the game as I would like, but that's real life for you I suppose. It's also Easter weekend!

Background Music
Integrating FMods low level api turned out to be really easy. Once it had been installed, I shifted the header, library, and dll files over into my project, so if I was to rebuild it on a different machine it will all just work, and took a look at the included example files on how to play sounds. Initializing FMod was only a few lines of code.

FMOD::System* system = 0;
FMOD::System_Create(&system);
UInt32 version = 0;
system->getVersion(&version);
if (version < FMOD_VERSION)
{
&nbsp;&nbsp;&nbsp;&nbsp;// incompatible version, throw an error
}
void* extraDriverData = 0;
system->init(32, FMOD_INIT_NORMAL, extraDriverData);


Once that was done, I could start playing sounds with only a couple more lines of code. There's some further error checking being done, but I've left it out of this example block of code. The function calls return an FMOD_RESULT, which can be checked to see if it is ok, and if not, there is another function to get what the error is.

Playing background music is similarly easy. Create the sound in FMod, then play the sound. Rather than load the music directly into memory, the file is being streamed as it is played.

Music
New piece of music this week, a piece I'm considering for the cave area of the game.

Oops, looks like your browser doesn't support the audio tag yet. You can download the file manually: http://swashbucklinstudios.com/wp-content/uploads/2014/04/Dark-theme-Area.mp3

If you're interested in more music from the artist, he has a website over at Eternal Vibration that you can check out.

What's next?
Next week I'll get sound effects working, and start on a level selection screen. Next week is a short week as well, two public holidays!

Keep up to date!
Be sure to follow me on Twitter, and like the Facebook page to stay up to date on future content and blog posts when they happen. If you have any questions don't hesitate to ask, either through Twitter or Facebook! You can also check out the blog, previous posts, screenshots and videos over at my site.

Assault_1
Profile Joined April 2009
Canada1950 Posts
April 19 2014 00:56 GMT
#2
I was reading your physics sections and it reminded me of a project I did for my graphics course at university. A physics-based bouncy ball game, in C++/opengl. I have a math/physics background and implemented sphere-sphere, sphere-box, and sphere-inclined box collisions, it took a fairly long time. The whole project took about 100 hours.


I have quite an interest in simulating physics on a computer, I wish I knew more about it. Anyway I had trouble with the marble touching two objects at the same time, it would eventually sink into one of them and I spent a few hours trying to fix it but had to move on to other stuff. In the vid above I conveniently spaced everything far apart enough so you can never touch two objects. I was trying to research this kind of stuff but there didn't seem to be any great sources on it.. like everyone keeps their solutions to themself.

If I had another 100 hours I'd try to implement a squishy ball like this:
Deranes
Profile Joined July 2010
Germany75 Posts
April 20 2014 18:42 GMT
#3
On April 19 2014 09:56 Assault_1 wrote:
Anyway I had trouble with the marble touching two objects at the same time, it would eventually sink into one of them and I spent a few hours trying to fix it but had to move on to other stuff.


Richard Tonge from NVIDEA talked about how to solve this at GDC 2013. Here is a link to the pdf of the presentation:
http://www.gdcvault.com/play/1018160/Physics-for-Game
It starts on page 38 in the pdf, or page 36 if you follow the numbers printed on the pages.
Assault_1
Profile Joined April 2009
Canada1950 Posts
April 21 2014 02:44 GMT
#4
On April 21 2014 03:42 Deranes wrote:
Show nested quote +
On April 19 2014 09:56 Assault_1 wrote:
Anyway I had trouble with the marble touching two objects at the same time, it would eventually sink into one of them and I spent a few hours trying to fix it but had to move on to other stuff.


Richard Tonge from NVIDEA talked about how to solve this at GDC 2013. Here is a link to the pdf of the presentation:
http://www.gdcvault.com/play/1018160/Physics-for-Game
It starts on page 38 in the pdf, or page 36 if you follow the numbers printed on the pages.

wow, that got pretty complex! Very cool, howcome nvidia gives away its secrets though, I thought this is private R&D stuff?
Also do you think this would've been possible to implement in 100 or so hours?
Deranes
Profile Joined July 2010
Germany75 Posts
April 21 2014 13:42 GMT
#5
On April 21 2014 11:44 Assault_1 wrote:
wow, that got pretty complex! Very cool, howcome nvidia gives away its secrets though, I thought this is private R&D stuff?

This is just me guessing but heres my thoughts. By telling game programmers how to make a rigid body contact solver that runs efficiently in parallell. Then the physics in their games are going to be able to handle more collisions than before, using the 4 or so cores on the CPU. But the GPU can run waaay more collisions in parallel using it's compute shader than the CPU can. So the physics might start being implemented on the GPU instead in more games. Then some gamers will have to upgrade their graphics cards in order to run the game. Which makes nvidea money since they sell graphics cards.
On April 21 2014 11:44 Assault_1 wrote:
Also do you think this would've been possible to implement in 100 or so hours?

I haven't done it myself yet but I have a hunch that it should be easy to implemented a physics engine using those ideas in less than 100 hours.
Please log in or register to reply.
Live Events Refresh
Next event in 7h 20m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ProTech101
StarCraft: Brood War
Rain 8613
EffOrt 1608
Horang2 724
Stork 552
firebathero 177
Snow 169
Sharp 137
Yoon 58
sas.Sziky 56
sSak 56
[ Show more ]
Movie 50
Pusan 49
Barracks 45
sorry 39
Hyun 35
Sacsri 31
Terrorterran 27
Rock 24
Backho 15
Dewaltoss 5
Dota 2
Gorgc7972
qojqva3699
syndereN523
Counter-Strike
fl0m5501
olofmeister715
rGuardiaN96
FunKaTv 80
Super Smash Bros
Mew2King70
Other Games
tarik_tv53104
gofns13512
summit1g3265
B2W.Neo1268
Beastyqt725
hiko671
Lowko349
Hui .257
ArmadaUGS174
KnowMe86
Trikslyr76
QueenE64
Organizations
Dota 2
PGL Dota 2 - Main Stream501
StarCraft 2
angryscii 23
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• Adnapsc2 38
• poizon28 36
• OhrlRock 2
• IndyKCrew
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• LaughNgamezSOOP
• Migwel
StarCraft: Brood War
• Rasowy 7
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 4494
League of Legends
• TFBlade1228
Other Games
• Shiphtur275
Upcoming Events
Replay Cast
7h 20m
Replay Cast
17h 20m
WardiTV Invitational
18h 20m
WardiTV Invitational
18h 20m
PiGosaur Monday
1d 7h
GSL Code S
1d 16h
Rogue vs GuMiho
Maru vs Solar
Online Event
2 days
Replay Cast
2 days
GSL Code S
2 days
herO vs Zoun
Classic vs Bunny
The PondCast
2 days
[ Show More ]
Replay Cast
3 days
WardiTV Invitational
3 days
OSC
3 days
Korean StarCraft League
4 days
CranKy Ducklings
4 days
WardiTV Invitational
4 days
Cheesadelphia
4 days
GSL Code S
5 days
Sparkling Tuna Cup
5 days
Replay Cast
6 days
Liquipedia Results

Completed

CSL Season 17: Qualifier 2
BGE Stara Zagora 2025
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
KCM Race Survival 2025 Season 2
NPSL S3
Rose Open S1
CSL 17: 2025 SUMMER
2025 GSL S2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
ECL Season 49: Europe
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025
PGL Bucharest 2025
BLAST Open Spring 2025

Upcoming

Copa Latinoamericana 4
CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
K-Championship
SEL Season 2 Championship
Esports World Cup 2025
HSC XXVII
Championship of Russia 2025
Murky Cup #2
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.