Vice City: Multiplayer

Vice City General => Videos & Screenshots => Topic started by: . on Dec 13, 2016, 09:40 PM

Title: Imgui In Vc:mp
Post by: . on Dec 13, 2016, 09:40 PM
This is just a small project I've done tonight to attempt in an attempt to have a better GUI in VC:MP. This is just a couple hours of work with most of the time spent debugging. Mostly for the lolz and to satisfy some curiosity. Sorry for the bad quality but I have a sh!tty upload speed.

https://youtu.be/iEF1zBvUEZ8

NOTE: Since DirectX8 does not support Scissors, and no workaround was implemented, some clipping artifacts can be observed. Such as lines and/or text going outside the areas they're supposed to. This can be fixed with a bit of extra work. But meh.

IMGUI: https://github.com/ocornut/imgui
Title: Re: Imgui In Vc:mp
Post by: vito on Dec 13, 2016, 09:51 PM
Nice. What is the syntax for GUICanvas()? No any info in wiki.
Title: Re: Imgui In Vc:mp
Post by: . on Dec 13, 2016, 09:53 PM
Quote from: vito on Dec 13, 2016, 09:51 PMNice. What is the syntax for GUICanvas()? No any info in wiki.

Dunno, I don't use client-side scripting. Terrible implementation.
Title: Re: Imgui In Vc:mp
Post by: Sebastian on Dec 14, 2016, 09:43 AM
(https://s-media-cache-ak0.pinimg.com/originals/5d/ce/83/5dce833715a9e46044e8f8939906e9d7.png)

Just brilliant ! I love what I see there !
But implementing it server-side is recommended/stable/lagless ?
Title: Re: Imgui In Vc:mp
Post by: KAKAN on Dec 14, 2016, 09:48 AM
Quote from: sseebbyy on Dec 14, 2016, 09:43 AMBut implementing it server-side is recommended/stable/lagless ?
Stable: yes, I guess so...
lagless: Yes, for low latency user with 0% packet loss
recommended: According to me, no.

But to me, it seems like Single Player and not MP.
Title: Re: Imgui In Vc:mp
Post by: . on Dec 14, 2016, 10:38 AM
Quote from: sseebbyy on Dec 14, 2016, 09:43 AMJust brilliant ! I love what I see there !
But implementing it server-side is recommended/stable/lagless ?

This was just an example. IMGUI library is mostly meant to be used in C++ due to it's immediate mode design. I was forced to take this approach because the one implemented in vcmp is absolutely worthless. As soon as you start to do do something with it, the code becomes a clusterf*, debugging a nightmare, code too verbose and the implementation bugged like hell. Drove me insane.

So for the purposes of my project, I chose to implement a third party DLL that get's injected right before the VC:MP DLL. Which I then use to do my stuff.

But no, GUI cannot be implemented server-side. There are a plethora of GUI libraries that could be added to the vcmp client. However, the developers have to do that because designing one as a third party library might not be that easy and implies some workarounds.

Quote from: KAKAN on Dec 14, 2016, 09:48 AMBut to me, it seems like Single Player and not MP.

Look at the player in the back. No skin. Just a white mesh. I had to go at this menu because my mouse clicks don't interfere with the game.



Of course, other GUI libraries could be implemented. Anything but the official one. That one is absolute sh!t no matter how optimistic you are.
Title: Re: Imgui In Vc:mp
Post by: . on Dec 14, 2016, 10:44 AM
Now I'm trying to implement Turbo Badger (https://github.com/fruxo/turbobadger) for VCMP. And again, just for the lolz. Just to see how hard is it to add a proper GUI library to vcmp.
Title: Re: Imgui In Vc:mp
Post by: Sebastian on Dec 14, 2016, 12:53 PM
Devs should let you help this project (vc:mp)
Title: Re: Imgui In Vc:mp
Post by: . on Dec 14, 2016, 01:09 PM
Quote from: sseebbyy on Dec 14, 2016, 12:53 PMDevs should let you help this project (vc:mp)

Well, now that they've lost interest lately. It wouldn't have been such a bad idea to have someone maintain the project. Sure, I lack in reverse engineering (although not as much as you'd think). But not everything comes to that. And I do tend to learn quite fast.

Last time I asked they just vanished and I haven't seen any developer ever since. So there's your answer ;D
Title: Re: Imgui In Vc:mp
Post by: . on Feb 25, 2017, 05:49 AM
An update to further testing with this challenge. I've managed to get MyGUI (http://mygui.info/#ui-tabs-13) to work on DirectX8 with VC:MP. However, like usual. There's trouble with obtaining user input without disturbing the user and also the fact that a third party DLL is needed. Would be nice if this could be implemented directly in VC:MP.

(https://s7.postimg.org/yo34oguaz/Untitled.jpg)
(https://s12.postimg.org/xzlgmgj4t/Untitled.jpg)

The example GUI that you see on the screen was created without a single line of code (excluding the one used to load it) because MyGUI has this nice WYSIWYG editor that allows you to create GUIs and save them as layouts and load those instead.

(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fmygui.info%2Fimages%2Fscreenshots_3.2.1%2F3.png&hash=b754a5c75b51ce8e9ebb9e89477500176949ee1a)

Anyway, this was a fun project to play with but unfortunately I cannot expose this to Squirrel to make it usable. So this is all you get for now. This is all I can do from here :D
Title: Re: Imgui In Vc:mp
Post by: Sebastian on Feb 25, 2017, 09:07 AM
This sounds even easier. And "easy" îs the keyword for vcmp scripters :D
With a minimal effort, to get something.

Good job buddy!
Title: Re: Imgui In Vc:mp
Post by: MatheuS on Feb 25, 2017, 09:28 AM
Nice job! :))