Support for dynamic data structures

You must understand the Game Editor concepts, before post here.

Support for dynamic data structures

Postby zygoth » Fri Jul 30, 2010 5:44 pm

If I am going to be doing complex programming, I absolutely need some sort of dynamic list at the least, and I would really like a hash map and some other structures as well. Would it be possible to just copy and paste a linked list library into the global code and have it work? I have thought about how you could make a linked list using actors, but that seems like it would have a whole lot of unnecessary overhead. Easy access to some data structures would make things so much easier. The main problem I have run into is that GE doesn't let you allocate non-temporary memory during the game except when you are creating or destroying Actors. Has anybody gotten something to work? Any thoughts?
Nova: 100% Vertigo/Mazeman: 100%
Visit my website to download them both! http://www.ketonegames.com
User avatar
zygoth
 
Posts: 140
Joined: Mon Jun 11, 2007 6:37 pm
Score: 5 Give a positive score

Re: Support for dynamic data structures

Postby makslane » Fri Jul 30, 2010 7:06 pm

zygoth wrote:If I am going to be doing complex programming, I absolutely need some sort of dynamic list at the least, and I would really like a hash map and some other structures as well. Would it be possible to just copy and paste a linked list library into the global code and have it work?


Sure. The code must not depends of any external library.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Support for dynamic data structures

Postby zygoth » Fri Jul 30, 2010 8:00 pm

That solves part of my problem, but what if I want to have several different actors that all have their own linkedlist (of targets or whatever)? I can't make new actor variable types. I could map a linked list to each actor's clonename in a hash map, which would work pretty well. But I don't know of a way to create new linked lists on the fly...should I write a global function that uses malloc and then returns a pointer to the new linked list? I hope these aren't obvious questions...I'm more used to Java to be honest.
Nova: 100% Vertigo/Mazeman: 100%
Visit my website to download them both! http://www.ketonegames.com
User avatar
zygoth
 
Posts: 140
Joined: Mon Jun 11, 2007 6:37 pm
Score: 5 Give a positive score

Re: Support for dynamic data structures

Postby makslane » Sat Jul 31, 2010 1:43 pm

You can use the hash and linked list functions available on the net to control what you want.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest

cron