Pages: 1
  Print  
Author Topic: Porting Project Mario  (Read 2013 times)
Offline (Male) Goombert
Posted on: July 23, 2013, 11:33:31 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
I decided to give this another go. Blah blah *insert shit describing wtf my game is here* its a popular 3D mario game I made with Game Maker, blaha blahalha it used project k, blahhhhhhhh. Anyway, there is only a few things stopping it from working in ENIGMA, I want to cover them here if anyone wants to help pick up the task to get it work.

1) I use external resources in all my games, why you ask? Because it makes it fuckin slow to load your project to do coding when you have load ALL the resources ALL the time. I like people to mod my games, do texture packs, custom levels, etc. I refuse to use internal resources. Anyway, external png loading needs added to sprite_add for my textures, and wav for sound_add for my audio files, or I could convert those to ogg, I am fine with that. It would also be nice if I didn't have to manually set the working_directory, as that is FUCKING STUPID.

2) My 3D particle effects used inheritance as much of the code was the same. I can either remove them for the time being or get to work writing ENIGMA some 3D particle effects, which is what I think I would rather do.

3) I use ini files for my settings, I will use the one DaSpirit adds, or yaml functions, whichever come first.

4) Transformations in ENIGMA are clearly, fucked....

5) My object controlling the game state needs to be persistent, persistent dont work....

6) There really aint much else to port Project Mario other than to fix some minor anomalies and stuff, here is as far as I have gotten....


Source code is available in the other topic, http://enigma-dev.org/forums/index.php?topic=1161.0
It also only works for OpenGL3 if you do get as far as I did.
« Last Edit: July 23, 2013, 11:48:28 PM by Robert B Colton » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) TheExDeus
Reply #1 Posted on: July 24, 2013, 01:11:56 AM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
1) I will add png loading. Wanted to upload some stuff previously, but I still have problems with .bmp's and for some reason new bizarre bug which doesn't allow me to draw anything. Probably will have to revert and try again.
3) Ini's work as far as I know (on Windows at least).
4) Transformations also work as far as I know. I have used them in both 2D and 3D and haven't had any problems. A long time ago when I implemented them the order was wrong, but someone later fixed it and it should now work just like GM.
Logged
Offline (Male) Josh @ Dreamland
Reply #2 Posted on: July 24, 2013, 07:18:36 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email
1) set_working_directory(filename_path(parameter_string(0))). Deal with it.

2)  This isn't far off. If you're in that big a hurry, use this in definitions:
Code: (C++) [Select]
#ifndef JUST_DEFINE_IT_RUN
  #define call_inherited(object_name, event_name) OBJ_ ## object_name :: myevent_ ## event_name ();
#else
  void call_inherited(int object_name, int event_name);
#endif

Then in your EDL, eg, in the step event for obj_particle, use call_inherited(obj_particle, step);. That should solve it for now, if you're that impatient.

3) Go ahead and use Spirit's, or you can use e-YAML, for which the parser can be found in Compiler_Source/settings-parse, or something.

4) I have no idea how transformations would be "fucked." Especially if they're handled by a shader in the new system. A shader can treat them precisely as GM does, regardless of API.

5) Persistence worked when I wrote it. It's not a difficult mechanism. If there's a bug with it, file a bug report with a test case.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) Goombert
Reply #3 Posted on: July 24, 2013, 10:22:25 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
@Harri

1) Thanks! It would be nice to add an overloaded second parameter to those add function so we can manually specify format such img_png, img_bmp, in a case where the extensions are different and it won't detect the format correctly, I am planning on this for special model formats.

2) They were never implemented to Linux, DaSpirit wrote a cross-platform version so that is all good.

3) There is a few anomalies with Transformations, they do NOT work EXACTLY the same, I need to isolate some test cases.

@Josh

1) Wtf does that do? That set it to the source directory when I hit run? Also, set_working_directory is not implemented on XLib

2) Wtf, that works? I still want to write 3D particles though.

3) Great, but I don't know if he finished yet or not.

4) I just mean they are different than Game Maker, and sure.

5) Well I don't know I had to go manually add the gamestate object to each room.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) TheExDeus
Reply #4 Posted on: July 24, 2013, 11:19:52 AM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
Quote
It would also be nice if I didn't have to manually set the working_directory
Is it for when you run your game from LGM? Or when you run it standalone? Josh's code will just fix it when running stand alone, but I am pretty sure it works like that anyway. To make it work from LGM you need ENIGMA plugin to send the position of the gmk.

Quote
Deal with it.
1) I don't know about Linux, but on Windows parameter_string is not populated. I will try to fix that though (but it won't be pretty).
2) It only returns the full path to exe if launched from either the explorer or from a different working directory (like if LGM ran it). If you cd to the directory and then launch it will only return the name of the exe.
3) I don't think he wants the path of the exe. I think he wants the path to the gmk. Like when he has external resources which are at the same directory as the GMK (like it is normally), he wants to be able to load them when ran trough LGM. So the exe must think it's in the directory of GMK.
4) This has been discussed here many times now. I think it never was fixed even when I though it would be trivial... just pass either the argument via the LGM (or more precisely ENIGMA plugin) or just cd to gmk directory and then launch the exe from there.
Logged
Offline (Male) Goombert
Reply #5 Posted on: July 24, 2013, 11:49:44 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
Yes Harri that is what I am trying to do. In Game Maker, program_directory returns the exe location at ALL times, and working_directory will return where your source code is when running from the IDE, but exe location once compiled. ENIGMA returns exe location AT ALL TIMES. The solution to this has already been agreed upon between me and Josh, we are going to let you select the place you want to build your game to, like ./Build as a folder local to your source code so you don't have to dig through temp. But then again he said that would really slow down compilation time because you have to rebuild the engine on a per project basis, and I don't see how we can't fix that if you just move the preprocessor like cheeseboy wants to do so we can build a debian package of ENIGMA.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) TheExDeus
Reply #6 Posted on: July 24, 2013, 12:38:57 PM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
Why just not make it default like GM does it? Just set the working directory to temp folder. The problem is not where the objects are built, the problem is where the .exe is ran from. The that ./Build wouldn't even actually fix the problem unless you set it the same as the gmk folder. Just change the plugin, so instead of exec(Game) it would be "cd to temp, folder and then exec(Game)". I am sure it should be possible with Java.
Logged
Offline (Male) Goombert
Reply #7 Posted on: July 24, 2013, 01:23:57 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
You mean make it work like Game Maker? Ya Josh don't want it to.... >: I swear I think we should put it to a vote.
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) DarkAceZ
Reply #8 Posted on: August 04, 2013, 09:24:40 PM

Member
Location: United States
Joined: Dec 2011
Posts: 75

View Profile
4) Transformations in ENIGMA are clearly, fucked....
scaling
plz tell polygonz
Logged
My Goodness! Is it 4:30? I'm supposed to be having a back, sack and crack!

[edit]
Pages: 1
  Print