Author Topic: Question: How to enable the "Attack-Alert on Minimap" ?  (Read 7231 times)

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Question: How to enable the "Attack-Alert on Minimap" ?
« Reply #25 on: 18 December 2008, 02:29:58 »
@Daniel:
The code you showed should be using the global variable for max players. It's not good to have magic numbers in code (seems like you already know this). Also it wouldn't require a revamp of the new game screen because it uses the global (like you said).

From menu_state_new_game.cpp
Code: [Select]
//list boxes
    for(int i=0; i<GameConstants::maxPlayers; ++i){
labelPlayers[i].init(200, 500-i*30);
        listBoxControls[i].init(300, 500-i*30);
        listBoxFactions[i].init(500, 500-i*30);
listBoxTeams[i].init(700, 500-i*30, 60);
labelNetStatus[i].init(800, 500-i*30, 60);
    }

The global is at glest_game/game/game_constants.h
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

daniel.santos

  • Guest
Re: Question: How to enable the "Attack-Alert on Minimap" ?
« Reply #26 on: 18 December 2008, 20:31:00 »
Yea, I guess we could recycle the current game screen, but we would have to revamp it because the components would overlap each other if we add more rows like it is now.  I don't suppose that would be too terribly hard, but I would prefer to have it all re-written using a new GUI library anyway.  :)  Also, I have some other items that need to be added.
  • Checkbox: Pause Allowed
  • Checkbox: Speed Change Allowed
  • Checkbox: Auto-repair Enabled
  • Checkbox: Auto-return Enabled
And don't anybody get worried, speed changes will require approval by all players before allowed to actually happen.  The checkbox just specifies rather or not it's allowed at all.  As of 0.2.11, you can turn off auto-repair globally as well as auto-return.  In fact, I set auto-return to off as default because it seems more appropriate, although it doesn't behave like original Glest, where they keep running towards the target they saw, rather they stop when no more enemies are in sight (as units usually do in most RTS games).  A very similar functionality to auto-return can be obtained on units with a guard command, by telling them to guard a certain location or unit.

gameboy

  • Guest
Re: Question: How to enable the "Attack-Alert on Minimap" ?
« Reply #27 on: 19 December 2008, 07:06:57 »
yes, also i think the game screen should have a faction description, a faction image, a map image and a map description, and also the map selection should be in a different window, so there should be a button on the main game screen saying MAPS, once clicked opens a smaller a window which lets you choose the map and give a description, this could also be applied for the player's faction, though other players, like the CPU and opponents will remain as they are now.

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Question: How to enable the "Attack-Alert on Minimap" ?
« Reply #28 on: 20 December 2008, 04:13:08 »
I have created a new topic for new game screen. viewtopic.php?f=15&t=4018
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

modman

  • Guest
Re: Question: How to enable the "Attack-Alert on Minimap" ?
« Reply #29 on: 28 December 2008, 00:47:28 »

daniel.santos

  • Guest
Re: Question: How to enable the "Attack-Alert on Minimap" ?
« Reply #30 on: 29 December 2008, 09:30:07 »
Quote from: "gameboy"
yes, also i think the game screen should have a faction description, a faction image, a map image and a map description, and also the map selection should be in a different window, so there should be a button on the main game screen saying MAPS, once clicked opens a smaller a window which lets you choose the map and give a description, this could also be applied for the player's faction, though other players, like the CPU and opponents will remain as they are now.

Quite off-topic, but I think those are some good ideas.  Let's pick this up in hailstone's new topic.
Quote from: "modman"
I have made sounds that you guys can implement.

The sound when an enemy is seen
The sound when one of your units has been attacked
thanks!  I downloaded them and will check them out tomorrow.

Quote from: "modman"
Yes I was just about to post extra players as a suggestion!  This would make it so much more fun!  But you'd have to make changes to the map editor too, because no maps would support 5 players+ :'( But that might be hard on a lot of video cards too.
No, will have zero effect on video cards.  The lag that occurs when you have a lot of units is due to CPU over-utilization and it shouldn't be that inefficient.  I have a few plans for fixing that (involving eliminating the "units live in cells" concept).

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Question: How to enable the "Attack-Alert on Minimap" ?
« Reply #31 on: 30 December 2008, 02:22:36 »
OT: But wouldnt rendering five ally teams being attacked by five enemy teams be a little bit much for the cpu/video card/whatever?

And couldnt it be better to have sounds that are utilized depending on the tech tree? Default sounds could be used if there is no sounds with the tech tree, but I think a scout calling out a warning would be a bit better than a beep or buzz for tech. A robotic faction would sound like a machine warning, with a few beeps. Magic could be anything, such as a different kind of 'scout' voice. They could be quite optimized, and far better than a beep. 8)
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

modman

  • Guest
Re: Question: How to enable the "Attack-Alert on Minimap" ?
« Reply #32 on: 30 December 2008, 02:35:46 »
It just seems like another feature that is going to be too similar between the factions, and most people won't even make new sounds.  As long as the global sounds are done right, there doesn't need to be specialized sounds.

daniel.santos

  • Guest
Re: Question: How to enable the "Attack-Alert on Minimap" ?
« Reply #33 on: 7 January 2009, 11:34:36 »
There is no way to define the attack sounds globally, they must be specified separately for each faction (and if you're too lazy to do that, then you get nones :) ).  See Faction XML on wikia.  I guess my thought at the moment is to have it only create the visual cue when the auditory cue is produced, which I propose a max of once per 30 seconds, but that's up to the faction.xml.  Or maybe the visual flare could repeat a few times, but then be silent for the next n seconds.  Also, this only appears if the attack occurs off-screen.

Ayrin Greenflag

  • Horseman
  • ****
  • Posts: 188
    • View Profile
    • http://www.lostinn.com/ayrin
Re: Question: How to enable the "Attack-Alert on Minimap" ?
« Reply #34 on: 7 January 2009, 23:32:21 »
For lare i think would be nice to use a animated gif or something similar coz sonar is really used in a lot of games and maybe in a fantasy mod will not be appropriate, maybe a red smoke or 2 crossed swords, into futuristic mods sonar really fit good