Jump to content


Photo

Game a certain size?


  • Please log in to reply
4 replies to this topic

#1 ChefDavid22

ChefDavid22

    No, YOU shut up!

  • GMC Member
  • 1193 posts
  • Version:GM:Studio

Posted 27 July 2012 - 01:31 PM

I am just now starting to convert some games to HTML5. Is there a way to resize it via the webpage itself or do I need to resize my games accordingly in gamemaker before the compile?
  • 0

#2 Cheppa

Cheppa

    GMC Member

  • GMC Member
  • 50 posts

Posted 27 July 2012 - 04:03 PM

You can do it with javascript. Here's something related to the topic: http://www.w3schools...anvas_scale.asp
  • 0

#3 ChefDavid22

ChefDavid22

    No, YOU shut up!

  • GMC Member
  • 1193 posts
  • Version:GM:Studio

Posted 27 July 2012 - 04:11 PM

Well in keeping with the context of having it all done by game maker - is it more logical to just resize my game before the html5 compile?
  • 0

#4 Mike.Dailly

Mike.Dailly

    Evil YoYo Games Employee

  • Administrators
  • 1483 posts
  • Version:GM:Studio

Posted 27 July 2012 - 07:52 PM

The game will "fit" whatever canvas size is set.

The easiest way is to make a new room right at the start, set the size to be what you want the game to be (this sets the canvas size), then in the create event of the room... move to the next room.

From then on, ALL rooms will scale to FIT that first space, meaning you don't have to resize anything.
  • 0

#5 ChefDavid22

ChefDavid22

    No, YOU shut up!

  • GMC Member
  • 1193 posts
  • Version:GM:Studio

Posted 27 July 2012 - 07:55 PM

Thanks for the tip. I appreciate it.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users