sound.....platforms....and a map!

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
x_eqis
Posts: 18
Joined: April 10th, 2012, 5:37 pm

sound.....platforms....and a map!

Post by x_eqis » May 1st, 2012, 4:20 pm

hey there,

I've worked on my first flying thing game, so it now has:

-sound
-carribean background music
-scrolling
-platforms you can jump on
-a small overview map on the top right

Please know that I've upped the resolution to about 1200 x 720, so it will murder your netbook cold-heartedly.

I ADORE the new sound function... :shock: <-- that's me adoring

however, I would still like to know whether there are easy ways to:

-STOP sounds instead of just starting them
-check whether a certain sound is still playing (or use some sort of timing function?)
-change the sound file format to mp3
(without re-writing the whole framework, that is..)

anyone has any idea about that?
Attachments
scrollingx_nomusic.rar
version w/out music for people with tiny harddrives
(195.91 KiB) Downloaded 369 times
scrollingx_music.rar
version with background music
(9.22 MiB) Downloaded 375 times

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: sound.....platforms....and a map!

Post by chili » May 1st, 2012, 4:41 pm

Hi Eqis, thanks for sharing as always. Can't wait to try out your new toy. :)

Stopping sound: easily implemented, I will add it if you need it.
Checking whether a sound is playing: not as easy, but I think I could do that without breaking a sweat either.
MP3: I would have to look into it. Might not be that hard.

At least you didn't make the resolution like 2400 x 1600 or something crazy like that. Crazy guy.
Chili

x_eqis
Posts: 18
Joined: April 10th, 2012, 5:37 pm

Re: sound.....platforms....and a map!

Post by x_eqis » May 1st, 2012, 5:16 pm

chili wrote: At least you didn't make the resolution like 2400 x 1600 or something crazy like that. Crazy guy.
Actually I'm thinking about professionally developping a triple monitor version of pong, I mean, what else could people want? :roll:


concerning checking the sound:
in this case, I just meant to start the background music again after it has finished. Maybe this could be better implemented by a simple function like
"if 3m20s have passed, start music again"
Haven't I seen a "timer.cpp" anywhere?

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: sound.....platforms....and a map!

Post by chili » May 3rd, 2012, 5:51 am

Played the game eqis, impressive as always bro. The minimap was a very nice touch.

The solution of checking how much time has passed will work fine. There are many ways to do this, the three that spring immediately to mind are:

Using the time() function from the standard c library.
Using the Timer object that is included in the framework.
Using the game frames to count time (1 frame = 1/60 sec).

I could just show you the code for how to do this, but I think this would be a good oppotunity to improve your research skills, so try to figure it out on your own Eqis. :)
Chili

x_eqis
Posts: 18
Joined: April 10th, 2012, 5:37 pm

Re: sound.....platforms....and a map!

Post by x_eqis » May 4th, 2012, 6:05 pm

hey chili,
just saw in the video you failed miserably at eating enough faces :lol: ...sorry about that, keep on it...but honestly: I do feel very honoured you showcase those little games although compared to your skills it must look like real bullcrap to you.

I think I master the timing now (I used the frame method because it was the laziest way), so I created a small sequenzer style demo which I will post in a new thread.
I hope you don't get annoyed with me coming up with every little progress I make..it's not that I hang around at home all day, I'm a regular working class eqis. It's rather that I've suspended much of my social life for weeks in order to spend time with programming - which, by the way, is fucking addicting! You understand this makes you some kind of pusherman? Do you feel guilty at all?

User avatar
cookiez
Posts: 12
Joined: May 3rd, 2012, 6:16 pm

Re: sound.....platforms....and a map!

Post by cookiez » May 4th, 2012, 6:22 pm

Amazing project! And as I can tell by the comments in your code (I is avery smart cookiez) , you are a german fella too! :D

x_eqis
Posts: 18
Joined: April 10th, 2012, 5:37 pm

Re: sound.....platforms....and a map!

Post by x_eqis » May 4th, 2012, 6:37 pm

well discovered cookiez :) - in der Tat sehr smart!

User avatar
cookiez
Posts: 12
Joined: May 3rd, 2012, 6:16 pm

Re: sound.....platforms....and a map!

Post by cookiez » May 4th, 2012, 7:08 pm

:) You seem to have learned a lot already. I'm really impressed. Looking forward to be a pro-programmer like you guys! :D

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: sound.....platforms....and a map!

Post by chili » May 5th, 2012, 5:03 am

You can't throw a stone in here without hitting a German or Dane. :)

Actually, my mother was born in Germany. She doesn't speak the language anymore because she was only 5 when they moved to Canada, but my grandparents (Oma and Opa :lol:) are about as German as you can get, so I grew up eating a lot of sauerkraut, grünkohl, eintopf, rouladen, etc.
Chili

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: sound.....platforms....and a map!

Post by LuX » May 5th, 2012, 7:48 am

XD My family comes from Switzerland, and partially from Germany! Coding must be in the blood of middle Europeans.
ʕ •ᴥ•ʔ

Post Reply