Sunday 9 November 2014

Main Menu

Every game needs a main menu-it is essential and allows the user to navigate the game.
Anyways, I programmed the menu today, this was my first time working with a imagemap within the main menu context-I've made them before but never for a main menu, and I wanted to give it a try.

How it basically works-if the user's mouse enters certain coordinates within the window-then the image switches to a different one-and if the user were to click then a certain action would happen (ie. If you click within the "New Game" coordinates-the game would start etc...If you clicked within "Load" you'd be taken to the load screen...)

These 'range of coordinates' are called hotspots. I had a total of 5, and with the engine I'm using Ren'Py, hotspots are coded using (x, y, w, h) So the coordinates of the top left corner of the hotspot (ie. 0,0) the width it extends too, and the height it extends downwards (note the coordinates for the top upper left of the hotspot)




I had quite a few bugs I had to work out-mainly with the coordinates and the images themselves (I had buttons overlapping into the other sections-and that messed everything up...) Microsoft paint is actually a very useful tool for finding coordinates.

I can offically say I'm able to do main menu imagemaps now...

Next up, I will be programming the rest of the GUI Screens, as well as the in-game menu, the dialogue boxes and such...

I also got to visit Queen's university this weekend-it's an older institution with some very very nice buildings. I'm hoping to be able to incorporate some of the scenery into my game somehow...hmmm.
Here's a glimspe:


More to come.

No comments:

Post a Comment