Jump to content
  • Advertisement
  • entries
  • comments
  • views

Week of Awesome III, Part 5: Let there be light... and music!

Sign in to follow this  


For me this has been day 6. I skipped a day because implementing sounds proved to be more difficult than I thought. It does sound simple, doesn't it? You'd think it would be something such as this:
s = Sound("path/to/sound.wav")s.play(volume=1.0)
But unfortunately the audio interface provided by SDL2 is very low level. You literally have to load the binary buffer of a WAV file and copy bits of it into a stream when its requested by a callback function. Anyway, I do have it working, but only for one sound for now. The music I picked is "Quiet Tension" by Eric Matyas (his website is http://soundimage.org/). I also credited him in the game of course. Simply adding some background music really does wonders for the atmosphere. It feels much more spooky now.

But do you know what also adds a lot of atmosphere? Lighting! Previously everything was shaded fullbright which is pretty ugly. Now every object is lit by two directional lights, front and back, and can also be lit by point lights. Although I haven't added much point lights yet. The reason I went for two directional lights which oppose each another is so you can also color the shadow differently than the front lit side of the object. This looks a lot nicer than just making the other side of the objects darker.

Lastly a big feature I've implemented is transitions between levels, which also means I've added another area. For now I've just added a starting area, but I'm planning to spend most of the last day on making new areas. Otherwise the game will be a bit short. I'm also hoping to add some secret areas, that'll make for a fun challange for the other people following the week of awesome.

Download link:
Sign in to follow this  


Recommended Comments

hey man smile.png i couldn't play it... i got this error...





In the error.log:


Error occured on version 0.0.5 
Traceback (most recent call last):
  File "<string>", line 1094, in <module>
  File "<string>", line 1080, in run
  File "E:\Projects\weekofawesomeiii\build\pyi.win32\adad\out00-PYZ.pyz\snowy.game", line 135, in mainLoop
  File "<string>", line 1074, in render
  File "<string>", line 650, in __init__
  File "<string>", line 744, in _loadLevel
  File "E:\Projects\weekofawesomeiii\build\pyi.win32\adad\out00-PYZ.pyz\snowy.program", line 232, in setUniform
Exception: No uniform called lightPositions exists.

Share this comment

Link to comment
same issue as rodolfodth.

edit: tried the new build in the thread, works for me, left comments in my post in the thread.

Share this comment

Link to comment

I know the feel. Audio can be a bitch, especially if you're working on a game where there's too much of it (then you may end up simulating an alternating 4-8 tracks system like I did for NO REASON!).


Keep it up!

Share this comment

Link to comment

@rodolfodth and @slicer: Yeah it's fixed in v0.0.6. Apparently nvidia drivers handle for-loops differently than AMD drivers.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!