- Joined
- Mar 22, 2012
- Messages
- 1,551
Well I think they could be really useful and nice looking, but why is there none of them. Can someone create one simple dgui, that moves nice when camera scroll? Please.
Can someone create one simple dgui, that moves nice when camera scroll? Please.
There is DGUI and I have already seen it in maps. But it's only recommended for Singleplayer maps, as getting the camera position is slower in multiplayer.
I don't have an example right now. Played some maps several years ago that had this. Google "DGUI+Wc3" and you will probably find the system.can you please give me link of some map, I think it is in one map by ilidan - mass destruction, but I havent seen it nowhere else. So may you share.
Most of dgui maps of wc3c are or useless or dont work for 1.24+ patchs.
However, forget about it if you want to create a multiplayer map. It just doesn't work.
In Multiplayer,Problem is?
GetCameraEyePositionX()
is only updated every 0.1 seconds. This is far too few FPS for DGUI to look good. As soon as you turn the camera, the GUI will shake like crazy.If you want a really crappy and unusable DGUI, then yes, you can hide the GUI while moving the camera.Why would they...? Well, even in singleplayer, would it not be better to hide the display while the camera is moving?
It would just look ugly. The idea of DGUI was that you can create permanent on-screen buttons or displays.Which functions would you realize in a dgui anyway? I think the hiding is more helpful when scrolling because you want to browse the map then. Of course in fast-paced maps it won't work out to put vital gameplay inputs there.
Interpolation only works between two or more points. As soon as you switch move directions of the camera, the interpolation will fail.The flickering could be beautified by transitions.
Interpolation only works between two or more points. As soon as you switch move directions of the camera, the interpolation will fail.
There's no need for that if you interpolate, as you will have 32 FPS then. The human eye will not notice any flickering there.It's a difference if you need to give your hero a life-saving health potion or it's an additional game progress display or you can open the options menu with a button.
I did not mean the input fluctuation but the flickering of the dgui component if you decided to instantly move it to the new coordinates of the player's screen. That would be really ugly and annoying. Better make it graduate towards the target location at high speed/slow down before arrival.
As you changed direction/strayed away from the interpolation, the dgui would shoot away from it's screen-relative position and reappear after the delay. If it just popped back instantly, that would be unaesthetic and less likely controlable for the player. Make it like a fun feature for the player to catch that little rascal like a missile.
You should definitely update and instantly move the DGUI positions as soon as GetCameraEyePositionX() retrieves a new value. This is like every 0.1 seconds. Interpolation is only for smoothing the movement until the next update of the GetCameraEyePosition comes.That is true, however, with a sufficiently small timer it will always come back fast and thus, the shakiness wouldn't be as bad.
You should definitely update and instantly move the DGUI positions as soon as GetCameraEyePositionX() retrieves a new value. This is like every 0.1 seconds. Interpolation is only for smoothing the movement until the next update of the GetCameraEyePosition comes.
From my perspective, the amount of maths is pretty small, actually.i dont think the flickering is a big problem as this system is already at its limit also its not possible to make it not flicker because there is too much math used to calc the positions so as the update interval decreases the cpu load will increase thus causing lag
All you need to do to make them 1.26 compatible is replacing all H2I functions by GetHandleId().I have tested all dgui from wc3, some of them are working, most dont work for 1.24+ patch, and this you have linked looks really ugly when you are moving camera.
Also there is bag system with dgui (first in "samples" on wc3c), but it is not working for 1.24+ (i heard that that bag system looks nice even when camera is moving).
Btw I feel like there is too much talking and not much working.
function H2I takes handle h returns integer
return h
return 0
endfunction
function H2I takes handle h returns integer
return GetHandleId(h)
endfunction