Author Topic: [not reproducable]colorpickig gets mixed up with unit colors in rev 4360  (Read 577 times)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,226
    • View Profile
    • http://www.titusgames.de
I played a game using colorpicking today  . Forst all was ok, but later in the game I suddenly had some bad effects.

Suddenly one of my unit was selected instead of the enemy units, also it was not under my mouse pointer.
Later I tried to select a group of archers, but suddenly a a worker was selected too! I could do this again and again, always the same result. The worker was not in the selection triangle and by this he  should not have been selected.

Is it possible that the dynamic color assignment for colorpicking does not work as expected ? Do we really need such a dynamic assignment and a static one will not work ? I mean, even with a colordistance of 8 ( needed for some bad gfx cards ) this would mean we have 256 * 256 * 256 -1 = 16777216 -1 colors available. I think we will never see so many (selectable) units in a game, Even with the dead ones this will be enough.

« Last Edit: 23 June 2013, 23:44:22 by titi »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: colorpickig gets mixed up with unit colors in rev 4360
« Reply #1 on: 3 June 2013, 19:32:25 »
You need to look at the code titi. In model.cpp the class BaseColorPickEntity spaces EACH R G B value 8 colors away so its not as many as your calculaton shows above. The color spacing is needed for some drivers that merge close colors as I have read in articles online.

so its more like 255 / 8 * 255/8 * 255 / 8 = approximately 29791

Now also realize that resources are also part of this as they are also selectable, and that is why.

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: colorpickig gets mixed up with unit colors in rev 4360
« Reply #2 on: 5 June 2013, 07:24:16 »
Titi: Should this be moved and tagged [invalid] (which is the tag I've been using so far for bug reports which are not applicable to MG's latest stable version or newer or whether MG works as designed)?
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,226
    • View Profile
    • http://www.titusgames.de
Re: colorpickig gets mixed up with unit colors in rev 4360
« Reply #3 on: 5 June 2013, 11:35:23 »
@tomreyn: No this is a problem with svn version.
I already looked very careful at the current implementation. All looks good there :-/ . So I am still searching ... If I don't find it or I cannot reproduce it , I will close the ticket.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,226
    • View Profile
    • http://www.titusgames.de
Re: colorpickig gets mixed up with unit colors in rev 4360
« Reply #4 on: 6 June 2013, 23:45:27 »
still not completly fixed :-/

This flickering was introduced a long time ago when we made the first steps to improve colorpicking ( after 3.7.1 )
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,238
    • View Profile
Re: colorpickig gets mixed up with unit colors in rev 4360
« Reply #5 on: 20 June 2013, 21:46:20 »
I think this is fixed now.

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,226
    • View Profile
    • http://www.titusgames.de
Re: colorpickig gets mixed up with unit colors in rev 4360
« Reply #6 on: 23 June 2013, 23:43:59 »
flickering is fixed, and the colorpicking problem did not show up anymore, i close it as "not reproducable"
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios