Jump to content


Photo

How to either split a canvas or use multiple canva


  • Please log in to reply
3 replies to this topic

#1 morenberg

morenberg

    GMC Member

  • New Member
  • 2 posts
  • Version:GM:HTML5

Posted 24 January 2012 - 10:04 PM

Hello, newbie here.

I went through the tutorial and I created a game (really cool!).
But for the game I want to build I want two sections; one displaying the game action, and another with dialogue and other information.
The game would need to be able to update both sections, and the user should be able to interact with both sections as well.

I've been looking through the forum here, and I'm not sure I see any posts that address this.

Can someone please recommend the best way to go about doing this?
  • 0

#2

  • Guests

Posted 24 January 2012 - 10:36 PM

Have a look at the "Demos" section, in there you'll find a "multi-canvas example", this how in detail how to have a single game control multiple canvases.

(Note: WebGL can not do this feature yet)

#3 Smarty

Smarty

    GMC Member

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

Posted 24 January 2012 - 11:05 PM

I'm not even sure whether or not the he actually needs the canvas solution just yet... morenberg, look up 'views' in the manual. This allows you to do what you want - you can have up to 8 of such sections (views) in the game window.

If you're making a HTML5 game, and you want those sections to take up different parts of the HTML page (rather then have them all on the same canvas) then indeed, look up the example. But make sure you're familiar with views before you start.
  • 0

#4 morenberg

morenberg

    GMC Member

  • New Member
  • 2 posts
  • Version:GM:HTML5

Posted 27 January 2012 - 02:35 AM

Views are working great for me. Thanks very much!
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users