Pages: 1
  Print  
Author Topic: Lol  (Read 51498 times)
Offline (Unknown gender) skarik
Posted on: May 15, 2009, 10:55:51 pm

Member
Joined: Jul 2008
Posts: 46

View Profile WWW Email
Well, I was going to ask why draw_text doesn't work...and then I looked at the list of functions.

Anyhow, why aren't there any games with Enigma? For me, all I really need is draw_sprite, and I've got meself a game. I mean, should I make a really random game?

I noticed my little game's size is 632 kilobytes. Wicked!

Anyhow, how is C++ used in Game Maker Enigma? At the current state (r3) could I make my own objects and classes? Also, is it possible to get the window handle in C++?
I mean, how exactly is the C++ called? I can obviously see that cout isn't going to be working anytime soon. :P (That was a joke, by the way. I know where to use cout.)

I'm off to play Fallout 3. Bye bye!
Logged
~~
Offline (Male) Rusky
Reply #1 Posted on: May 16, 2009, 04:52:29 pm

Resident Troll
Joined: Feb 2008
Posts: 954
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
cpp { /* c++ here */ }
that would be how to use it. you can stick raw c++ in there and it just adds it in wherever the c++ block was. and technically, cout would actually work there, if you just #included it.
Logged
Offline (Unknown gender) skarik
Reply #2 Posted on: May 16, 2009, 09:08:03 pm

Member
Joined: Jul 2008
Posts: 46

View Profile WWW Email
Quote
technically, cout would actually work there, if you just #included it.
Yah, but nothing would show. I mean, unless I, like, output to a different stream or something...but I don't understand how any of that stuff works, just how to use it.

But hey! Cool! Time to try out some classes and shiz!
Logged
~~
Offline (Unknown gender) skarik
Reply #3 Posted on: May 17, 2009, 02:29:39 pm

Member
Joined: Jul 2008
Posts: 46

View Profile WWW Email
Okay, how the hell do the string functions work?

I swear, every time I try to do something, it gives me this crap on how it can't covert from a char to a string...that's with string_char_at()...but I mean, how else am I going to do it? So I try
Code: [Select]
    cpp {
    i_char = main_string.at(i);
    }
and then it throws that it's a var struct? What the hell?

So I remove the C++ and change the i_char to a "var" and that line gives me no problems. Then I come to:
Code: [Select]
i_index = ord(i_char)-32;And it says that i_char is a std string again? Whut?!? So I do:
Code: [Select]
cpp {
    i_index = i_char.at(0);
    }
And it says that it's a var struct? Wa!? So then I just do
Code: [Select]
i_index = i_char; and it works! WHAT THE HELL? I THOUGHT I DECLARED i_index AS A double !! Epic Automatic casting or sompin'?

And so it works, but what the hell?

Really, the whole script makes no sense to me.
Code: [Select]
var main_font;
main_font = argument3;

var main_string;
main_string = argument2;

var main_string_i_max;
main_string_i_max = string_length(main_string);

var i;
var i_char;
double i_index;

for (i = 0; i < main_string_i_max; i += 1)
{
    i_char = string_char_at(main_string,i);

    i_index = i_char;

    i_index = i_index - 32;
   
    draw_sprite(sprMainFont,i_index,argument0+(i*13),argument1);
}

Oh, and I can only get the first index (image_index zero) of a sprite to draw. Is that known?

But anyhow, this is pretty sexy. XD
Logged
~~
Offline (Unknown gender) skarik
Reply #4 Posted on: May 17, 2009, 02:52:14 pm

Member
Joined: Jul 2008
Posts: 46

View Profile WWW Email
Now I'm getting a bunch of weird stuff. It works one second and then dies the next.

http://www.box.net/shared/rf354umc01

It shows the code in the compiler box and then says something about an unexpected error or handle or event or something and it asks me if I would like to debug it with MSVC++ 2005.
Logged
~~
Offline (Unknown gender) skarik
Reply #5 Posted on: May 23, 2009, 11:13:48 pm

Member
Joined: Jul 2008
Posts: 46

View Profile WWW Email
So I'm guessing no one knows.

Okay, I abandoned Enigma for pure C++ anyways. XD
Logged
~~
Offline (Unknown gender) score_under
Reply #6 Posted on: May 24, 2009, 05:47:30 am

Member
Joined: Aug 2008
Posts: 308

View Profile
Please don't.

Because I love C, and my C fanboyness tells me that C++ corrupts the mind! At least learn C before C++... please?

Then we can have fun doing things like:
Code: [Select]
int i;
char x[20];
for(i=0;i<20;i++)
{
  ((char*)i)[x]=0;
}

Hooray for messed up minds, yes, that sort of thing would actually work.
Logged
Offline (Male) sprintf()
Reply #7 Posted on: May 24, 2009, 06:11:07 am

"Past Contributor"
Location: S. Wales
Joined: Apr 2008
Posts: 72
MSN Messenger - dmgoron@gmail.com
View Profile Email
You should learn C++ before C, or you risk picking up bad habits from C which are used to work around the features it doesn't have, which C++ does. C is a functional subset of C++. Anything you can do in C you can do in C++, so you wouldn't be missing anything. Or skip both, unless you have the masochistic desire to write a game in C++ ^_^
« Last Edit: May 24, 2009, 06:12:40 am by sprintf() » Logged
Offline (Unknown gender) skarik
Reply #8 Posted on: May 24, 2009, 01:24:12 pm

Member
Joined: Jul 2008
Posts: 46

View Profile WWW Email
No, I'm not writing any games in C++, just wrapping DLL's in a DLL and shiz.

@score_under

Give me a minute to figure with that piece of code. That is freaking awesome.
Logged
~~
Offline (Male) Rusky
Reply #9 Posted on: May 25, 2009, 04:47:26 pm

Resident Troll
Joined: Feb 2008
Posts: 954
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
XD what a pointless, awesome piece of code.
C is for writing drivers and confusing, awesome code, not anything normal :P
Logged
Offline (Male) Josh @ Dreamland
Reply #10 Posted on: June 09, 2009, 02:46:45 pm

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

View Profile Email
It's also for writing entire operating systems. And Dave's right; C will leave you with some nasty habits in C++.
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 #11 Posted on: June 09, 2009, 05:32:57 pm

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
I thought Ubuntu and Fedora were made in C++. >_>

I've been foiled again!
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? :(
Offline (Unknown gender) skarik
Reply #12 Posted on: June 13, 2009, 12:55:00 am

Member
Joined: Jul 2008
Posts: 46

View Profile WWW Email


Nope, I'm pretty sure that's C++ there.
Logged
~~
Pages: 1
  Print