Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: [GM7] WIP MC Menu Engine  (Read 2115 times)

0 Members and 1 Guest are viewing this topic.
[GM7] WIP MC Menu Engine
« on: December 03, 2008, 05:46:51 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
I was working on it and wondered if this would be something that people would want to progress further. 

http://www.zfgc.com/index.php#?action=resources&sa=view&id=88

All you can do currently is move some tabs around.  Controls are up, down, left, right, x, and z.  It's not that fun if you can't see some of the code, so here is what goes on in at least the create event:

Code: [Select]
global.menu_type = 0;
global.menu_ptyp = 0;
global.menu_posi = 1;
global.menu_spos = 0;

main_tab_no = 3;

for (i = 1; i < 4; i += 1)
{
  main_tab[i] = instance_create(28,i * 32 - 5,tab_a);
  main_tab[i].no = i;
  main_tab[i].na = "Link";
  main_tab[i].ox = -80;
  main_tab[i].ix = 28; main_tab[i].iy = i * 32 - 5;
  main_tab[i].sx = 44; main_tab[i].sy = 39;
}

main_tab[i] = instance_create(28,i * 32 - 5,tab_b);
main_tab[i].no = i;
main_tab[i].ox = -80;
main_tab[i].ix = 28; main_tab[i].iy = 123;
main_tab[i].sx = 44; main_tab[i].sy = 39;

for (i = 1; i < 4; i += 1)
{
  sub_tab[i] = instance_create(i * 72 - 44,164,obj_tab_c);
  sub_tab[i].no = i;
  sub_tab[i].ix = i * 72 - 44;
  sub_tab[i].iy = 164;
  sub_tab[i].sx = i * 72 - 44;
  sub_tab[i].sy = 132;
}

The main_tab_no is only in there because I did not want to correct a function that was written to be dependent on it.  The cool thing about what I did though was create an array setup for instance ids, so I can easily access them in a control object.  I can also do checks on each individual tab with for loops. 

I haven't put it up fully, but the main_tab, for 1 - 3, are save tabs, while 4 is the language tab.  They act similar in terms of movement around the screen. 

Thoughts?

EDIT: I just finished an update to what I previously released. I added the option of changing the language from English to Spanish and back again.  I left out some of the borders that the official menu system the Minish Cap has due to not wanting to figure out translucency now, but meh.  The way in which the path slope is calculated and handled needs to be adjusted a bit; I had to alter the "speed" at which the language tab moved at because it was jumping over its bounds for some odd reason.

« Last Edit: December 03, 2008, 04:31:53 pm by 4Sword »
Logged
Re: WIP MC Menu Engine
« Reply #1 on: December 03, 2008, 10:58:16 am »
  • *
  • Reputation: +10/-0
  • Offline Offline
  • Gender: Female
  • Posts: 1469
This looks like it has a lot of potential, more importantly it could be useful to the community and those less capable of programming it themselves. You should definately continue it, although one thing I did notice (which doesn't have much to do with the engine itself) is the fact you failed to mention what programming language it was for. It might attract more viewers if you state in the subject what it is. Just my personal thoughts though.

Otherwise it doesn't look poorly coded or anything, so good job and good luck.
Logged
  • Elliott Parkinson
Re: WIP MC Menu Engine
« Reply #2 on: December 03, 2008, 11:12:55 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3374
For game maker, obviously, but like majora said, it's probably good to mention what language/tool it's for.
Logged
Quote from: Jason
Your community is a bunch of stuck up turds.
Re: WIP MC Menu Engine
« Reply #3 on: December 03, 2008, 11:56:19 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 2245
I'm pretty sure that's what the game maker 7 icon is for.
Logged
Re: WIP MC Menu Engine
« Reply #4 on: December 03, 2008, 02:28:39 pm »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
Yeah, I thought that the icon of this topic and that the executable had a Game Maker icon and the selected code segment would give it away as it had at least one common Game Maker function in it.  Anyway, yeah, as I was saying about the slopes and whatnot, currently I use incrementation on the x and y as a means for tab movement, but I could do something using speed and direction; although I would have to either alter the x and y so that they are non-fractions directly, or I would have to make it so it draws on either ceiled or floored values of x and y.

I should be able to get at least the name entering into this by on on the weekend as well; I manage it in an object that gets deactivated and activated only if the menu state is not 3 or is 3.  I also then have to at least change it so that it uses an INI file so I can store more easily the hearts values as well as making it so the "copy" and "delete" tabs can be programmed a little easier.

But yeah, thanks for your comments.

EDIT: Oh, and there seems to be an error in the language changing.  If you are in Spanish and you motion over to English without selecting it and then press X, it switches to English when it should not.  I'll fix that up after school.

EDIT2: Nevermind, I fixed it up easily.  I forgot that since the language menu was not recreated but that it was reactivated, I needed to make it so temp_lang could change.  I fixed it in the Z press.  I will upload that and possibly the change to how tabs move later.
« Last Edit: December 03, 2008, 04:47:10 pm by 4Sword »
Logged
Re: [GM7] WIP MC Menu Engine
« Reply #5 on: December 04, 2008, 05:50:15 pm »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
Not that anyone seemed interested, but I have an update.

I redid the code for the fourth, language tab so that it moved at a slower speed - close to what it was in the actual game.  I fixed the language bug that I previously mentioned.  I added the animated background and I also added a title.  I reworked the code as well after realizing that if I was doing something with an initial and terminal x and the lines dependent on them, that I could use the same line rather than two lines with opposite slopes.

Download:
http://www.zfgc.com/index.php?action=resources&sa=getdownload&id=209
Logged
Re: [GM7] WIP MC Menu Engine
« Reply #6 on: January 05, 2009, 02:14:41 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 245
4Sword, could you release the GMK?

Studying how to choose between different options boxes could really help me with something I'm working on.  ;)
Logged
Re: [GM7] WIP MC Menu Engine
« Reply #7 on: January 05, 2009, 02:23:20 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
Sure, I was working on it, but got side-tracked when finals came about - I was also focusing on some other things as I thought that this had lost all interest. It is not done though at all and some of the concepts in it aren't fully realized, but you can use it. Actually, if I remember right, adding something such as a user name input and all the other crap wouldn't be that hard actually, just tedious.

http://www.zfgc.com/index.php?action=resources&sa=getdownload&id=228
Logged
Re: [GM7] WIP MC Menu Engine
« Reply #8 on: January 05, 2009, 03:18:09 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 245
Nice code.  XD Too advanced for me to understand at my current level, but still really nice.  :P
Logged
Re: [GM7] WIP MC Menu Engine
« Reply #9 on: January 05, 2009, 03:21:35 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
It's not really that fancy. The most difficult parts of it in my estimation would be: how I used switch statements when if-else would have been fine, and how I used the fact that instance_create returns the object's id as a means to store that id in an array. Otherwise in terms of tab movements, the menu object can only act when the tabs are in their spots for the specific menu state.

If you have any questions though if you try to add onto it or just a question in general, don't hesitate to ask.
Logged
Re: [GM7] WIP MC Menu Engine
« Reply #10 on: January 05, 2009, 03:31:57 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 245
Oh, I realize the code's not that fancy, it's just the opposite...what I'm saying is, I'm still such a noob that I can't understand the code.

Right now I'm working on coding a basic MM style banking system, and I thought this might help me figure out how to make a text box and branching dialogue, since the principle is similar.
« Last Edit: January 05, 2009, 03:49:03 am by legendarylugi »
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.05 seconds with 56 queries.

anything