Extra dependency

Extra dependency

Postby Edward_Lii » 26 Nov 2011, 08:08

Hello all,

I've recently updated my system to openSUSE 12.1 and after installing some libraries (SDL, libarchive, curl, etc..) and subversion I checked out the meandmyshadow svn repository.
Everything went well and it compiled successfully, but when I started meandmyshadow I got:
{l Code}: {l Select All Code}
WARNING: Unable to load background music!

The music.mid file was there, turns out I had to install timidity in order to load/play midi files.

We need to take this into account when packaging the game.
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: Extra dependency

Postby acme_pjz » 27 Nov 2011, 05:26

Hi,

At least under Windows timidity is not needed for playing MIDI files... and I have a bad idea: how about converting MIDI to ogg? (for example using OpenMPT)
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Extra dependency

Postby Edward_Lii » 27 Nov 2011, 08:23

Hello acme_pjz,

acme_pjz {l Wrote}:At least under Windows timidity is not needed for playing MIDI files... and I have a bad idea: how about converting MIDI to ogg? (for example using OpenMPT)

That might be better, for playing ogg files under Linux you'll have to have oggvorbis installed, but that's a lot commoner package.
Nevertheless should we keep the original midi file, you never know why. (sound quality, editing, ...) :)
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: Extra dependency

Postby acme_pjz » 01 Jan 2012, 14:01

I don't know if it's OK to introduce another extra dependency: SDL_draw(http://sourceforge.net/projects/sdl-draw/). Because I see a function named 'drawLine' in Functions.cpp, which I think may runs slow...
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Extra dependency

Postby Edward_Lii » 01 Jan 2012, 14:23

Hello acme_pjz,

acme_pjz {l Wrote}:I don't know if it's OK to introduce another extra dependency: SDL_draw(http://sourceforge.net/projects/sdl-draw/). Because I see a function named 'drawLine' in Functions.cpp, which I think may runs slow...

I'm not sure about SDL_draw, it seems inactive and it's not available in the openSUSE (or other distros) repositories, making packaging harder.
Perhaps it's better to use SDL_gfx?

According to the SDL website SDL_draw doesn't support Mac OSX and SDL_gfx does.
They both offer primitive drawing but I think SDL_gfx is a better choice.

What do you think? ;)
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: Extra dependency

Postby acme_pjz » 01 Jan 2012, 14:40

It's OK; IMHO SDL_draw is just smaller ;)
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Extra dependency

Postby Edward_Lii » 01 Jan 2012, 18:19

Hello acme_pjz,

acme_pjz {l Wrote}:It's OK; IMHO SDL_draw is just smaller ;)

Ok, I think we can get SDL_gfx in before the 0.2 release. :)

BTW, I really like the moving arrows on the lines. ;)
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: Extra dependency

Postby Edward_Lii » 01 Jan 2012, 19:45

Hello acme_pjz,

Edward_Lii {l Wrote}:Ok, I think we can get SDL_gfx in before the 0.2 release. :)

Done, both drawLine() and drawRect() use SDL_gfx now.
The alpha is static opaque (255) since the code uses 0 for black which will result in a fully transparent line/rectangle.

Perhaps we should make a method that will draw a filled rectangle with border?
This is used quite often in the GUI elements.

Also added it to the CMakeList, not sure it's the correct way, it assumes that SDL_gfx is under the SDL_directory (which it probably is).
This is because there doesn't seem to be a default cmake module for SDL_gfx. :think:

Blocks can now be placed on the top or left side of the level.
The leveleditor then increases the level size and shifts all the existing blocks. :|

BTW, the moving arrows now show the moving speed.
It isn't very accurate, steps of ten, this is because arrowAnimation is an int.
(1 - 10) = standard speed
(11-20) = 2x speed
(21-30) = 3x speed
etc...
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Who is online

Users browsing this forum: No registered users and 1 guest