ID:167254
 
i would like to make a program so that peps can meet there discuss the game, and go into games insisde of my program. bacicaly, i need to know how do put the hub inside of my game. not a link mind you, accually have the hub inside of my game.
anybody know how i would go about doing this?

EDIT: the whole point of this is so that i can have my own verbs for private chatting and stuff while playing that game.
The hub exists on the 'net for a reason: it's designed to be there. It is possible to load the hub into a BYOND game, but it will take a lot of work on your part since it's a pretty unneeded thing (except for you).
In response to PirateHead
could you accually HELP me, instead of just saying its complicated. if you don't know how to do it, dont post!
In response to Xiphan
You could create a new HTML window and just link it to the hub.

var/const/HUB = {"
<html>
<head><title>Enter the BYOND HUB!</title></head>
<body>

<a href='http://www.byond.com'>Click here to enter the <b>HUB</b></a>

</body>
</html>
"}

mob/proc/HUB()
src << browse(HUB,"window=HUB")
In response to Derekjeterisgod
if you could read, i said"NOT A LINK, MIND YOU" which means NOT A LINK!
In response to Xiphan
It will do the same thing, except with less coding...
In response to Xiphan
Xiphan wrote:
could you accually HELP me, instead of just saying its complicated. if you don't know how to do it, dont post!

Simple question, but not a simple answer. It depends on how you intend to place the hub "in" your game.

If you want it to appear in the embedded browser, you can simply use the link() proc.
target << link("http://games.byond.com/hub/GamesLive")


Placing the hub in a popup browser would require you to send a meta refresh tag through the browse() proc.
target << browse({"<META HTTP-EQUIV="Refresh" CONTENT="1;URL=http://games.byond.com/hub/GamesLive">"}, "window=hubpopup")


If you want to do anything fancier than that, like putting clickable icons in the Heads Up Display or filtering content, you'll have to use world.Export() to retrieve the page, then parse whatever is returned.
In response to Xiphan
With your apparent level of maturity, I doubt you can handle anything more complicated than giving the player a link.

If you want to put the hub into your game graphically, or use the hub page in some integrated sense, you'll need to use world.Export() to get the hub page, and then parse it. Shadowdarke said the same in his post.

Depending on how you parse it, you'll probably end up with a tab-delineated textfile, or a savefile, or a list, or some sort of easily manipulatable data.

If, for example, you then wanted to generate a list of currently active games and display their icons on the screen, it would be a simple process of looping through the img tags and loading up the proper files, compressing them or breaking them up (which might require an external tool written in C or something), and placing them on the appropriate screen.

If, for example, you wanted to show only DBZ games or only games with a certain number of people or whatever, you could write a simple filtering system that finds the relevant text snippet and reads the bit of information you want, then write a sort algorithm that puts the information in the correct order.

If you don't know how to handle HTTP requests, text parsing, data management, filtering and sorting, and communication with external software pieces (which, in my estimation, are all far above your level of experience), you probably can't meaningfully integrate the hub into your game. However, don't despair! All of those things have been done for you! You just need a link or popup window to access them.

-PirateHead
In response to PirateHead
thankyou for accually giving me some information to work off of. that was all i needed. your info has helped.