Jump to content


Sindarin

Member Since 01 Apr 2004
Offline Last Active Apr 19 2012 06:18 PM

Posts I've Made

In Topic: Audio in GMS

14 February 2012 - 02:40 PM

Until GM9, we won't be rewriting the Audio. For GM9, it's being shot, hit with an axe, stabbed, hung drawn and quartered, burned, and then buried in an unmarked grave.


The King is pleased.

In Topic: Audio in GMS

13 February 2012 - 11:37 AM

meaning again, we're using Microsoft's player, and they pay the license to decode.


Okay, I laughed a little at this phrase like "Poor Microsoft..." xD

However the media player has its limitations. Like the one MP3 must be playing at once, no sound effects etc.
And like gnysek said, the whole MP3 licensing thing is a nightmare, there are so many pitfalls.

I'd be more happy to see GameMaker's sound pipeline designed to convert everything to OGG. Like e.g.

User loads a new sound > Open File (Available formats: OGG, MP3, WAV, AIFF, FLAC etc.)
The sound gets loaded and converted automatically to OGG by ffmpeg, whatever the format is (except if already OGG) and then placed in the gmx sound directory.
Then the sound is played through OpenAL. You don't need abstraction layers for DirectSound or to worry about MP3s and stuff because all is OGG format.

In case of browsers, the very first time the game is run/exported as HTML5 the OGG sounds are also converted to MP3s, otherwise nothing is converted to MP3s.

Also from another bug report, I mentioned MP3s have "built-in" gaps making seamless looping nearly impossible. OGGs do not have that by default. (More info http://en.wikipedia....apless_playback )
This mostly depends on the sound editor I believe, but the majority of them always add these gaps. Don't know if the current setup of ffmpeg with GameMaker adds them as well but I suppose it does.
I have even searched and found an utility that makes seamless MP3 loops because I had a problem in the past with Flash that could not load OGG loops.

In Topic: Question on Inventory with data structures

09 February 2012 - 11:22 AM

I messed around with them and came up with this:



myDS = ds_grid_create(4, 100); //4 columns, 100 rows

ds_grid_add(myDS,1 ,1, "Potion"); //at row 1, column 1 - place "Potion"
ds_grid_add(myDS,1, 2, "Restores 50 HP"); //at row 1, column 2 - place "Restores 50 HP"
ds_grid_add(myDS,1, 3, "spPotion"); //at row 1, column 3 - place spPotion
ds_grid_add(myDS,1, 4, 1); //at row 1, column 4 - place 1 (number of Potions owned)

ds_grid_add(myDS,2, 1, "Elixir"); //at row 2, column 1 - place "Elixir"
ds_grid_add(myDS,2, 2, "Restores Full HP"); //at row 2, column 2 - place "Restores Full HP"
ds_grid_add(myDS,2, 3, "spElixir"); //at row 2, column 3 - place spElixir
ds_grid_add(myDS,2, 4, 1); //at row 2, column 4 - place 1 (number of Elixirs owned)

show_message(string(ds_grid_get(myDS, 1, 2))); //Returns position 1,2 "Restores 50 HP"
show_message(string(ds_grid_get(myDS, 2, 2))); //Returns position 2,2 "Restores Full HP"


I'll probably mess around some more with this but is there actually an easy way to save/load ds_grids?
This will save it to a file:


myFile = file_text_open_write("mydsgrid.txt");
file_text_write_string(myFile, ds_grid_write(myDS));
file_text_close(myFile);


but how do I load it AND populate the grid with the file's data?

Use data grids and write a customised sort. It's just interchanging rows a bunch of times, there is a script out there in the big bad Game Maker Community ready for you to steal if you don't want your own.


Could you direct me to a sorting script? Preferably a sort by column would be nice.

In Topic: Audio in GMS

06 February 2012 - 04:03 PM

Just add the sounds as MP3s, and play them as normal, and GameMaker will do the rest.


The problems I have with MP3s are 3,
first the licensing in cause you need to sell your game,
second MP3s don't loop too well,
and finally I believe GM uses MP3 codecs, as opposed to an audio library, which they don't come with some Windows XP & Vista installations.

I noticed you're experimenting with OpenAL on the Windows C++ runner?
Is there a possibility that OGG will be available in GM Studio if you make it in the timeframe?

In Topic: Questions regarding mobile devices

24 January 2012 - 04:02 AM

Ah I can see what you mean, also noticed there are readonly variables like room_width & view_width, so it's not completely out of place. :)