IMP - Irrlicht Media Player ••• [UPDATED] •••

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki

Re: IMP - Irrlicht Media Player •• [UPDATED: 11 SEPT 2011]

Postby CuteAlien » Tue Dec 27, 2011 4:30 pm

Nice screen :-)
IRC: #irrlicht on irc.freenode.net
Code snippets, patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Free racer created with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
User avatar
CuteAlien
Admin
 
Posts: 8250
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Re: IMP - Irrlicht Media Player •• [UPDATED: 11 SEPT 2011]

Postby jorgerosa » Thu Jul 12, 2012 8:47 am

Ok, after the source files being at: megaupload (is down now)... then... rapidshare (removed the file, requires a payment after trial (!!??)), etc, etc... And because I hate broken urls too... Decided to create a project page at sourceforge --> URL: http://sourceforge.net/projects/irrlichtmp (1st post here, will be always updated too)
User avatar
jorgerosa
Competition winner
 
Posts: 104
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal

Re: IMP - Irrlicht Media Player •• [UPDATED: 10 NOV 2014] •

Postby jorgerosa » Tue Nov 11, 2014 2:00 am

Hi guys! Long time ago. I´m older by now, but I´m happy cause you all are older too and... uglier! Jesus!
Ok, I´ve (finally) realesed Irrlicht Music Player v.1.0 - https://sourceforge.net/projects/irrlichtmp
And don´t forget... Have fun!

- And you know... Help is welcome!
- I would like to sync cameras and lights with sound (But I need another life for that, I´ve lost my last one playing Battlefield...........)
User avatar
jorgerosa
Competition winner
 
Posts: 104
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal

Re: IMP - Irrlicht Media Player •• [UPDATED: 10 NOV 2014] •

Postby CuteAlien » Tue Nov 11, 2014 3:18 pm

Cool effects. Lot of nice stuff you did with camera and shaders there!

Some help (maybe):

You have a bug in 64-bit systems in line 1853. That calculation will return 16 (as ppEffects are pointers which are 64-bit per pointer while int has a size of 32 bit):
cpp Code: Select all
 
int ftx = sizeof(ppEffects) / sizeof(int); // get Array total size
 



Generally using constant numbers (like 8 for array-size) is not a good idea. Programmers call them magic numbers. Prefer using constants instead of numbers whenever you can. It avoids a lot of errors.

Also prefer working with classes like std::vector or irr::core::array (I would use std::vector). That's a lot easier to work with than fixed-size arrays. You use them already a lot - why do you avoid them in some cases? I don't think you need a fixed-size array in your code at all (at least the places I did see on a quick view all looked like they would be better replaced by std::vector's).

If you have 2 arrays for the same thing it's often a hint that you could use a struct or class instead to put those together (for example CEffectPostProc* and std::string). That again then allows you to do stuff like cleaning up memory automatically later on.

You should use more classes instead of one long main function - it's hard to read right now. Start by adding a main application class. Then you can already move variables like musicList into that class. Once you did that you can split the main function up and for example put all the stuff from "RETRIEVE MUSIC + LYRICS FILES, FROM FOLDER" into a member function which just fills those variables. That gives you 2 advantages - first you might call the function again from another place. You might even give it a variable parameter as path and then users can later chose their own folder. And second variables which are only needed in that function like "dir" are then only no longer visible from everywhere. Reducing the scope of variables will make your code easier to maintain.

Later on you will likely split up the application class again into more classes, but starting with one already will help you to see which variables need to be accessed from everywhere and which are only needed locally in some functions. Another useful struct/class would likely be one for settings for example. And maybe one for animations (forward, speed and a function pointer). Animation stuff would also be a prime candidate to put into another file (if you want to keep the c-style there you can use "extern" in that files header to access it from another file and you can use "static" in the .c file to ensure all global variables like anim_forward5 are only accessible within that file).

Ah well... I wish I could help more, but have to start with my own work now :-)

One last hint - you might want to use a style where loops are better visible. If you have Unix you can install astyle and run: astyle --indent=tab --indent-switches -p -b main.cpp
That will give you a style very similar to what Irrlicht uses.
IRC: #irrlicht on irc.freenode.net
Code snippets, patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Free racer created with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
User avatar
CuteAlien
Admin
 
Posts: 8250
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Re: IMP - Irrlicht Media Player •• [UPDATED: 10 NOV 2014] •

Postby jorgerosa » Tue Nov 11, 2014 7:24 pm

Hi CuteAlien.
"Cool effects. Lot of nice stuff you did with camera and shaders there!" - Thanks, mostly are adapted snippets from irrlicht forum, etc, etc, etc...
"You have a bug in 64-bit systems in line 1853" - Ops! I have to fix that. (Where is my hammer?....)
"You should use more classes instead of one long main function" - I´m only keep it simple and "human readable" for other people to add their code too. I tought if I have many ".cpp" files, could be hard for others to see "how stuff works". That´s why I have comments everywhere too. I´m only see how far can I go too... BUT yes! I really need to do that, also optimize and clean the code.
"If you have Unix" - I´m only using MSWindows, but I really want to run this thing in GNU/Linux (I´ll have to replace audiere, I´m already think to replace it by SDL, seems to be too much for having audio only, but its quite simple (I´ve already compiled and used SDL in Linux with no issues in other software) and licences are similar to the Irrlicht one...)
Thanks for explain stuff and for all the tips too. I´ll follow your guidelines indeed. After all, aliens have bigger brain than humans...
I´m working in other stuff, but since I have time "I´ll be back"! :)
User avatar
jorgerosa
Competition winner
 
Posts: 104
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal

Re: Irrlicht Media Player ••• [UPDATE: 13 NOV 2014] •••

Postby pilesofspam » Thu Nov 13, 2014 6:20 pm

This is absolutely terrific. Nice work Jorgerosa!
pilesofspam
 
Posts: 62
Joined: Mon May 11, 2009 4:31 am

Re: Irrlicht Media Player ••• [UPDATE: 13 NOV 2014] •••

Postby jorgerosa » Fri Nov 21, 2014 11:16 am

pilesofspam wrote:This is absolutely terrific
Thankyou pilesofspam! :)
Just updated to V.1.2 (a few moments ago). Now the band, auto changes, if it was set in the same ".lyrics" music file.
Have fun!
User avatar
jorgerosa
Competition winner
 
Posts: 104
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal

Irrlicht Media Player Xmas

Postby jorgerosa » Sun Dec 20, 2015 11:55 am

Image

:roll: Merry Christmas to everyone !!! :roll:
• IMP (Irrlicht Music Player) Its NOT compiled with the lattest Irrlicht (V.1.8.3)... But I hope have it done very soon...
• All source code is there too, in the download "zip" file... As always...
LICENCE:
1) You, your kids, and all your family MUST have fun with this little piece of... software...
2) Its OBLIGATORY that you sing something (karaoke) for them all, (so they could laught hard)... C´mon dudes... Its xmas!!...

IMP --- Download ---> http://sourceforge.net/projects/irrlichtmp

OFF-TOPIC: Not exactly Irrlicht related, but since its christmas, here it goes anyway...
1) A quiz game made in flash, great for all family (works in any web browser too)
FlaQuizTV --- Download ---> https://sourceforge.net/projects/flaquiztv
2) And... One tool you may need to convert your media (audio & video) that I developed for myself, but could be usefull for you too.
UEMMC --- Download ---> https://sourceforge.net/projects/uemmc
Last edited by jorgerosa on Sun Dec 20, 2015 9:42 pm, edited 5 times in total.
User avatar
jorgerosa
Competition winner
 
Posts: 104
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal

Re: Irrlicht Media Player ••• [UPDATED] •••

Postby Mel » Sun Dec 20, 2015 7:19 pm

Great work :) I am curious as if it would be possible to include video reproduction as another feature.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
User avatar
Mel
Competition winner
 
Posts: 2196
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Previous

Return to Project Announcements

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest