Pages: 1 2 3 »
  Print  
Author Topic: Another quickie  (Read 5756 times)
Offline (Male) Josh @ Dreamland
Posted on: March 23, 2010, 07:27:24 AM

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

View Profile Email
Boy metaphase is taking a long time (For those who are expecting it, hehe).

Anyway, another tidbit worth noting: "Local" typing, as in, "local struct a;" will be possible only if users ensure that said typing is done in the first event parsed. The create event is a safe bet.

Types are remarkable in that they cannot be assumed; that's why I needed a C parser in the first place.

So, I can do "local struct," which wasn't part of the original plan, but it's not going to be as convenient as "local int" or the like, simply because I can't treat something as a type before I know for sure that it is.



I've started documenting the systems that those implementing new libraries will need an understanding of. Aragon has been working on Wii things and has agreed to get started on some draw functions for ENIGMA. What's interesting is that he wanted to get started right away, so he checked out the SVN and started looking through it without docs. ;_;

What's even more interesting is that he commented on how well-organized it was, which is indeed what I was going for, but I didn't think anyone would just figure the whole thing out without bitching about documentation. Makes me wonder why I'm writing it sometimes.

Also, retep998 has volunteered to help with the collisions. I hope the undertaking will go a little more smoothly with more people on them than just me. He'll be starting that when R4 enters a stable test phase.



Ism and I talked for a bit, and now she is working on a set of classes in C and in Java that will allow the two to share resources. Getting a C DLL to call Java functions isn't going to happen, but I can probably communicate some simple instructions by returning an array of them.

Also, we used to use std-out to communicate from ENIGMA to LGM, such as info about what was taking place in the compiler. Well, now we can't, so hopefully we can create a reliable new mechanism for this. (It's a shame, too; she spent a fair deal of time threading that damn output window, and now it's useless...)

On the bright side, though we were originally afraid we'd have to add something to the path folder, we've found workarounds for that, too.



My current difficulty is figuring out a way to simplify installing a compiler for users. Problem is, Vista is incompatible with a release of MinGW for XP and the like, and I hate to think about Win7. The MinGW team has their own automated installer that downloads the correct version; maybe we can use that. The only problem that creates is locating the compiler after it installs it.... It doesn't add anything to the path variable, and the typical GM user doesn't even know what that means. ;_;

Suggestions/comments welcome. Criticism will be bashed thoroughly and considered later.
« Last Edit: March 23, 2010, 07:41:57 AM by Josh @ Dreamland » 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
Post made March 23, 2010, 07:39:40 AM was deleted at the author's request.
Offline (Male) Josh @ Dreamland
Reply #2 Posted on: March 23, 2010, 07:50:28 AM

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

View Profile Email
> I didn't know that he was this engaged in the project. Good to hear
This was only a recent thing, after this was posted on the GMC: http://gmc.yoyogames.com/index.php?showtopic=468479

He didn't post it, but it was inspired by him. Try not to laugh at the GMC nubblets.
"Yes, it's legitimate. Zach (the developer), has been working on it for a few days now."
"been working on it for a few days now."
"a few days now."

Anyway, the truth behind it is, (and I feel confident posting it here since none of the GMC nubblets will find this post and have their hearts broken) he just wrote something that loads GM resources. He did the programming of his test game himself. Since converting GML to C++ is a decent undertaking, I figured he may as well team up with us rather than put in his own individual attempt at converting the code. I'd have done the same with G-Java, except I prefer C++. He doesn't have a choice in his language. XD

> Can't you email them and ask for the source or some other kind of help?
These people are GNUs. They believe in Google and Doxygen, not in helping people.
« Last Edit: March 23, 2010, 08:02:54 AM by Josh @ Dreamland » 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
Post made March 23, 2010, 08:43:04 AM was deleted at the author's request.
Offline (Male) retep998
Reply #4 Posted on: March 23, 2010, 09:06:20 AM

Member
Location: Where else?
Joined: Jan 2010
Posts: 248
MSN Messenger - retep998@charter.net AOL Instant Messenger - retep998 Yahoo Instant Messenger - retep998
View Profile Email
:suicide:

...

...

:dance:
« Last Edit: March 23, 2010, 09:24:31 AM by retep998 » Logged
Offline (Female) IsmAvatar
Reply #5 Posted on: March 23, 2010, 09:26:20 AM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
Quote
(It's a shame, too; she spent a fair deal of time threading that damn output window, and now it's useless...)
It will still have to be threaded, so that waiting for the dll doesn't cause LGM to totally freeze, but at least I won't have to thread output retrieval. That's good, because I never really liked the bugger anyways. Also, now I won't have to figure out how to parse your output, because it will be stored in a more logical structure.
Logged
Offline (Male) retep998
Reply #6 Posted on: March 23, 2010, 09:27:32 AM

Member
Location: Where else?
Joined: Jan 2010
Posts: 248
MSN Messenger - retep998@charter.net AOL Instant Messenger - retep998 Yahoo Instant Messenger - retep998
View Profile Email
Quote
(It's a shame, too; she spent a fair deal of time threading that damn output window, and now it's useless...)
It will still have to be threaded, so that waiting for the dll doesn't cause LGM to totally freeze, but at least I won't have to thread output retrieval. That's good, because I never really liked the bugger anyways. Also, now I won't have to figure out how to parse your output, because it will be stored in a more logical structure.
See Josh?
Ism likes the new way, so quit complaining and work moar!
Logged
Offline (Male) Rusky
Reply #7 Posted on: March 23, 2010, 12:04:34 PM

Resident Troll
Joined: Feb 2008
Posts: 955
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
Heh, logical structure in Enigma.
Logged
Offline (Female) IsmAvatar
Reply #8 Posted on: March 23, 2010, 12:15:45 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
I never said the logical structure would be stored in Enigma. In fact, I was implying it would actually be in LGM.
Logged
Offline (Unknown gender) TGMG
Reply #9 Posted on: March 23, 2010, 03:57:05 PM

Developer
Joined: Jun 2008
Posts: 107

View Profile WWW Email
Quote
Ism and I talked for a bit, and now she is working on a set of classes in C and in Java that will allow the two to share resources. Getting a C DLL to call Java functions isn't going to happen, but I can probably communicate some simple instructions by returning an array of them.
What was wrong with getting a C dll to call java functions? I found JNI quite pleasant to use for this. I would have through serializing a LGM java class then loading it again with the class called from c++ would be the best option. Then the c++ code can just call the functions,getters and setters for the java class. Plus Java4Cpp is a great tool for creating header and source functions for a java class. So that the code would be something like:
Quote
java::lang::Integer* i = new java::lang::Integer("10");
      printf("i=%i\n", i->intValue());
Direct access to the functions of the class.
I'm pretty tired tho so could be missing something glaringly obvious :-[

Plus I got my macbook so would love to start on mac port whenever your ready :) Wouldn't mind looking into adding gml functions aswell if that would be ok :)
Logged
me
GMbed 2.0 :: Embed you gm games in websites.
Offline (Male) Josh @ Dreamland
Reply #10 Posted on: March 23, 2010, 04:09:08 PM

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

View Profile Email
Quote
Heh, logical structure in Enigma.
:trollspray:

Quote
What was wrong with getting a C dll to call java functions? I found JNI quite pleasant to use for this.
I figured that I'd acknowledge that this sounded nice. I don't know much Java though, so all of this is news to me, really. Maybe that will help Ism? :P

Quote
Plus I got my macbook so would love to start on mac port whenever your ready :) Wouldn't mind looking into adding gml functions aswell if that would be ok :)
Sounds great. I'm probably not going to be happy with the documentation until I've got the entire system actually working like I say it should (meaning I want LGM-ENIGMA communication done first), but integrating it should be so simple that really you could just start by creating an empty window and GL context in a separate project, then copy over the code when you're done. There are a few function names the rest of the engine relies on; the beauty is that most of them are the GML ones, so as long as you have a header that defines those, it should integrate simply by copying over some files and possibly moving the important parts of main to an initialize function for which I have not yet settled on a name.

My current two systems, XLib and WinAPI, just leave a header to include. I haven't yet decided if that's an idea worth keeping, but will make that decision once it compiles for a system and I can start making sure my changes don't break anything.

As for input, I just keep an array of keys, but really it's up to you if you intend to implement keyboard_check and the like.

So yeah, if you like, just get a Mac copy of the OpenGL rotating-triangle example and do your best to get input functions working, and any window_ functions you can.

Thanks again.
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 (Female) IsmAvatar
Reply #11 Posted on: March 23, 2010, 04:22:23 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
Quote
What was wrong with getting a C dll to call java functions? I found JNI quite pleasant to use for this.
First off, I tried using JNI just to get Java to call a C dll, but I couldn't for the life of me get it to work. I asked around for help, and got pointed to JNA. I tried it out and it worked wonderfully. However, I wasn't able to figure out how to get C to call any Java functions with it, so I assumed that was pretty much out of the question.

That said, what purpose would it serve if we did have a way for Enigma to call LGM's functions?
Logged
Offline (Male) Rusky
Reply #12 Posted on: March 23, 2010, 05:02:00 PM

Resident Troll
Joined: Feb 2008
Posts: 955
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
More flexibility? You could have it ask for specific things it needs, when it needs them, rather than just shoving it all at Enigma. You could have Enigma hand errors to LGM to show to the user.
Logged
Offline (Male) Josh @ Dreamland
Reply #13 Posted on: March 23, 2010, 07:15:42 PM

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

View Profile Email
This ^
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) RetroX
Reply #14 Posted on: March 23, 2010, 08:56:25 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Vista isn't compatible with MinGW?  What?  It's compatible with 7.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Pages: 1 2 3 »
  Print