This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: 1
1
Ideas and Design / ENIGMA Entity-Component-System?
« on: October 20, 2013, 08:15:58 am »
Check it out: http://www.tomseysdavies.com/2011/01/23/entity-systems/
Personally I think this is The Shit (tm).
Do you guys think something like that could be elegantly done in ENIGMA? Because it's possible in GM, but it's a pain in the ass. Probably really slow, too.
Here's a C++ ECS implementation: https://github.com/miguelishawt/anax and there's also https://github.com/alecthomas/entityx
Personally I think this is The Shit (tm).
Do you guys think something like that could be elegantly done in ENIGMA? Because it's possible in GM, but it's a pain in the ass. Probably really slow, too.
Here's a C++ ECS implementation: https://github.com/miguelishawt/anax and there's also https://github.com/alecthomas/entityx
2
Off-Topic / Check it out: The craziest shit I've ever done in C++
« on: September 26, 2013, 11:53:07 pm »Code: (cpp) [Select]
template <class T, class U> class SomeClass {
public:
// ...
U some_method() {
// ...
}
}
class OtherClass : public SomeClass<YetAnotherClass, OtherClass> { // !!!
public:
// ...
}
So it's a class that inherits from a template of another class and itself, so it can later return its own type. I couldn't believe it but it even works and everything.
And...
Yeah...
That's it.
3
Proposals / Weird stuff that works in GM but fails in ENIGMA
« on: January 02, 2013, 11:33:04 am »
Trying to compile an old GM editable of mine with enigma, I stumbled upon some problems. That is, stuff that GM is OK with but not ENIGMA.
1. Bogus for statment.
The generated C++ code was some weird crap like:
Anyway.
2. Checking for inequality with <>.
3. Giving a variable the name of a C++ data type or the name of a function.
I had a variable named int. Probably short for intelligence. The problem here is not that it doesn't work (because I guess it's only reasonable), but that ENIGMA didn't catch it at first, and it only became a problem during compilation.
A certain GML code looked like this:
(Also another variable named rand fucked things up too, apparently because it's the name of a function.)
4. Resources that would have the same name, if not for an asterisk one of them has.
e.g. sprCharacter and sprCharacter*. ENIGMA apparently removes the asterisk and ends up trying to define the same thing twice.
5. Other stuff you probably know about already.
dll functions (actually I'm using Linux so I'm not sure).
ini functions.
execute_string
variable_local_exists
user_event
event_inherited (why is this not implemented?)
sprite_create_from_screen
file_exists
And that's pretty much it. I'm posting because I thought this may be useful. Is it? Is there a specific place to put this stuff?
1. Bogus for statment.
Code: [Select]
for (i = 0; i < stuff; i += 1;) {}
(Note the third semicolon.)The generated C++ code was some weird crap like:
Code: [Select]
for ((i = 0; i < stuff; i += 1); ); {}
Don't know about you, but I find that hilarious.Anyway.
2. Checking for inequality with <>.
Code: [Select]
if (a <> b) {}
That is equal toCode: [Select]
if (a != b) {}
in GM. In ENIGMA, the generated C++ looks like this:Code: [Select]
if (a < > b) {}
and of course doesn't compile. I also find this hilarious, specially how ENIGMA sticks a space between the symbols.3. Giving a variable the name of a C++ data type or the name of a function.
I had a variable named int. Probably short for intelligence. The problem here is not that it doesn't work (because I guess it's only reasonable), but that ENIGMA didn't catch it at first, and it only became a problem during compilation.
A certain GML code looked like this:
Code: [Select]
alarm[0]=100-random(int);
and the resulting C++ was something likeCode: [Select]
alarm(0)= 100 - random;
(int);
and... yeah, I'm sorry but, that is, like, HILARIOUS. Console was all like "invalid operands of type 'int' and '<unresolved overloaded function type>' to binary 'operator-'".(Also another variable named rand fucked things up too, apparently because it's the name of a function.)
4. Resources that would have the same name, if not for an asterisk one of them has.
e.g. sprCharacter and sprCharacter*. ENIGMA apparently removes the asterisk and ends up trying to define the same thing twice.
5. Other stuff you probably know about already.
dll functions (actually I'm using Linux so I'm not sure).
ini functions.
execute_string
variable_local_exists
user_event
event_inherited (why is this not implemented?)
sprite_create_from_screen
file_exists
And that's pretty much it. I'm posting because I thought this may be useful. Is it? Is there a specific place to put this stuff?
4
Issues Help Desk / Help getting ENIGMA to behave
« on: January 21, 2012, 09:33:39 pm »
I recently installed ENIGMA and LGM. I did so simply by running:
After that I opened LGM with
I was able to, but the game didn't work properly (the square just got stuck in (0,0)) and a lot of warnings and errors showed up in the terminal.
You can see the whole log here: http://pastebin.com/QDRxwfX7
Also if for some reason you want to see the editable of the game, you can find it here: http://linuxstupidity.com/test.egm
Any help is appreciated.
Code: [Select]
$ svn checkout https://enigma-dev.svn.sourceforge.net/svnroot/enigma-dev/trunk
$ cd trunk
$ make
Everything seemed to work with no errors.After that I opened LGM with
Code: [Select]
$ java -jar lgm16b4.jar
and tried to make a test game with only a white square that follows the mouse.I was able to, but the game didn't work properly (the square just got stuck in (0,0)) and a lot of warnings and errors showed up in the terminal.
You can see the whole log here: http://pastebin.com/QDRxwfX7
Also if for some reason you want to see the editable of the game, you can find it here: http://linuxstupidity.com/test.egm
Any help is appreciated.
5
General ENIGMA / (Solved) Problem running Enigma
« on: April 23, 2011, 04:00:03 pm »
I use Arch Linux.
I installed Enigma through Pacman by following the instructions shown here: http://enigma-dev.org/forums/index.php?topic=669.0
It runs, but the following shows up on startup:
I suspect it has something to do with /opt/enigma/searchdirs.txt, which is supposed to contain the list of directories in which header files are found (?), but has this instead:
Halp?
I installed Enigma through Pacman by following the instructions shown here: http://enigma-dev.org/forums/index.php?topic=669.0
It runs, but the following shows up on startup:
Code: [Select]
ERROR: Invalid search directories returned. Start search string does not match a line.
Apart from that, everything seems to work fine, but when I try to run a game, this pops up:Code: [Select]
ENIGMA is not functional due to prior errors.
I suspect it has something to do with /opt/enigma/searchdirs.txt, which is supposed to contain the list of directories in which header files are found (?), but has this instead:
Code: [Select]
Usando especificaciones internas.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Objetivo: x86_64-unknown-linux-gnu
Configurado con: /build/src/gcc-4.6-20110415/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --disable-multilib --disable-libstdcxx-pch --enable-checking=release
Modelo de hilos: posix
gcc versión 4.6.0 20110415 (prerelease) (GCC)
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/cc1plus -E -quiet -v -D_GNU_SOURCE blank.txt -mtune=generic -march=x86-64
se descarta el directorio inexistente "/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-unknown-linux-gnu/include"
la búsqueda de #include "..." inicia aquí:
la búsqueda de #include <...> inicia aquí:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/x86_64-unknown-linux-gnu
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../include/c++/4.6.0/backward
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include
/usr/local/include
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include-fixed
/usr/include
Fin de la lista de búsqueda.
# 1 "blank.txt"
# 1 "<interno>"
# 1 "<línea-de-orden>"
# 1 "blank.txt"
COMPILER_PATH=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/:/usr/lib/gcc/x86_64-unknown-linux-gnu/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/:/usr/lib/gcc/x86_64-unknown-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-E' '-v' '-mtune=generic' '-march=x86-64'
Halp?
Pages: 1