In-game Menus - Images vs Code?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Lacotemale
Citizen
Posts: 75
Joined: Sat Mar 08, 2014 9:01 pm

In-game Menus - Images vs Code?

Post by Lacotemale »

Not sure what people do normally. So im still working on porting over a game I was working on in C code. Only thing is my old game was created to a set resolution (something awful like 640 x 480).

In my new version created in Love2D I have made it responsive to the point that the map and menu cursor positions adjust. However the menu is still using my old graphics. So the menu itself looks tiny and out of proportion on a bigger res screen.

So do people just create menus from love2d shapes instead? I played around and while it looks plain, it does scale which is nice. Opinions anyone?
User avatar
adrix89
Party member
Posts: 135
Joined: Fri Oct 15, 2010 10:58 am

Re: In-game Menus - Images vs Code?

Post by adrix89 »

Since the GUI options are limited currently you have to put with up with more basic options for now.

Have yo tried scaling?
I use Workflowy but you can check out Dynalist as its the better offer.
User avatar
Azhukar
Party member
Posts: 478
Joined: Fri Oct 26, 2012 11:54 am

Re: In-game Menus - Images vs Code?

Post by Azhukar »

adrix89 wrote:Since the GUI options are limited currently you have to put with up with more basic options for now.
What are you talking about? You have draw calls and input, imagination is the limit.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: In-game Menus - Images vs Code?

Post by Jasoco »

There are plenty of GUI libraries for Löve and you can write your own menu with work. Imagination really is the limit.
User avatar
adrix89
Party member
Posts: 135
Joined: Fri Oct 15, 2010 10:58 am

Re: In-game Menus - Images vs Code?

Post by adrix89 »

Jasoco wrote:There are plenty of GUI libraries
Not with any good graphic resizing support.
I use Workflowy but you can check out Dynalist as its the better offer.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: In-game Menus - Images vs Code?

Post by Jasoco »

adrix89 wrote:
Jasoco wrote:There are plenty of GUI libraries
Not with any good graphic resizing support.
Write your own. The point is the possibilities are endless. What exactly is the OP going for?
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: In-game Menus - Images vs Code?

Post by kikito »

One option could be: create the image menu with the highest resolution that you want to support (scaling down is usually not an issue), and handle different aspect ratios with "black bars" (or "background bars"). Take into account that graphic cards (esp. old ones) start having trouble when you go beyond 1024x1024.
When I write def I mean function.
User avatar
Lacotemale
Citizen
Posts: 75
Joined: Sat Mar 08, 2014 9:01 pm

Re: In-game Menus - Images vs Code?

Post by Lacotemale »

Hmm.... I think image scaling might work. Just looking at it again and im not even sure do I need to change something or is it going to be alright.

On a 1920 x 1080 resolution with a 22 inch screen it looks fine. I mean the menu is small in comparison to the overall area but still usable. However, I posted because on my 14 inch laptop screen it also has a 1920 x 1080 resolution but the menu looks so tiny and not readable.

I guess I should change it, although the problem just seems most apparent when using a small HD screen.

How do I scale an image in Love2d?
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: In-game Menus - Images vs Code?

Post by micha »

Lacotemale wrote:How do I scale an image in Love2d?
With additional parameters in love.graphics.draw:

Code: Select all

love.graphics.draw(image,x,y,rotation, scale_x, scale_y)
Set rotation to 0 and scale_X and scale_Y to any number.
User avatar
Lacotemale
Citizen
Posts: 75
Joined: Sat Mar 08, 2014 9:01 pm

Re: In-game Menus - Images vs Code?

Post by Lacotemale »

Thanks guys. Although scaling seems like a good idea it seems like too much work for the limited time I have to work on my game. I decided to settle on just increasing all the menu graphics and fonts instead. The result is much better now even on the big resolutions.

Some day I will build a nice menu system all in code but not today. :D
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 231 guests