Pages: 1
  Print  
Author Topic: Problems compiling game  (Read 883 times)
Offline (Unknown gender) Hello
Posted on: May 28, 2014, 12:35:51 PM
Member
Joined: May 2014
Posts: 1

View Profile WWW
I am attempting to port the Hello Mario Engine to ENIGMA, and I am having issues compiling.

These are (I think) the errors I am getting:
Code: [Select]
In file included from SHELLmain.cpp:106:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In member function 'virtual variant enigma::OBJ_obj_banzaibill::myevent_step()':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:20961:15: warning: suggest parentheses around comparison in operand of '^' [-Wparentheses]
     if(hspeed == 0 xor outside_view())
               ^
In file included from SHELLmain.cpp:106:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In member function 'virtual variant enigma::OBJ_obj_mapmario::myevent_step()':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:28067:13: error: expected ';' before '}' token
             }
             ^
In file included from SHELLmain.cpp:106:0:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h: In member function 'variant enigma::OBJ_obj_getpowerup::myevent_alarm_0()':
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h:41204:56: error: expected ';' before 'enigma'
         enigma::varaccess_inventory(int(global))(0) ++ enigma::varaccess_inventory(int(global))(enigma::varaccess_inventory(int(global))(0))= scr_sprite_get_constant(sprite_index);

Here is the source: (.egm)
http://www.sendspace.com/file/wy5w1o
Logged
Offline (Unknown gender) Darkstar2
Reply #1 Posted on: May 28, 2014, 03:12:47 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
ENIGMA is not 100% compatible, there are certain things that are broken or not working properly and certain things done differently.
Some games might port without modifications, others might require minor adjustments or major depending.

I downloaded it and fixed the code to compile properly without error. Runs now.

The game compile, runs, but obviously
there needs other changes for this to work in ENIGMA.  I can see the intro and world map,
but once in the level mario is unresponsive to movement, somehow it looks like the program is stuck in a loop.  Music is playing
and all, but no movement.  (fixed partially, the missing ;'s where they needed to be placed.  There's more to be fixed, I think I know why mario does not move, collision code will have to be tweaked a little, and other fixes.

I'll let you know later on and send you the working EGM.  Later this evening when I get some time I will look over the thing.
I'm glad you sent this file, I was looking for a more complex, bigger project to test with ENIGMA and LGM, glad to know LGM handled this one quite well, doesn't lag all that much (IDE), fairly stable and fast.
I don't know yet if this can be 100% functional in ENIGMA, from what I gather certain things are not yet fully implemented or finished in the ENIGMA engine itself, but interested in taking a look.

I have another big issue that I am currently testing and want to get resolved too.

(BTW, I am not an ENIGMA developer) but a very interested ENIGMA user,  I came from GM, and using ENIGMA to build from scratch.

« Last Edit: May 28, 2014, 04:30:45 PM by Darkstar2 » Logged
Offline (Male) Goombert
Reply #2 Posted on: May 28, 2014, 04:48:14 PM

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

View Profile
Yes as Darkstar pointed out there are anomalies in ENIGMA because it is hard to emulate GM's behavior perfectly. However, someone else made much more progress porting the Hello Mario engine. But they never posted it to the forums, they had most of the levels working as well. I forgot who it was but they showed me on IRC.

I can't quite tell directly what your errors are related to, but they seem to be pretty straight forward. Files such as the following:
C:/ProgramData/ENIGMA/Preprocessor_Environment_Editable/IDE_EDIT_objectfunctionality.h

Are where your game converted to C++ exists. And most of the compiler errors are just GCC output.
« Last Edit: May 28, 2014, 04:49:48 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) Darkstar2
Reply #3 Posted on: May 28, 2014, 05:13:01 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
I've looked at his code and fixed part of it because I did not have time to check the rest.

Certain semi colons were missing where they were important to be put, also the script sprite make had "var i" in it, that the ENIGMA compiler did not like, so I commented those out.  //update: if I put those back in the compiler complains of the var in that area.

There was a line checking hspeed xor something else, and it had to be put between parenthesis.  The compile errors are due to mostly missing semi colons in critical places, variant type variable declaration and missing parenthesizes. 

Lots have to be gone through and fixed certain parts might have to be redone to
get it working.


« Last Edit: May 28, 2014, 06:29:03 PM by Darkstar2 » Logged
Offline (Male) Goombert
Reply #4 Posted on: May 28, 2014, 06:18:42 PM

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

View Profile
I just tried var i and that compiles fine. Sometimes there is a name conflict where a variable accidentally gets included in enigma_user, you can check for these under Build->Keyword List->Globals

Here is another Mario game in ENIGMA:
http://enigma-dev.org/forums/index.php?topic=1791.msg17208#msg17208

Here is a topic about the Hello Mario engine:
http://enigma-dev.org/forums/index.php?topic=1426.msg14222#msg14222

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) Darkstar2
Reply #5 Posted on: May 28, 2014, 06:30:59 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
Here is an attached copy of a version that can compile and run, game is still not in a playable state. The way I got it to compile and run is explained above, adding ; in the right places, one (...) and commenting out var i in script sprite make.

https://www.dropbox.com/s/8whvbk294mqh9kw/Port-HME.egm

The state is still unplayable.
Logged
Pages: 1
  Print