Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Displaying web pages from an MV game?

Periastron

Villager
Xy$
0.00
Hi! First timer here, and apologies for the minimal profile and missing avatar--I'll catch up eventually.

I only used VX Ace sparingly, but mostly to write a small game that acted as a playable Christmas loot dispenser for my son. Basically, things would happen, chests would appear, and if he opened one, he'd get an item ("Small present", "Large present", etc.). Examining the item in the inventory would show the name of a game I'd previously purchased as a gift on Steam, and offer the opportunity to redeem the associated Steam key. In VX Ace, I could use a little bit of Ruby scripting to automatically launch a browser with the redemption URL, from inside the game--so he wouldn't even have to write the keys down or type them in. It was actually pretty cool!

I'm very new to MV, and while not a complete Javascript n00b, I'm assuming that unless the MV developers provided some extra functionality in their framework to launch external processes, the typical Javascript environment is going to be so completely sandboxed out the ying-yang that this sort of thing isn't going to work in MV. Which is maybe not a total disaster, if there's a way to create a browser pane in the game itself and send it to a URL. Any ideas?

(As an aside, yes, I know it's Dec. 23rd already... so this is probably a question for next year's loot dispenser. Unless there's a quick way to make this work, I'll just do this year's in VX Ace again. Which is sort of a shame, because I had most of the MV conversion done, up to this point. It's not a very big game. :-)

-- Peri
 

Tsukihime

Praised Adventurer
Xy$
0.00
What do you mean by "browser pane"?

The game is run in a browser, so you could in theory load websites into it directly.
Though I haven't looked at how that might work.

The game is run on a canvas, so you could, for example, use some libraries to create an "overlay" that pops up that takes control over the game, and then when they close the overlay, it would return them to the game.
 
Last edited:

Periastron

Villager
Xy$
0.00
I received an email, notifying me about a reply from Regius--but for some reason, his reply does not appear here. Anyway, his suggestion was to use window.open("http://your.url.here"); which actually appears to do exactly what I want: It opens an unadorned browser window on the specified URL. Thanks, Regius!

Time to find some resources to find out how to hook plugin code up to events...

Tsukihime, what browser is MV using? Is it Chromium under the covers?
 

Regius

Villager
Xy$
0.00
Oh I thought you wanted to write a url in the game itself and load a new window or something. So I thought I made a useless post...I'm glad it worked out for you haha
 
Top