The future of Me & My Shadow

The future of Me & My Shadow

Postby Edward_Lii » 10 Mar 2011, 19:27

Hello all,

As you might have noticed gordebak stopped developing Me & My shadow and now I'm the only developer.
The problem is that I haven't got enough time to develop MaMS actively on my own.
Here are some thoughts what to do with MaMS, I would like to hear your view on this subject.


Rewriting MaMS
I'm not sure about this part, as said here it seems that the code isn't written so good:
MCMic {l Wrote}:...
-All classes are in "Classes.h" instead of having Player.h, Shadow.h, Game.h… that is uncommon
-There are a lot of external global objects, that's not recommended either
-It's not well commented, that would help to understand what each part of the code does.
...

Original thread: http://forum.freegamedev.net/viewtopic.php?f=22&t=1107
I tried to move some classes to there own header file but because of my lack of C++ knowledge it failed on some classes.
So rewriting seems a good option to me, but that would require me to learn more C++ and/or more people helping out.

Also when looking at the code it didn't seem very extendable meaning that adding new blocks and features will be difficult.


Porting MaMS
One thought of me is porting MaMS to Java and using Slick instead of SDL.
Although I would love the learn more C/C++ I just can't find the time to do so.
And porting it to Java would make it much easier for me to extend/maintain.


Slightly different game-play
There were some people who wanted to see MaMS as a libre version of braid.
Although I like the idea I think it would change the game-play of MaMS to much.
Instead I think it would be better to add more powers, like joining together with your shadow, reverting moves, etc...

One suggestion of Bodsda seems a good idea to me:
Bodsda {l Wrote}:Could you allow the ability to cancel a certain number of moves?
If you complete a level, you get 1 undo, if you die you loose them all. So if you struggle with level 5, but completed levels 1-4 without dieing, you would have 4 chances to undo the mistakes you make in level 5.
...

Original thread: http://forum.freegamedev.net/viewtopic.php?f=48&t=1147

Any feedback is welcome! ;)
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: The future of Me & My Shadow

Postby charlie » 10 Mar 2011, 21:01

A port to Java/Slick might be good. It would seem that the choice is to refactor the C/C++ or rewrite in Java. The worry about a rewrite in Java is that you won't really be able to port any code/logic so you are essentially starting a new codebase from scratch (jMaMS? MaMS2?). You'll have to be honest with yourself about how motivated you are to complete either task.

Making it a free version of Braid? Let's keep the goals realistic.
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Global Moderator
 
Posts: 2131
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: The future of Me & My Shadow

Postby MCMic » 11 Mar 2011, 08:51

Please do not redo it in Java!
It just need some refactoring in C++.

I'm not sure I'll have the time to help, I'm on some other stuff these times.
But M&MS mainly need some gameplay tweaks and a lot of new datas.
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: The future of Me & My Shadow

Postby Edward_Lii » 11 Mar 2011, 14:17

Hello all and thanks for the reactions!

charlie {l Wrote}:A port to Java/Slick might be good. It would seem that the choice is to refactor the C/C++ or rewrite in Java. The worry about a rewrite in Java is that you won't really be able to port any code/logic so you are essentially starting a new codebase from scratch (jMaMS? MaMS2?). You'll have to be honest with yourself about how motivated you are to complete either task.

Refactoring the current code would require a lot of work for me.
One thing I find very difficult is to determine if the code is in a good state or not.
But for what I've seen adding a new block would require both the game and the editor to be adjusted.

charlie {l Wrote}:Making it a free version of Braid? Let's keep the goals realistic.

As I sad a free version of Braid isn't the goal, but maybe some new powers would extend the game-play.
If we decide to re-write the code in Java it's best to think of things like this before starting.
The problem with adding such things later is that most levels need to be redesigned.

MCMic {l Wrote}:Please do not redo it in Java!
It just need some refactoring in C++.

I'm not sure I'll have the time to help, I'm on some other stuff these times.
But M&MS mainly need some gameplay tweaks and a lot of new datas.

I understand your concerns, but porting it to Java is much easier for me.
But if there are enough people willing to help in any way they can I think it would be best to leave it in C++.

There are some things that are just to difficult for me with my current C++ knowledge, like supporting multiple resolutions, moving some classes to there own header file and so on.

I'm still thinking what would be the best to do. :think:
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: The future of Me & My Shadow

Postby MCMic » 11 Mar 2011, 16:54

The more you'll practice C++, the more you're like it :D
Using java for games seems a bad idea to me. (using java is generally not a very good idea)

PS: I know I'm trolling, I won't do that again, that was a one time thing :D
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: The future of Me & My Shadow

Postby KroArtem » 11 Mar 2011, 17:57

Agree with MCMic, please do not rewrite it in Java. If you'll try to do so, you'll have less time for PoA ;)
KroArtem
 
Posts: 375
Joined: 26 Aug 2010, 19:04

Re: The future of Me & My Shadow

Postby Edward_Lii » 12 Mar 2011, 09:24

Hello all,

MCMic {l Wrote}:The more you'll practice C++, the more you're like it :D
Using java for games seems a bad idea to me. (using java is generally not a very good idea)

PS: I know I'm trolling, I won't do that again, that was a one time thing :D

Java is way better than C++ and a lot easier to me. :p

KroArtem {l Wrote}:Agree with MCMic, please do not rewrite it in Java. If you'll try to do so, you'll have less time for PoA ;)

Ok you've convinced me, it's going to stay C++.
It's not going to be easy, but I'm willing to learn C++.

BTW, I've made a TODO list for MaMS: http://meandmyshadow.sourceforge.net/wiki/index.php/TODO
It isn't finished yet, feel free to add/modify it.
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: The future of Me & My Shadow

Postby acme_pjz » 13 Mar 2011, 13:58

Please don't rewrite it in Java, because I don't know Java at all, I know C/C++ only ( and Visual Basic ;) )

As for spliting the header files, it's not a difficult task, I'll try it :)
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: The future of Me & My Shadow

Postby Edward_Lii » 13 Mar 2011, 14:35

Hello acme_pjz,

acme_pjz {l Wrote}:Please don't rewrite it in Java, because I don't know Java at all, I know C/C++ only ( and Visual Basic ;) )

As for spliting the header files, it's not a difficult task, I'll try it :)

If you could do that, that would great! ;)

You'll probably know how to already, but here's how to compile: http://meandmyshadow.sourceforge.net/wiki/index.php/Compiling
It also contains the command to checkout the SVN repository.
If you've got any questions feel free to ask.

Thanks again! ;)
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: The future of Me & My Shadow

Postby acme_pjz » 14 Mar 2011, 03:48

One more question, is it needed to split all the classes to file? For example, "Exit.h", "Block.h" and so on, each file contains ~20 line only :| ...
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: The future of Me & My Shadow

Postby acme_pjz » 14 Mar 2011, 06:17

Finished :) Is it OK?

BTW I changed the fading code a bit ...
Attachments
src.zip
(30.81 KiB) Downloaded 327 times
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: The future of Me & My Shadow

Postby acme_pjz » 14 Mar 2011, 10:08

I modified the fading code again ...

And added save_state() and load_state() feature in class Player and Shadow :) can be used for save/load game and checkpoint support ... Currently press F2 to save game and F3 to load game ;) ... and in main menu press F2 to launch level editor, and fix a bug in level editor loading code, and when player go to the exit the game won't finished in level editing mode ...

I hope you like it :D
Attachments
src.zip
(30.67 KiB) Downloaded 329 times
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: The future of Me & My Shadow

Postby Edward_Lii » 14 Mar 2011, 17:26

Hello acme_pjz,

acme_pjz {l Wrote}:Finished :) Is it OK?

BTW I changed the fading code a bit ...

Thanks, it looks good to me, I've committed it.

acme_pjz {l Wrote}:I modified the fading code again ...

And added save_state() and load_state() feature in class Player and Shadow :) can be used for save/load game and checkpoint support ... Currently press F2 to save game and F3 to load game ;) ... and in main menu press F2 to launch level editor, and fix a bug in level editor loading code, and when player go to the exit the game won't finished in level editing mode ...

I hope you like it :D

Thanks a lot, you're really making progress.
Isn't it better if you join the project on SourceForge so you can commit your changes yourself?

Thanks again! ;)
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: The future of Me & My Shadow

Postby acme_pjz » 15 Mar 2011, 05:46

Thank you for your invitation, I'm very happy if I can join the project, but I'm not sure I'll have more free time, and I can't access SourceForge without a proxy so I can't connect the SVN ... sorry for that :(
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: The future of Me & My Shadow

Postby MCMic » 15 Mar 2011, 10:13

acme_pjz {l Wrote}:I modified the fading code again ...

And added save_state() and load_state() feature in class Player and Shadow :) can be used for save/load game and checkpoint support ... Currently press F2 to save game and F3 to load game ;) ... and in main menu press F2 to launch level editor, and fix a bug in level editor loading code, and when player go to the exit the game won't finished in level editing mode ...

I hope you like it :D


Thanks a lot man!
I managed to get pass the level I was stuck in thanks to your F2/F3 feature :-)
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: The future of Me & My Shadow

Postby MCMic » 15 Mar 2011, 11:50

You should use png with an alpha layer and suppress this part in load_image : "SDL_SetColorKey ( opt, SDL_SRCCOLORKEY, SDL_MapRGB(opt->format, 0, 0xFF, 0xFF) );"

Then spikes should be modified to remove the white background (easy to do in gimp), and a pixel-collision would be great. Maybe I'll work on that when I find the time.
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: The future of Me & My Shadow

Postby Bodsda » 15 Mar 2011, 15:51

acme_pjz {l Wrote}:I modified the fading code again ...

And added save_state() and load_state() feature in class Player and Shadow :) can be used for save/load game and checkpoint support ... Currently press F2 to save game and F3 to load game ;) ... and in main menu press F2 to launch level editor, and fix a bug in level editor loading code, and when player go to the exit the game won't finished in level editing mode ...

I hope you like it :D


I assume this save/load feature sends you back to the start of the level? I wouldnt have thought being able to save right before a difficult jump or something would be a good idea.

Bodsda
User avatar
Bodsda
OD Moderator
 
Posts: 195
Joined: 18 Feb 2010, 08:19

Re: The future of Me & My Shadow

Postby Edward_Lii » 15 Mar 2011, 16:22

Hello all,

acme_pjz {l Wrote}:Thank you for your invitation, I'm very happy if I can join the project, but I'm not sure I'll have more free time, and I can't access SourceForge without a proxy so I can't connect the SVN ... sorry for that :(

Sad to hear about the SourceForge and SVN problems.
But it would be great if you could still help when you've got the time. ;)

MCMic {l Wrote}:
acme_pjz {l Wrote}:I modified the fading code again ...

And added save_state() and load_state() feature in class Player and Shadow :) can be used for save/load game and checkpoint support ... Currently press F2 to save game and F3 to load game ;) ... and in main menu press F2 to launch level editor, and fix a bug in level editor loading code, and when player go to the exit the game won't finished in level editing mode ...

I hope you like it :D


Thanks a lot man!
I managed to get pass the level I was stuck in thanks to your F2/F3 feature :-)

Bodsda {l Wrote}:
acme_pjz {l Wrote}:I modified the fading code again ...

And added save_state() and load_state() feature in class Player and Shadow :) can be used for save/load game and checkpoint support ... Currently press F2 to save game and F3 to load game ;) ... and in main menu press F2 to launch level editor, and fix a bug in level editor loading code, and when player go to the exit the game won't finished in level editing mode ...

I hope you like it :D


I assume this save/load feature sends you back to the start of the level? I wouldnt have thought being able to save right before a difficult jump or something would be a good idea.

Bodsda

It isn't intended to make it part of the game-play.
The F2 and F3 keys are just for testing, this function is probably going to be used internally for checkpoints or something like that.

MCMic {l Wrote}:You should use png with an alpha layer and suppress this part in load_image : "SDL_SetColorKey ( opt, SDL_SRCCOLORKEY, SDL_MapRGB(opt->format, 0, 0xFF, 0xFF) );"

Then spikes should be modified to remove the white background (easy to do in gimp), and a pixel-collision would be great. Maybe I'll work on that when I find the time.

Well, I tried that, but the problem is that everywhere in the code image loading is done using this method.
Meaning that suppressing this line will cause the player to show a cyan background.
I think the best would to add an alpha layer to the player graphics as well, but when this line is suppressed the spikes still show a white background?
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: The future of Me & My Shadow

Postby MCMic » 15 Mar 2011, 16:31

On my local version I managed to have png transparency. I supressed cyan on spikes and player sprites.
I also did a CMakeLists.txt, you can find it attached.

If you get me svn rights I'll try to push the changes about image loading without pushing my failed tests of per-pixel collision.
Attachments
CMakeLists.txt
(1.92 KiB) Downloaded 450 times
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: The future of Me & My Shadow

Postby acme_pjz » 15 Mar 2011, 16:44

MCMic {l Wrote}:You should use png with an alpha layer and suppress this part in load_image : "SDL_SetColorKey ( opt, SDL_SRCCOLORKEY, SDL_MapRGB(opt->format, 0, 0xFF, 0xFF) );"


Maybe PNG files with alpha channel and SDL_SRCALPHA is better ...

And SDL is annoying because it didn't support modulate of per-pixel alpha and surface alpha :( (at least 1.2, It looks like 1.3 supports this)
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: The future of Me & My Shadow

Postby Edward_Lii » 15 Mar 2011, 16:45

Hello MCMic,

MCMic {l Wrote}:On my local version I managed to have png transparency. I supressed cyan on spikes and player sprites.
I also did a CMakeLists.txt, you can find it attached.

Thanks for the CMakeLists.txt.
I've already committed it, I noticed straight away that it's now possible to run make with multiple jobs.
Looking inside the file is it correct to say it's still needed to add new source files manually?

MCMic {l Wrote}:If you get me svn rights I'll try to push the changes about image loading without pushing my failed tests of per-pixel collision.

The downside of SourceForge is that I can only grant write access to Members of the project.
So if you've got a SourceForge account I could add you and give permission.

Thanks! ;)
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: The future of Me & My Shadow

Postby MCMic » 15 Mar 2011, 17:04

Edward_Lii {l Wrote}:Hello MCMic,

MCMic {l Wrote}:On my local version I managed to have png transparency. I supressed cyan on spikes and player sprites.
I also did a CMakeLists.txt, you can find it attached.

Thanks for the CMakeLists.txt.
I've already committed it, I noticed straight away that it's now possible to run make with multiple jobs.
Looking inside the file is it correct to say it's still needed to add new source files manually?

MCMic {l Wrote}:If you get me svn rights I'll try to push the changes about image loading without pushing my failed tests of per-pixel collision.

The downside of SourceForge is that I can only grant write access to Members of the project.
So if you've got a SourceForge account I could add you and give permission.

Thanks! ;)

Yeah, new files need to be added manually, there is a cmake syntax to avoid that, but I don't know/use it.
My sourceforge account : https://sourceforge.net/users/mcmic

@acme_pjz : also SDL_DisplayFormatAlpha needs to be used instead of SDL_DisplayFormat.
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Re: The future of Me & My Shadow

Postby Edward_Lii » 15 Mar 2011, 17:10

Hello MCMic,

MCMic {l Wrote}:Yeah, new files need to be added manually, there is a cmake syntax to avoid that, but I don't know/use it.
My sourceforge account : https://sourceforge.net/users/mcmic

@acme_pjz : also SDL_DisplayFormatAlpha needs to be used instead of SDL_DisplayFormat.

You are added to the project and should be able to commit to the SVN repository. :)
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: The future of Me & My Shadow

Postby Edward_Lii » 15 Mar 2011, 17:18

Hello all,

Edward_Lii {l Wrote}:Looking inside the file is it correct to say it's still needed to add new source files manually?

I changed the add_executable into this:
{l Code}: {l Select All Code}
file(GLOB Sources ${SRC_DIR}/*.cpp)
add_executable(meandmyshadow ${Sources})

It seems to work, since it compiles and generates an executable.
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: The future of Me & My Shadow

Postby MCMic » 15 Mar 2011, 17:24

It's strange, it should also need .h files.
User avatar
MCMic
 
Posts: 723
Joined: 05 Jan 2010, 17:40

Who is online

Users browsing this forum: No registered users and 1 guest