Plugins & Behaviors in development

Forum Home Forum Home > Construct 2 Development > Plugins for Construct 2
 Post Reply Post Reply Page  <1234 7>
Author
3,321 Rep
Post Options Post Options   Quote wgfunstorm Quote  Post ReplyReply Direct Link To This Post Posted: 06 Jan 2012 at 11:51pm
I've been meaning to make an enum plugin. I really miss them from other languages.

I end up having a lot of global variables such as UPGRADE_MOVESPEED, UPGRADE_SCOREMULT, etc so that I can then do things like upgradeData.At(UPGRADE_MOVESPEED, UPGRADE_PRICE) without having to remember which entry in the array the upgrade I want is at.

There's many more examples of cases where I find this approach is useful but I end up with 834239012093 global variables that I treat as const's cluttering up my variable list.

The plugin would let you do something like this:
- action -> create enum "UPGRADES"
- action -> add "PRICE" to enum "UPGRADES"
- and then you can use expression UPGRADES.PRICE

Any thoughts / advice before I start this in the next few days?

Edited by wgfunstorm - 06 Jan 2012 at 11:52pm
Back to Top
16,787 Rep
Post Options Post Options   Quote newt Quote  Post ReplyReply Direct Link To This Post Posted: 07 Jan 2012 at 12:25am
Originally posted by wgfunstorm wgfunstorm wrote:

I've been meaning to make an enum plugin. I really miss them from other languages.

I end up having a lot of global variables such as UPGRADE_MOVESPEED, UPGRADE_SCOREMULT, etc so that I can then do things like upgradeData.At(UPGRADE_MOVESPEED, UPGRADE_PRICE) without having to remember which entry in the array the upgrade I want is at.

There's many more examples of cases where I find this approach is useful but I end up with 834239012093 global variables that I treat as const's cluttering up my variable list.

The plugin would let you do something like this:
- action -> create enum "UPGRADES"
- action -> add "PRICE" to enum "UPGRADES"
- and then you can use expression UPGRADES.PRICE

Any thoughts / advice before I start this in the next few days?


That actually sounds a lot like rex's hash table plug
http://www.scirra.com/forum/plugin-hash-table_topic47637_post298284.html

Edited by newt - 07 Jan 2012 at 12:26am
Back to Top
3,321 Rep
Post Options Post Options   Quote wgfunstorm Quote  Post ReplyReply Direct Link To This Post Posted: 07 Jan 2012 at 4:16am
There's certainly some similarities, and it would theoretically be possible to achieve what I want with a hashtable, but I really don't need the extra functionality of having to worry about matching keys->values. I like the simplicity of enum's that create & manage unique numeric keys behind the scenes for me.
Back to Top
16,787 Rep
Post Options Post Options   Quote newt Quote  Post ReplyReply Direct Link To This Post Posted: 07 Jan 2012 at 5:18am
Parsing strings isn't a real big deal atm, but the number of plugs that can load a file type is kinda low.

So what does everybody think would be the best overall type?
I'm guessing xml myself.
Back to Top
3,321 Rep
Post Options Post Options   Quote wgfunstorm Quote  Post ReplyReply Direct Link To This Post Posted: 07 Jan 2012 at 5:53am
I could see myself using that

Also the plugin you linked me above parses JSON->hashtable and can convert to string, which sounds pretty useful. Maybe you could team up with Rex and add XML to his plugin? Just a thought.

Edited by wgfunstorm - 07 Jan 2012 at 5:58am
Back to Top
10,806 Rep
Post Options Post Options   Quote rexrainbow Quote  Post ReplyReply Direct Link To This Post Posted: 07 Jan 2012 at 1:21pm
@wgfunstorm

That's a good idea, which I miss now is a XML parser/transfer.
Back to Top
6,687 Rep
Post Options Post Options   Quote septeven Quote  Post ReplyReply Direct Link To This Post Posted: 09 Jan 2012 at 6:50pm
@smitchell
Hopefully they'll be useful for your use.
It's really a big job to adapt it, I encountered several bugs but I see the end ;)
I think that is a plugin will need to update considering users feedbacks

Also guys, to give all sense to this thread, could the plugin developers send me a pm with the plugin they are developing or the one(s) they'll start in a close time.
I'll do a list on the first post to get more clearness.

Thanks
Back to Top
5,380 Rep
Post Options Post Options   Quote smitchell Quote  Post ReplyReply Direct Link To This Post Posted: 09 Jan 2012 at 8:25pm
@septeven, Yeah definitely.
Yeah I can imagine its huge!!

Would it be possible when you have the chance to give a few feature's it will include?
Back to Top
6,687 Rep
Post Options Post Options   Quote septeven Quote  Post ReplyReply Direct Link To This Post Posted: 09 Jan 2012 at 8:35pm
@smitchell
Let me know by PM what do you need exactly, I'll try to add it if it's not already done.
Back to Top
6,687 Rep
Post Options Post Options   Quote septeven Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jan 2012 at 1:01am
I start (on the first page) a list of plugins/behaviors that developers are developing or are planned to develop.
Send me by PM, your list with a little description as below. Thanks.

@Kyatric @Tom When I edit this topic, it takes off the stickied mode... ?
Back to Top
 Post Reply Post Reply Page  <1234 7>

Forum Jump Forum Permissions View Drop Down