Implement ManiaLinks in VisualBasic-Software?

Talk about ManiaLink development in this forum

Moderator: NADEO

TheM
Posts: 1446
Joined: 15 Jun 2010, 14:30
Location: Uden, Noord-Brabant, Netherlands
Contact:

Re: Implement ManiaLinks in VisualBasic-Software?

Post by TheM »

ManiaDesign wrote:
Electron wrote:
ManiaDesign wrote:Thanks for the answer, but the idea was, to view manialinks without maniaplanet in a software. Do you think it's possible?
It is possible. Search for Manialink Designer and Manialinks Editor, two WYSIWIG Manialink editors for TM1 as further examples.

But such a project needs a lot of planning. You need to consider how to implement the xml elements, how to translate the coordinate system, implement the layers, support style sheets and so on.
Puhh, that sound like many work... Maybe I do it^^
Well, you want to make a project, so you have to put in some effort.
Don't expect everything to be handed to you on a silver platter here... :thumbsup:
Global moderator | Dutch moderator | Laddermoderator | ManiaWiki moderator
Server Manager/webmaster of Smurfen.net, join us on Canyon, Valley and Royal!
ESL (Game) Staff Head for TrackMania (Stadium, Canyon and Valley).
User avatar
Florenzius
Translator
Translator
Posts: 2545
Joined: 27 Jul 2014, 20:31
Location: Germany
Contact:

Re: Implement ManiaLinks in VisualBasic-Software?

Post by Florenzius »

Yea, i know, but i thought, it's easier^^ :mrgreen:
Creative Director at UNBITN - 3D Modeler for Pursuit - ManiaPlanet Translator and Beta tester - Freelancer for Ubisoft Nadeo
___
MB - B550 AORUS ELITE
RAM - 32GB
CPU - AMD Ryzen 5 3600XT
GPU - Nvidia GeForce RTX 3070Ti
zocka
Posts: 205
Joined: 15 Jun 2010, 17:56

Re: Implement ManiaLinks in VisualBasic-Software?

Post by zocka »

A web client would be really preferable, as it's platform independent, you can more or less recreate many styles with basic css etc.
You could basically translate most elements 1:1 to html elements, wouldn't have too much of a struggle of parsing all elements first, then thinking about stuff like draw order because your browser does all the work for you: Since Manialinks have a fixed grid, you can position everything absolutely in the browser with z-index, use transforms etc :thumbsup:

For TMF there was this collection of styles: http://fish.stabb.de/styles/
As I once tackled the project of a Manialink viewer for TMF, I got all the pngs on that list from fish (the images without this mirror effect), but I don't know of a comparable source for TM2 styles.

What you should consider with Manialinks though is that you basically would have to compile the associated ManiaScript as well, in case the content (like translated text) is loaded via script, elements are hidden by default etc. For example you manage to render a landing page which consists of a background image and a button and that's it for your viewer, which I wouldn't really call a success.

After some thoughts about such a project I shelved it :D
manialink minigame shatter
my manialink: zockaml
my maniaflash: maniaflash?zocka
User avatar
w1lla
Posts: 2396
Joined: 15 Jun 2010, 11:09
Location: Netherlands
Contact:

Re: Implement ManiaLinks in VisualBasic-Software?

Post by w1lla »

http://maniaviewer.tm-ladder.com/ was something useful and can be achieved if people are interested might need to update the sources
TM² Info
SM Info
QM Info

OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
User avatar
Miss
Posts: 2155
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: Implement ManiaLinks in VisualBasic-Software?

Post by Miss »

I've been thinking of writing a Manialink to HTML renderer a few days ago, actually, haha
3080 RTX, Ryzen 3700X, 32GB RAM, Windows 11
Forum moderator, opinions are my own. :thx:
Check out Image openplanet, the alternative ManiaPlanet & Turbo scripting platform! (Openplanet subforum)
I also stream and tweet.
User avatar
Florenzius
Translator
Translator
Posts: 2545
Joined: 27 Jul 2014, 20:31
Location: Germany
Contact:

Re: Implement ManiaLinks in VisualBasic-Software?

Post by Florenzius »

zocka wrote:A web client would be really preferable, as it's platform independent, you can more or less recreate many styles with basic css etc.
You could basically translate most elements 1:1 to html elements, wouldn't have too much of a struggle of parsing all elements first, then thinking about stuff like draw order because your browser does all the work for you: Since Manialinks have a fixed grid, you can position everything absolutely in the browser with z-index, use transforms etc :thumbsup:

For TMF there was this collection of styles: http://fish.stabb.de/styles/
As I once tackled the project of a Manialink viewer for TMF, I got all the pngs on that list from fish (the images without this mirror effect), but I don't know of a comparable source for TM2 styles.

What you should consider with Manialinks though is that you basically would have to compile the associated ManiaScript as well, in case the content (like translated text) is loaded via script, elements are hidden by default etc. For example you manage to render a landing page which consists of a background image and a button and that's it for your viewer, which I wouldn't really call a success.

After some thoughts about such a project I shelved it :D
Thanks for your post :)

But for a web-client i have to learn xml + html, right? Thanks for the style-table. So is it possible to include these graphics in the html-code? Cos if not, there will be errors, because it don't finds the graphics from the code...

For the convert from XML to HTML i found some online-converters like this one: http://codebeautify.org/xml-to-html-converter

I hope i found the solution :)

Regards,
Flo

##EDIT 1## Lel, i converted a titlepack-menu-xml-file to html and there was no errors. But it doesn't looks like a interface of MP

http://i.imgur.com/jfxR2kR.png

Please... No shitstorm, i did read your posts and I know it doesn't works with maniaplanet fine, but i just wanted to test it, okay?

##EDIT 2## I just found this tutorial to convert a xml-file to a web-page(i think html). It's from microsoft and I'm not sure, wheter they use sharepoint...? I just installed it but i need a web-server on the sharepoint-foundation etc. :|

Here the link: https://support.office.com/en-US/articl ... #bmbennies
Creative Director at UNBITN - 3D Modeler for Pursuit - ManiaPlanet Translator and Beta tester - Freelancer for Ubisoft Nadeo
___
MB - B550 AORUS ELITE
RAM - 32GB
CPU - AMD Ryzen 5 3600XT
GPU - Nvidia GeForce RTX 3070Ti
zocka
Posts: 205
Joined: 15 Jun 2010, 17:56

Re: Implement ManiaLinks in VisualBasic-Software?

Post by zocka »

XML and HTML aren't really languages to learn. It's markup. What you had to learn would be CSS and JavaScript. To process the input you can use almost any other language you are comfortable with.

The links you dug up seem to aim at displaying data sets structured in XML documents.

It seems you have the wrong impression of what you need to do.

You would need to load the XML of the Manialink with some kind of Interpreter that allows you to iterate through the elements.
Based on what kind of XML node you are currently processing, you then create an element with fitting attributes. If you would really want to produce HTML code, have a look at this pseudo code:

Code: Select all

def _createHtmlCode(xmlNode):
  if (xmlNode.name == "label"):
    return _createLabelHtml(xmlNode)
  if (xmlNode.name == "frame"):
    return _createFrameHtml(xmlNode)
  ...

def _createLabelHtml(xmlNode):
  element = new XmlNode('span')
  element.attributes.text = xmlNode.attributes.text
  element.attributes.class = xmlNode.attributes.style
  ...
  return element

def _createFrameHtml(xmlNode):
  element = new XmlNode('div')
  element.attributes...
  for (node in xmlNode.children):
    element.children.push(_createHtmlCode(node))
  ...
I hope you get the idea of it.

To scale things, I would write the original values somewhere into the elements and later scale everything with JavaScript based on that, so you can react on window resizes etc.
manialink minigame shatter
my manialink: zockaml
my maniaflash: maniaflash?zocka
Post Reply

Return to “ManiaLink”

Who is online

Users browsing this forum: No registered users and 1 guest