HTML pages inside minecraft

Discussion in 'Archived: Plugin Requests' started by atesin, Jul 4, 2014.

  1. Offline

    atesin

    category = mechanics, informational, miscelaneous

    suggested name = html pages, minecraft html

    what i want = put some web pages on my web server with images and forms, that i can read inside minecraft .. NOT A WEB BROWSER WITH ADDRESS BAR INSIDE MINECRAFT .. example: i write a web interface to search recipes and i can view inside minecraft, connected to my webserver, and intecact with it, without recipe plugin .. example: i can view the players rank realtime inside mc, and query stats, thougth http/html, inside minecraft .. example: player profile view/edit inside mc, with html forms

    ideas for commands = if you type /recipe internally opens http://localhost/minecrafthtml/recipes.php?player=$player or so, then it opens in a mc window interface ... if you type /profile it opens http://localhost/minecrafthtml/profile.php?player=%sender.name% and renders a player profile window inside minecraft, retrieved from the webserver, limited to the controls the page have

    i think this will add so much flexibility to minecraft game interface, game experience, and plugin development .. i could not find anybody did some like this ... i found an ingame web browser once but , until could be based on it, i think is too heavy and is not that i am searching for

    (merged post)

    only thought on page rendering and send forms ... all logic can be processed on web server trough php, only pure html (JUST SOME HTML TAGS like images, forms, tables, anchors, no font styles) ... the more complex, the more hard to develop and insecure

    think on some like this

    [​IMG]

    [​IMG]

    HTML:
    <html>
    <table>
        <tr>
              <td><img src='none.jpg'/></td>
              <td><a href='recipe.php?item=gold'><img src='gold.jpg'/></a></td>
              <td><img src='none.jpg'/></td>
        </tr>
        <tr>
            <td><a href='recipe.php?item=gold'><img src='gold.jpg'/></a></td>
            <td><a href='recipe.php?item=redst'><img src='redst.jpg'/></a></td>
              <td><a href='recipe.php?item=gold'><img src='gold.jpg'/></a></td>
        </tr>
        <tr>
              <td><img src='none.jpg'/></td>
              <td><a href='recipe.php?item=gold'><img src='gold.jpg'/></a></td>
              <td><img src='none.jpg'/></a></td>
          </tr>
    </table>
     
    <img src='clock.jpg'/>
     
    <form action='recipe-php' method='get'>
      <input name='item'/><br/>
      <input type='submit' value='Search'/>
    </form>
    </html>
    
    Code:
    # config.yml
    commands:
    - recipe: 'http://localhost/minecrafthtml/recipe.php?recipe=$1'
    # ingame view/edit password, skin, etc
    - profile: 'http://localhost/minecrafthtml/profile.php?player=$sender.name'
    - ranking: 'http://localhost/minecrafthtml/ranking.php'
    - bugreport: 'http://localhost/minecrafthtml/bugreport.php?reporter=$sender.name&date=$timestamp'
     
  2. Offline

    Syd

    Before anyone comes with "not possible":
    It is possible. You can get the message a server sends you and you can render it on a Map.

    However, such a project would consume a lot of time, depending on what HTML/CSS/JS functionality you want to implement.
     
    danjb2000 likes this.
  3. Offline

    kyawkid1

    If someone made this plugin, That would be awesome, as this could be a very useful plugin.
     
  4. Offline

    ultralord_rulz

    Syd Adding CSS and JS would be a nearly-impossible request. Simple HTML by itself would be much more doable, and sounds like it is just what the OP is asking for; just some simple image tags for recipes and text for everything else.
     
  5. Offline

    atesin

    only thought on page rendering and send forms ... all logic can be processed on web server trough php, only pure html ... the more complex, the more hard to develop and insecure

    think on some like this

    recipemc.png

    recipebrowser.png

    HTML:
    <html>
    <table>
        <tr>
              <td><img src='none.jpg'/></td>
              <td><a href='recipe.php?item=gold'><img src='gold.jpg'/></a></td>
              <td><img src='none.jpg'/></td>
        </tr>
        <tr>
            <td><a href='recipe.php?item=gold'><img src='gold.jpg'/></a></td>
            <td><a href='recipe.php?item=redst'><img src='redst.jpg'/></a></td>
              <td><a href='recipe.php?item=gold'><img src='gold.jpg'/></a></td>
        </tr>
        <tr>
              <td><img src='none.jpg'/></td>
              <td><a href='recipe.php?item=gold'><img src='gold.jpg'/></a></td>
              <td><img src='none.jpg'/></a></td>
          </tr>
    </table>
     
    <img src='clock.jpg'/>
     
    <form action='recipe-php' method='get'>
      <input name='item'/><br/>
      <input type='submit' value='Search'/>
    </form>
    </html>
    
    Code:
    # config.yml
    commands:
    - recipe: 'http://localhost/minecrafthtml/recipe.php?recipe=$1'
    # ingame view/edit password, skin, etc
    - profile: 'http://localhost/minecrafthtml/profile.php?player=$sender.name'
    - ranking: 'http://localhost/minecrafthtml/ranking.php'
    - bugreport: 'http://localhost/minecrafthtml/bugreport.php?reporter=$sender.name&date=$timestamp'
     
  6. Offline

    timtower Administrator Administrator Moderator

  7. Offline

    atesin

    there are some similar projects in which it can be based..

    is not the same .. to save bandwith and processing, all fonts could be minecraft fonts and images could be tiny and minecraft could stretch them, like with skins

    - minebrowse
    - web displays
     
  8. Offline

    timtower Administrator Administrator Moderator

    atesin Those are mods though, welcome to the world of plugins where we can't do that.
     
  9. Offline

    atesin

    no need to be ironic .. i know these are mods and i know that cant't do with plugins

    i know how to make plugins just like you ... but this "minecraft html" escapes to my knowledge so this is what i am asking if someone accepts the challenge, please post constructive comments
     
  10. Offline

    timtower Administrator Administrator Moderator

    Then you can un-escape it...
    In my opinion it is best to use that link I gave you. Hook a plugin into it that will post the request and get the image. Then it puts the image in a map.
    Best what you will get.

    Or just make a direct link to images and have it get those
     
  11. Offline

    atesin

    i didn't understand what you posted above ... how can minecraft read some image trough http and show in UI ?

    could be but i didn't mean just display ingame images, i want some degree of interactivity too .. i think if minecraft can read an image by http and show ingame, then it can read an entire text (html) document and renders ingame

    i mean basic html, some tags like images, tables, forms and anchors .. no font styles as could use default minecraft fonts
     
  12. Offline

    timtower Administrator Administrator Moderator

    atesin Minecraft itself can't, bukkit can.
    And then you get back at the link I posted.
    And even with that "basic" html, you need a way to render it, nobody is gonna make a bukkit browser for that.
     
  13. Offline

    atesin

    you could do it ?
     
  14. Offline

    timtower Administrator Administrator Moderator

    Don't know the map stuff so no.
     
  15. Offline

    atesin

    well then someone else knows how to do it and likes the idea :)

    this plugin would add a lot of functionality to bukkit with an external webserver .. i was thinking you could make a change skin, change password and view player statistics ingame dialog for example, you could make a lot more :)
     
  16. Offline

    timtower Administrator Administrator Moderator

    atesin You do realize that it isn't clickable?
     
  17. Offline

    atesin

    yes, it have to make it clickable .. there is a lot of stuff ingame that are clickable, then maybe is possible

    i mean it must write a PLUGIN to add all those functionality minecraft don't have but we want .. better think how to make clickable images, clickable buttons, editing input dialogs, etc., instead of saying "you can't do that" , obvious
     
  18. Offline

    timtower Administrator Administrator Moderator

    atesin We can't, you don't even have a cursor, and if you have one then the client won't send it to the server.
    If you want to go against this: be my guest, but if you claim that it is possible then also please show me your code etc.

    There isn't a difference between mods and plugins for nothing
     
  19. Offline

    atesin

    there is a cursor .. when you type something on chat area, search some item in creative inventory, use a name tag with an anvil, etc

    so you say this addon can be possible with a mod ?
     
  20. Offline

    timtower Administrator Administrator Moderator

    atesin You don't see that cursor when you have a map open do you?
    That parts exists doesn't mean that we are always able to use them.
    And yes, but those aren't supported on here and you posted 2 links yourself already
     
  21. Offline

    Necrodoom

    You have 3 options for an interface:
    1. Map (can look whatever way you want it to look, however no interacting options at all aside from player movement)
    2. Item GUI (simply items with tooltip text, since fires events, its fully use able GUI, but would look nothing like a webpage)
    3. Chat ASCII (dump text file into chat, interaction is limited to clickable links)
     
  22. Offline

    Freelix2000

    That gui menu that you created in the image as an example would be impossible. To render things like that, it would have to be a map, and it would have to re render with each change that is made. It could not detect clicks and would have little interaction, but I guess one possible way to have clicks could be to make a "cursor" which is really a few pixels being rendered on the map and listen for PlayerMoveEvent to move the cursor with WASD, then detect clicks with PlayerInteractEvent. I don't know anything about communicating with web servers, though.
     
  23. Offline

    timtower Administrator Administrator Moderator

    Freelix2000 Finding the buttons alone on the map is a challenge on its own.
     
  24. Offline

    Zupsub

    Well, there are two more, I can imagine.

    4.: display a hologram (maybe in front of a white wall). Clickable, only text and small rects possible, same color codes as in chat.

    5.: give player a book (same way as map): only text (+color codes, and these rects). Multiple pages.


    However, nothing to really show an webpage.


    Besides, I think it is a impossible idea, rendering a webpage on a map.
    Why impossible? Since rendering a webpage is heavy, even if the client would do, but a server would have to render the webpage for all client viewing it, and a bukkit server (which is written in java) is not that performant itself.


    So in conclusion: just forget the idea.
     
  25. Offline

    Necrodoom

    Actually, Freelix2000 idea is very clever, and could probably work for simple pages (although painful) though, as timtower said, outside of taking a premade image as atesin demonstrated, it wouldnt be able to display actual webpage, unless you actually write a full blown HTML parser and renderer, which would probably end up laggy and buggy.

    Pretty much, this is theorically possible, but extremely difficult and long to do.
     
  26. Offline

    atesin

    so i think it is more possible to do it with a mod ?

    anyway .. would be great if it would be done!

    too bad i don't know how to make mods, any suggestion?
     
  27. Offline

    timtower Administrator Administrator Moderator

    atesin Yes it is possible, you posted links yourself, no need to make a new one.
    And besides that: mods aren't supported on here.
     
  28. Offline

    ultralord_rulz

    What I personally would do is just have your PHP return some JSON containing an image url, and maybe some coordinates for some sort of coordinate system that could be fashioned, and when you move your "cursor" with Freelix2000 's idea, you can have them "click" on these rectangles defined by the coordinate points to imitate things like buttons or whatever.
     
  29. Offline

    Freelix2000

    "an webpage"? You disgust me... =D
     
  30. Offline

    oscarshi1995


    A project that I have been working on could be used to achieve this. But the rendering will of course be slow as all hell. As for text input when a user clicks a text box it could prompt in chat and that would be how text boxes could work
     

Share This Page