Imgui In Vc:mp

Started by ., Dec 13, 2016, 09:40 PM

Previous topic - Next topic

.

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
.

vito

Nice. What is the syntax for GUICanvas()? No any info in wiki.

.

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.
.

Sebastian

#3


Just brilliant ! I love what I see there !
But implementing it server-side is recommended/stable/lagless ?

KAKAN

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.
oh no

.

#5
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.
.

.

Now I'm trying to implement Turbo Badger for VCMP. And again, just for the lolz. Just to see how hard is it to add a proper GUI library to vcmp.
.

Sebastian

Devs should let you help this project (vc:mp)

.

#8
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
.

.

#9
An update to further testing with this challenge. I've managed to get MyGUI 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.


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.


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
.

Sebastian

This sounds even easier. And "easy" îs the keyword for vcmp scripters :D
With a minimal effort, to get something.

Good job buddy!

MatheuS

if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.