Pages: « 1 2
  Print  
Author Topic: General Enigma Questions  (Read 5084 times)
Offline (Unknown gender) Darkstar2
Reply #15 Posted on: October 09, 2014, 08:48:54 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
Rubbish! Thats not the answer I wanted... Is there a suggested alternative? I am using them as a less memory intensive alternative to ds_grids.

Since Enigma is unpaid volunteer work, I am assuming asking for an estimated date of completion for buffers is "It'll be done when it's done." It will probably be another 10 years before I finish my game anyway, so I guess I can just keep messing around with GMS and check back here every now and again.

Thanks for all the help everyone. I'm sure I'll be coming back.

That's spot on mate, at least :D  The thing is that ENIGMA is not and never claimed to be 100% compatible with GM, however you can make full games with ENIGMA and find new ways to perform what you can in GMS, though if you are looking for 100% compatibility in porting your game, then I reckon you probably might be disappointed, ideally ENIGMA one day would be its own unique product, many of us hope so.

Don't hold your breath on the 10 years though, things get fixed / implemented here at a surprising rate pending developers availability, so you might be surprised, I know I was surprised :D

Cheers
Logged
Offline (Male) Goombert
Reply #16 Posted on: October 09, 2014, 08:55:06 PM

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

View Profile
Additionally extensions do work in ENIGMA, just not the resource extensions, I mean the dll ones, and I would actually recommend the Faucet Networking buffers over the ones Studio has built in.
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) time-killer-games
Reply #17 Posted on: October 09, 2014, 09:07:07 PM

Contributor
Location: Virginia Beach
Joined: Jan 2013
Posts: 1166

View Profile Email
Additionally extensions do work in ENIGMA, just not the resource extensions, I mean the dll ones...

If you think he's yanking your chain here's your proof. It's in the pudding.



http://enigma-dev.org/forums/index.php?topic=2238.0

Logged
Offline (Male) Goombert
Reply #18 Posted on: October 09, 2014, 09:31:57 PM

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

View Profile
lol, is that Bing Crosby?
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) time-killer-games
Reply #19 Posted on: October 09, 2014, 09:35:04 PM

Contributor
Location: Virginia Beach
Joined: Jan 2013
Posts: 1166

View Profile Email
like no der

edit

so you weren't giving "bill cosby" a funky name. "bing crosby" is a real person too. I learn something new every day (on google)
« Last Edit: October 09, 2014, 09:39:44 PM by time-killer-games » Logged
Offline (Male) Goombert
Reply #20 Posted on: October 10, 2014, 02:42:13 AM

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

View Profile
Bing Crosby used to whip his children with a belt.
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) RujiK
Reply #21 Posted on: October 10, 2014, 08:32:48 PM
Member
Joined: Oct 2014
Posts: 7

View Profile
Actually, [buffers] probably have more overhead than data structures which are raw collections, ours from the standard template library and likely theirs as well. Buffers were designed for networking, this means they have the added overhead of checking and reordering endianess. Data structures are likely much much much faster at sorting data as well.

Like you said, data structures are faster than buffers but I haven't used them due to the memory issues. I'm not even using them for networking yet so I agree it is a bit of a waste.

BUT, here is the problem:

A 16 bit 4096x4096 wrapped buffer takes 32 megs of memory but a grid would take 160 megs. I would gladly switch to any other form of data storage if one exists with a low memory cost.  Originally, I was using grids but switched over as my map size increased.
If there was a ds_grid_set_bits command or something I would switch over in a heartbeat.

@Darkstar2
I have no problem with GMS compatibility != 100%. I'm just stuck trying to "find new ways to perform what you can in GMS" as you said. Learning C++ would probably be a considerable benefit here though. I haven't given up yet though!

@time-killer-games
It seems china has blocked whatever image host that is. It'll have to wait another week for me to see.

So in conclusion, any suggestions for 16 bit number storage on a large scale?
Thanks again.
Logged
Offline (Male) Goombert
Reply #22 Posted on: October 10, 2014, 09:10:34 PM

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

View Profile
Quote from: Rujik
BUT, here is the problem:

A 16 bit 4096x4096 wrapped buffer takes 32 megs of memory but a grid would take 160 megs. I would gladly switch to any other form of data storage if one exists with a low memory cost.  Originally, I was using grids but switched over as my map size increased.
If there was a ds_grid_set_bits command or something I would switch over in a heartbeat.
Ahhh you see here you are probably correct. Why would this be the case? Because the buffers store the data with actual data types, a data structure stores the contents in var/variant meaning it overloads all reals as doubles.

Quote from: Rujik
I have no problem with GMS compatibility != 100%. I'm just stuck trying to "find new ways to perform what you can in GMS" as you said. Learning C++ would probably be a considerable benefit here though. I haven't given up yet though!
Well there is a much better way that's even more optimal than using buffers and quicker to iterate, read, and write. It's called using arrays of type unsigned for each pixel, which ENIGMA does currently support. We do currently support real int, boolean, and standard C++ data types. But currently we need to fix var to overload array so that we can return them from functions, at which point I am going to add the function surface_get_pixels to ENIGMA. I also plan on functions like d3d_model_vertices(var vertices[]), draw_getpixels(), and other related functions.

Sorlok says he can fix it after he finishes new placement with var.
http://enigma-dev.org/forums/index.php?topic=2294.msg23126#new

Quote from: Rujik
So in conclusion, any suggestions for 16 bit number storage on a large scale?
Yes using an array with the actual data type.
« Last Edit: October 10, 2014, 09:13:54 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) RujiK
Reply #23 Posted on: October 10, 2014, 09:50:12 PM
Member
Joined: Oct 2014
Posts: 7

View Profile
That sounds terrific, but I think your going to have to hold my hand on this one.

I tried this:

Code: [Select]
i = 4096*4096;

while i > -1 {
     arr[i] = irandom(65535);
     i-=1;
}

and stuck "unsigned" in all over the place, but received errors no matter where I put it. Where exactly does the declaration go? Or were you suggesting I use a C++ array instead of Enigma's?

Thanks for your persistence here Mr Colton.
« Last Edit: October 10, 2014, 09:51:43 PM by RujiK » Logged
Offline (Male) Goombert
Reply #24 Posted on: October 10, 2014, 09:56:02 PM

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

View Profile
Well first of all you can't compare unsigned (i) to signed (-1).

I just tested the following and it worked.
Code: (EDL) [Select]
int i = 4096*4096;
while i > -1 {
  arr = irandom(65535);
  show_message(string(i));
  i -= 1;
}

Unsigned works as well it's just that an unsigned number is always larger than 0. So we just need to add array length support and then we can offer alternative and much better more efficient functions than what Studio has anyway.

I tried the following as well.
Code: (EDL) [Select]
int i = 4096*4096;
unsigned start_time = get_timer();
while i > -1 {
  arr = irandom(65535);
  i -= 1;
}

show_message(string(get_timer() - start_time));

And it executed in 312546 microseconds.

I tried the following variation in Studio which executed in 5605667 microseconds for me.
Code: (GML) [Select]
i = 4096*4096;
start_time = get_timer();
while i > -1 {
  arr = irandom(65535);
  i -= 1;
}

show_message(string(get_timer() - start_time));
« Last Edit: October 10, 2014, 10:03:53 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 #25 Posted on: October 12, 2014, 07:57:29 AM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
Quote
It's called using arrays of type unsigned for each pixel, which ENIGMA does currently support. We do currently support real int, boolean, and standard C++ data types.
That's not true. Regular arrays don't really work with these types sadly, but we might get it fixed in the near futures (Sorlok?).
Logged
Offline (Unknown gender) RujiK
Reply #26 Posted on: October 12, 2014, 08:27:23 AM
Member
Joined: Oct 2014
Posts: 7

View Profile
No wonder I couldn't get it to work...

I tried filling an array with unsigned variables but every slot still took 10 or 12 bytes or whatever.
Then I tried to somehow declare the array itself as unsigned or an int but this just gave errors.

Oh well, I will just have to sit and wait for the update.  :munch:
Logged
Pages: « 1 2
  Print