Jump to content


Photo

Concept Art / Fan Art


  • Please log in to reply
521 replies to this topic

#351 kafros

kafros

    Creative Text Department

  • Xenocide Creative-Text Departmen
  • 1,800 posts

Posted 22 October 2009 - 12:21 AM

@gu35s:
IIIIiii liiiiiiiikkeeee.... IIIIiiii liiiikkeeee :Drool:

Somehow I'm fairly sure the last set will ROCK!!! ^_^ ^_^ ^_^ Can't wait to check it in-game! And thanks for the flash previews :D

@Zero Energy:
It was never programmed in C (UFO: AI does). There's a C++/Python branch, and the current C# branch.

Edited by kafros, 22 October 2009 - 12:22 AM.


#352 Mad

Mad

    Creative Text Department

  • [Xenocide Senior Members]
  • 1,958 posts

Posted 22 October 2009 - 02:45 AM

Looks nice. Here's a build with the new set of icons (it's without sound to save bandwidth).
Keep smiling while dying

Of course I have gone mad with power! It would be completely ridiculous to go mad without power!
And no, this is not a quote from the Simpson's movie, I want it on paper, that I actually wrote that quite some time before the movie came out.

Posted Image

#353 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 22 October 2009 - 09:15 AM

after trying out all the builds, the last one (above post) seems like best. though I have to say the icons are simply too big for me. especially with the rotation. can I see the code used to make the icons including the rollover animation? It just doesn't sit right with me that the animation start suddenly and revert immediately to start position without transition. I have a few ideas to fix this but I am not sure which would work better.

1. the animation will always rotate until roll over and the rotation stop in it's track. no revert to original point.
2. the ring does not show at all and when rollover, the ring will fade in or zoom out from center with animation. then fade out or zoom into the center.
3. make a separate set for rollover so animation remains but when rollover, the neon lit up. that was supposed to be for the neon (not new neon) build but it ended up spinning instead. though now I know those icons don't work at all.

what concerns me though is the icon seems to not show up quite well in the night with all the white lights. is it possible to dim those white to duller gray? (yes, the geoscape map.)

also, as I tried each builds, the icon representing xcorps base on the other side of the globe does not work very well for me. the terror site and ufo sightings are fine. I would revert the base icon to pastel build where the base icon is more obvious.

It seems though that all the icons I made seems to be out of place comparing to the sidebar and globe. maybe I should make a more uniform look. maybe when icons are rolled over it would be a uniform neon square. it would also be less distracting that way.

next set of icon i would make smaller. I will still place them on 32x32 px grids but the icons themselves have to be smaller.

sudden idea: is it possible to when the icon is rolled over, the blue frame show up and then a L line or something like that appear underneath pointing to a hover text? that would make it look much better I would think. And I also think the arrow pointer icon need to be change with better looking and MUCH smaller one. it's way too big right now.

Edited by gu35s, 22 October 2009 - 09:15 AM.

====================

Gu35sing is a big part of life...

====================

#354 Zero Energy

Zero Energy

    Squaddie

  • Xenocide Recruit
  • 1 posts

Posted 22 October 2009 - 09:15 AM

@Zero Energy:
It was never programmed in C (UFO: AI does). There's a C++/Python branch, and the current C# branch.


Oops my bad well if anything is ever need programming in C give me a call in about 4 months after high school and college let out.
That is when I have the time to read these 10, 4 inch thick books on how to program in C. :)
"Burning propose. Etched forever in the mind as slow curves pulled upward into spikes.
Dark wings framing an almost human death skull. Almost, but for the fangs of the beast.
A creast for killers. Find it and you find the chalice, and the dark wing. Only five years remain."

#355 dteviot

dteviot

    Programming Department

  • [Xenocide Senior Members]
  • 1,479 posts

Posted 22 October 2009 - 11:59 AM

Is Xenocide still being programed in C?

No. Currently C# is being used. Before that, it was C++ and Python. I'm not aware of C ever being used. Why did you want to know?
Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.

#356 dteviot

dteviot

    Programming Department

  • [Xenocide Senior Members]
  • 1,479 posts

Posted 22 October 2009 - 12:25 PM

neon rotating icons

Posted Image

Preview


hustling back to work. i don't think i like my icons.. have to make better ones.

thanks for the builds. will try them later when I get back.

I think I wasn't very clear about the animated images. What I meant was that if we have a set of static images, we can play them in sequence so that they appear animated. (That said, rotating a single static image isn't a problem for us.)
Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.

#357 dteviot

dteviot

    Programming Department

  • [Xenocide Senior Members]
  • 1,479 posts

Posted 22 October 2009 - 12:33 PM

Also gentlemen, a small tip when doing sprite sheets.
It's important to make sure there's a one pixel margin around each icon.
e.g. if your icons are 32x32, then the icons should be 30 x 30 pixels, with the topmost and bottommost rows and leftmost and rightmost columns left empty and transparent.
Otherwise you get bleedthrough at the edges between sprites because the texture sampler looks one pixel beyond the requested limit.
http://forums.xna.co...317/235519.aspx
Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.

#358 PezzA

PezzA

    Squaddie

  • Xenocide Programming Department
  • 5 posts

Posted 22 October 2009 - 01:05 PM

Hi gu35s, totally loving that last set of icons.

after trying out all the builds, the last one (above post) seems like best. though I have to say the icons are simply too big for me. especially with the rotation. can I see the code used to make the icons including the rollover animation? It just doesn't sit right with me that the animation start suddenly and revert immediately to start position without transition. I have a few ideas to fix this but I am not sure which would work better.


1. the animation will always rotate until roll over and the rotation stop in it's track. no revert to original point.
2. the ring does not show at all and when rollover, the ring will fade in or zoom out from center with animation. then fade out or zoom into the center.

Totally agree with you on this. I'm seeing about making sure that the icons either retain their final angle or rotate back the 0.0f.

3. make a separate set for rollover so animation remains but when rollover, the neon lit up. that was supposed to be for the neon (not new neon) build but it ended up spinning instead. though now I know those icons don't work at all.

I think all the icons rotating all the time might be a bit much for people to fully comprehend!

also, as I tried each builds, the icon representing xcorps base on the other side of the globe does not work very well for me. the terror site and ufo sightings are fine. I would revert the base icon to pastel build where the base icon is more obvious.

Can you make icon 15 in the spitemap a white diamond shape. I can then colourise that to represent the individual blips(and use brighter colours). Was the occlusion working ok for you this time?

It seems though that all the icons I made seems to be out of place comparing to the sidebar and globe. maybe I should make a more uniform look. maybe when icons are rolled over it would be a uniform neon square. it would also be less distracting that way.

tbh, i really like the style of what you have going. I thought the terror icon in particular was spot on aesthetically and keeping with the games overall 'retro' canon. I think the CeGui interface is nice and functional, but it far too monotone for my liking. I thought what you produced was bringing some much needed colour back to the UI.

sudden idea: is it possible to when the icon is rolled over, the blue frame show up and then a L line or something like that appear underneath pointing to a hover text? that would make it look much better I would think.

Callouts FTW! It can point to the hover text underneath the time buttons (which i think be a more graphical display of whatever is being rolled over)

#359 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 22 October 2009 - 07:39 PM

post #356

i understood actually. those icons were not the animated ones except for coded rotation by PezzA.

post #357

right. thx. will do a new one with that in mind.

PezzA: Can I see the code you used to rotate the outer ring? and the code to put them together in the first place. Maybe I can help.

The callout pointing toward the sidebar is not a very good idea. Imagine it. sometime it would be long if the button is on the left side of the screen, and sometime it would be short. I don't think it'd look good. but if say [ ] (rotated 90degree) appear as you roll over then a line appear below it pointing to hover text, it'd look a bit better. better yet if it can be drawn per milisecond. I ll make up a flash to show you what I mean but I am not sure if it can be done in C#.


edit: here's a preview of the animation and mouse icon i mentioned above.

Edited by gu35s, 23 October 2009 - 12:01 AM.

====================

Gu35sing is a big part of life...

====================

#360 Mad

Mad

    Creative Text Department

  • [Xenocide Senior Members]
  • 1,958 posts

Posted 23 October 2009 - 01:28 AM

I'm sorry, but I don't think permanently rotating icons is the way to go. It's just too much. This'll look like a carnival otherwise. But as usual I'm open for discussion on that.
Keep smiling while dying

Of course I have gone mad with power! It would be completely ridiculous to go mad without power!
And no, this is not a quote from the Simpson's movie, I want it on paper, that I actually wrote that quite some time before the movie came out.

Posted Image

#361 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 23 October 2009 - 01:56 AM

ya u r right. i can see that with multiple icons on the globe it'd be quite distracting. lemme see if i can come up with else. i would say the icon should not rotate at all anymore though. i just had an idea of how to make the selection appealing. i ll go make a preview and see if y'all agree. but first, would that callout be doable in c#?

I can write it in code but that'd be flash code. I have no idea how the code is written in c#.
====================

Gu35sing is a big part of life...

====================

#362 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 23 October 2009 - 04:41 AM

the idea i had above. not as good as i thought but since i made it. here you go.
====================

Gu35sing is a big part of life...

====================

#363 PezzA

PezzA

    Squaddie

  • Xenocide Programming Department
  • 5 posts

Posted 23 October 2009 - 06:28 AM

the idea i had above. not as good as i thought but since i made it. here you go.

The callout animations are totally do-able, (and a great idea). The only thing I'm unsure of at the moment is how to save the state of the animations between calls to the Geoscape (which happens 60 times a second). I mean, i can store the state no problem, i'm just checking how best to do it in the current codeset.

Once that's covered rendering the animations should be a (relatively) simple exercise. I'm at work at the moment so dont have access to the code to show what we have so far, but if you check the patch files posted in the other thread you should be able to open it to have a look.

#364 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 23 October 2009 - 07:47 AM

i have zero knowledge of c# and I have no idea how to look at the patch file. i ll try opening it in as many programs I could think of. i think there are some third party software that can open the .cs file, maybe those would work.
====================

Gu35sing is a big part of life...

====================

#365 kafros

kafros

    Creative Text Department

  • Xenocide Creative-Text Departmen
  • 1,800 posts

Posted 23 October 2009 - 07:56 AM

They are simple text files. Any text editor (notepad included :P) is enough.

The animation idea is nice, unfortunately it doesn't look very good in NIGHT conditions. I'm not good at color theory to propose a fix though :(

(The earth/night cycle used in the latest animation was very helpful!!! please use it in your next previews! Good job :))

Edited by kafros, 23 October 2009 - 07:58 AM.


#366 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 23 October 2009 - 08:21 AM

thx. yea i was wondering how it would look on both so i tried it out that way. seems quite informative so i just put it up.

anyway, i opened up the .patch file. figured if it's a simple thing then pspad should be able to open it and it did.

i read the code. quite baffled really since i dont quite get c#. Am I to understand that the code will be read as per FPS? in that case why is there only 1 set angle being used by every icon? also is it not possible to say if I mouseover, run this function over and over again, or on mouseout, run the other function?

in actionscript i would have written it this way, though I am not sure how this would translate to C#
[codebox]// Setting up rollover function (which i like to short to rover)
function rover(){
// rotating the movieclip / object (if the 0,0 is center else some other calculation will be needed for x,y position)
// "this" is to tell whatever object reading it to call on itself.
this._rotation += 1;
};
// Setting up rollout function (rout)
function rout(){
// Precautionary, just in case if the object were storing the _rotation to more than or equal to 360
if (this._rotation >= 360){
for (var rot:Number = this._rotation; rot >= 360; rot -= 360){
this._rotation = rot;
}
}
// rotating the movieclip till it reach a certain point before stopping
if (this._rotation != 0){
this._rotation += 1;
} else {
// stop reading this function
delete this.onEnterFrame;
}
};
/// Icons
// basically when action is done to the object, tell the object to read the function repetitively by FPS
someIcon.onRollOver = function() {
this.onEnterFrame = rover;
}
someIcon.onRollOut = function() {
this.onEnterFrame = rout;
}[/codebox]

there is better way to write the code above of course but this is a quick and dirty that should work. AS2 by the way, not AS3. I like AS2 better.

Edited by gu35s, 23 October 2009 - 07:20 PM.

====================

Gu35sing is a big part of life...

====================

#367 PezzA

PezzA

    Squaddie

  • Xenocide Programming Department
  • 5 posts

Posted 23 October 2009 - 09:47 AM

Hi gu35s,

At the moment there is only a single rotation angle for all icons as i haven't figured out where/how to store the current angle per icon between frame refreshes.

I'm thinking of adding an IconState Interface that all geo objects can inherit from, which can remember how the icon last looked on a frame, and update it appropriatly on the next frame, taking into account keyboard and mouse state. But that would be adding UI state into game state code, which would work, but wouldn't be very 'elegant'.

#368 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 23 October 2009 - 10:58 AM

huh. if I understand the code then the rotAngle within Begin seems to be constantly counter spinning which I deduced would be the globe spinning (could be wrong). I also see something = value; but I can't seem to find where "value" comes from. also the RotationAngle seems to not have a caller. just a public float. I do not understand any of this. though I can't say I am a good programmer to start with.

anyway I am not sure how it works in C# but is it possible to create an object or array to store each rotation? Say an array of (0,2,4,5,6,10,20) and have the icons to read it's respective array (since I see that each one seems to be called again an again and float angle = 0 seems constant to all icon creation) and set the angle accordingly then add a rotation and write the respective array with the new number so the next time the icon refresh, it would be in the new position? As the icon refresh it first checks for hover. If hover, then read the rotation array and add rotation as mentioned. Or if not hover, then check if the rotation array if it's 0. if not then keep rotating till it reaches 0 and stop.

I m getting confused by my own reasoning... It'd be so much easier if I understand C#.

it could look something like this: (not sure I m doing this right so...)

[codebox]...

+ // No idea where this is suppose to sit but I m guessing right under declaring rotAngle should work...
+ ArrayList iconRot = new ArrayList;
+ for (int i = 0; i < 7; i++)
+ {
+ float a = 0.0f;
+ iconRot.Add(a);
+ }

...

+ public void DrawAlienBase(GraphicsDevice device, AlienSite ufoBase, BasicEffect basicEffect, GameTime gameTime, float distanceToStablePos)
+ {
+ Vector2 screenPos = Get2DProjection(ufoBase, device, basicEffect);
+ float angle = 0.0f;
+ if (distanceToStablePos < OCCLUDEDISTANCE)
+ {
+ if (Hovering(screenPos))
+ {
+ angle = iconRot[0]; // Assuming 0 is for AlienBase
+ PlayMouseOver(ufoBase.Name);
+ TempSelectedItem = ufoBase.Name;
+ tipText = ufoBase.Name;
+ angle += 0.05f;
+ iconRot[0] = angle;
+ }
+ else
+ {
+ angle = iconRot[0];
+ if (angle != 0.0f){
+ // do animated tooltip closing
+ angle += 0.05f;
+ iconRot[0] = angle;
+ }
+ }
+
+ DrawIcon(hudIcons.AlienBaseInner, hudIcons.AlienBAseOuter, screenPos, angle);
+ }
...[/codebox]

would that work?

Edited by gu35s, 23 October 2009 - 07:20 PM.

====================

Gu35sing is a big part of life...

====================

#369 PezzA

PezzA

    Squaddie

  • Xenocide Programming Department
  • 5 posts

Posted 23 October 2009 - 02:48 PM

Still learning XNA myself! i forgot that it only does the initialize once and then keeps the class alive for the life of the geoscape screen.

What i do now is keep a list of all icons in the screen, and for each retain it's state.

An instance of the following class is kept per object, this is used to keep the current rotation, and scale. It also has a method to move update it's position.
[codebox] public class IconState
{
// called to update the state of the current icon based on screen input
public void Next(bool blnRover)
{
// if hovered and not at full scale, increment scale
if (blnRover &&
Scale < 1.0f)
scale += 0.10f;

// if not hovered and not at minimum scale, decrement scale
if (!blnRover &&
Scale > 0.0f)
scale -= 0.05f;

//update rotation
rotation -= 0.05f;

//reset
if (rotation == -360.0f)
rotation = 0.0f;
}

#region Fields
/// <summary>
/// Icon current rotation
/// </summary>
float rotation = 0.0f;
public float Rotation
{
get { return rotation; }
}

/// <summary>
/// Icon current scale
/// </summary>
float scale = 0.0f;
public float Scale
{
get { return scale; }
}
#endregion
}[/codebox]

And the icon draw methods looks like this
[codebox] /// <summary>
/// Draws an xcorp base
/// </summary>
/// <param name="device"></param>
/// <param name="outpost"></param>
/// <param name="basicEffect"></param>
/// <param name="gameTime"></param>
/// <param name="StaticPosition"></param>
public void DrawOutpostIcon(GraphicsDevice device, Outpost outpost, BasicEffect basicEffect, GameTime gameTime, float StaticPosition)
{
Vector2 screenPos = Get2DProjection(outpost, device, basicEffect);

IconState myIcon = GetIconState(outpost.Name);
bool blnHovering = Hovering(screenPos);
bool blnOcclude = StaticPosition >= OCCLUDEDISTANCE;

if (!blnOcclude)
{
if (blnHovering)
{
PlayMouseOver(outpost.Name);
TempSelectedItem = outpost.Name;
}

myIcon.Next(blnHovering);
DrawIcon(hudIcons.XcomBaseInner, hudIcons.XcomBaseOuter, screenPos, myIcon);
}
else
{
CreateBlip(screenPos, Color.DarkBlue);
}
}[/codebox]

This produces an effect similar to your last SWF where the outer ring of the icon scales out and rotates on mouse over. I just need to add the text rendering and then I'll submit a patch.

#370 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 23 October 2009 - 07:22 PM

no idea what you said. brain not warm up to day yet. good you have things working.

now i go coffee i do icons again. you do code. my head hurts.
====================

Gu35sing is a big part of life...

====================

#371 PezzA

PezzA

    Squaddie

  • Xenocide Programming Department
  • 5 posts

Posted 24 October 2009 - 03:17 PM

no idea what you said. brain not warm up to day yet. good you have things working.

now i go coffee i do icons again. you do code. my head hurts.

Coffee FTW!

I've attached a patch that includes the fly out text when hovering over an object.
Attached File  TextCallOut.jpg   60.99K   28 downloads
The sprite sheet being used will need the '?' shape adding so that i can draw that. It can go in one of the free slots (15 or 16).

If you want to have them all using the same outer spinney sprite, add that in all the outer sprite sections, that way we can still have separate outers if we need them. I think it should at least be one colour for friendly targets, and another for hostile targets.

Here is the patch attachment. Mad, can you do the honours with the build?

Attached File  TextCallOut.zip   6.9K   6 downloads
(again, no project file, you'll need to add spritemap.cs, geohud.cs and iconspritemap.png)

Edited by PezzA, 24 October 2009 - 03:18 PM.


#372 dteviot

dteviot

    Programming Department

  • [Xenocide Senior Members]
  • 1,479 posts

Posted 24 October 2009 - 10:35 PM

Was going to check in the GeoHud 3, but there were a couple of issues.
1. I don't have a matching IconSpriteMap to go with it.
2. The various DrawXXXXIcon() functions in GeoHud.cs still have a lot of replicated code.
3. Please use spaces for indentation, not tabs.
4. Get2DProjection<T>(T geoObject, GraphicsDevice device, BasicEffect effect) where T : IGeoPosition
should be
Get2DProjection(IGeoPosition geoObject, GraphicsDevice device, BasicEffect effect)
Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.

#373 dteviot

dteviot

    Programming Department

  • [Xenocide Senior Members]
  • 1,479 posts

Posted 24 October 2009 - 10:39 PM

Oh, and this won't work properly either
if (rotation == -360.0f)
rotation = 0.0f;

try
if (rotation <= -360.0f)
rotation += 360.0f;
Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.

#374 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 24 October 2009 - 11:07 PM

PezzA, I think the hover text that your geohud had, the one without background, just glowing blue text, looks better than what i had with the background. I was just testing it out and I did say 'not as good as i thought'.
====================

Gu35sing is a big part of life...

====================

#375 PezzA

PezzA

    Squaddie

  • Xenocide Programming Department
  • 5 posts

Posted 25 October 2009 - 04:14 AM

Was going to check in the GeoHud 3, but there were a couple of issues.
1. I don't have a matching IconSpriteMap to go with it.
2. The various DrawXXXXIcon() functions in GeoHud.cs still have a lot of replicated code.
3. Please use spaces for indentation, not tabs.
4. Get2DProjection<T>(T geoObject, GraphicsDevice device, BasicEffect effect) where T : IGeoPosition
should be
Get2DProjection(IGeoPosition geoObject, GraphicsDevice device, BasicEffect effect)


Hi, 2 and 4 are sorted in the patch in my previous post (in this thread), I'll update the code to spaces and create another patch.

#376 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 26 October 2009 - 02:14 AM

ok. let's get back to "art".

I retry some of the icons. look here.

I think the xcorps base is much better now and see if you like other changes i made.

p.s. I do think the night scape needs to be changed from the current one. it's too different from the daytime that it's hard to make icons that could survive in both side. I think the screenshots in gallery looks better with shaded terrain instead of crazy city lights.

Edited by gu35s, 26 October 2009 - 02:17 AM.

====================

Gu35sing is a big part of life...

====================

#377 Mad

Mad

    Creative Text Department

  • [Xenocide Senior Members]
  • 1,958 posts

Posted 26 October 2009 - 06:51 AM

Here's the new build. (Sorry for the delay, I was visiting my in-laws over the weekend.)
A few comments:
- there is a bleedthrough on the right side of the yellow interceptor icon (possibly due to missing space - as dteviot indicated previously)
- the font of the called text box is pretty pixelated, otherwise this looks very nice
- as a tribute to UFO gamers, it would be a good idea to replace the green "UFO crashed" icon with another color, (maybe even red, and just change the icon?) since green icons indicated landed UFO's in the good old days
- I don't think there is a problem with the icons on the night side - they look quite well over the illuminated night sky. Plus, I would really prefer to keep the illuminated map as it is - it's just more realistic this way.

Gu35s, could you do a spritesheet / png of the new icons - they look really nice (with the small comment regarding crashed UFOs - btw., I'm not sure right now, is there an icon for a landed UFO?)
PezzA: would it be difficult to implement it just like in the flash animation done by gu35s?

Edited by Mad, 26 October 2009 - 06:56 AM.

Keep smiling while dying

Of course I have gone mad with power! It would be completely ridiculous to go mad without power!
And no, this is not a quote from the Simpson's movie, I want it on paper, that I actually wrote that quite some time before the movie came out.

Posted Image

#378 PezzA

PezzA

    Squaddie

  • Xenocide Programming Department
  • 5 posts

Posted 26 October 2009 - 02:45 PM

Here's the new build. (Sorry for the delay, I was visiting my in-laws over the weekend.)
A few comments:
- there is a bleedthrough on the right side of the yellow interceptor icon (possibly due to missing space - as dteviot indicated previously)
- the font of the called text box is pretty pixelated, otherwise this looks very nice
- as a tribute to UFO gamers, it would be a good idea to replace the green "UFO crashed" icon with another color, (maybe even red, and just change the icon?) since green icons indicated landed UFO's in the good old days
- I don't think there is a problem with the icons on the night side - they look quite well over the illuminated night sky. Plus, I would really prefer to keep the illuminated map as it is - it's just more realistic this way.

Gu35s, could you do a spritesheet / png of the new icons - they look really nice (with the small comment regarding crashed UFOs - btw., I'm not sure right now, is there an icon for a landed UFO?)
PezzA: would it be difficult to implement it just like in the flash animation done by gu35s?


Updated patch attached. This fixes:
- Fuzzy/Pixelated text.
- dteviot's comments
- Icon text wont wrap off the right hand side of the screen.

I'll put the patches into this thread until were all happy with this cut of the icon code, then I'll post over in the submissions thread.

gu35s: To complete to the point of last flash (which is looking better every time!), the outer icons will need adding to the iconSpriteMap , this might need both free slots . The transparent full circle drawn with no alpha channel in one, and the two arc's with no alpha channel in another. I'll then draw these on top of each other to create the same effect. I'm not sure what will happen if they both are drawn with the same opacity.

Could you also add another line to the sprite map with a few frames of animation for the text background?

Cheers!

Attached File  NoFuzz.zip   7.83K   10 downloads

#379 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 26 October 2009 - 07:53 PM

I don't know how to make a font spritemap since I can't even see it nor open it, but the font I used in the previews can be found here. It's free too.

I don't see the need of adding a secondary outer icons. The png can hold alpha so I'll just make it as it is and you should be able to just plug it in and rotate as you did the usual outer ring. the only difference is you will need to put it a layer under the inner icon and do both scaling and rotating animation. it doesn't even need to have an alpha play. just make it that if it's under a certain point, say 30% max scale, turn visibility off. or alpha = 0, or something. Or maybe you don't even have to if you can lower the scale down to 0.1%. Here's a quick formula for easing if you haven't know how.

scale += (targetScale - scale) / 2;
just one formula and you can use for expanding or contracting the outer ring. Though it would be better if there is a way to round the the equation since the increment would then make it to the targetScale instead of being halved all the time. Another way is to use if statement and round it manually. I assume from looking at the patch codes that maximum scale is 1.0 instead of 100 so it could look like [[ if (scale < 0.02) scale = 0.0; else if (scale > 0.98) scale = 1.0; ]] or something like that.

As for the text background though, I did mine in relation to the text width. So the less amount of text, the larger it gets and vice versa. and since Flash uses vector to draw it, it did not have any problem stretching the box. but to do it in sprites would not be advisable but i ll see what i can do. Also, for the text background animation, it was randomly animated. I just tell Flash to make a random number up to 10 and if the number is higher than 9.5, animate. If it's possible in C#, that'd be great. Which can also means that you can have a bunch of frames with different lighted lines and randomly select one for the flickering effect.

i ll do the artwork later. i have some stuff due so i better get back to work first.

Edited by gu35s, 26 October 2009 - 07:53 PM.

====================

Gu35sing is a big part of life...

====================

#380 Mad

Mad

    Creative Text Department

  • [Xenocide Senior Members]
  • 1,958 posts

Posted 27 October 2009 - 01:50 AM

Updated patch attached. This fixes:
- Fuzzy/Pixelated text.
- dteviot's comments
- Icon text wont wrap off the right hand side of the screen.

I'll put the patches into this thread until were all happy with this cut of the icon code, then I'll post over in the submissions thread.


Here's a new build. We might have to work on the fontsize, on my PC it is a little bit difficult to read, but maybe that would change when running it in full-screen, but I'm not quite sure how to make it non-windowed (plus we'd probably need resolution management to do that properly).
Keep smiling while dying

Of course I have gone mad with power! It would be completely ridiculous to go mad without power!
And no, this is not a quote from the Simpson's movie, I want it on paper, that I actually wrote that quite some time before the movie came out.

Posted Image

#381 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 27 October 2009 - 03:02 AM

vell, i m gonna have to try on the new builds. but i have to say the screenshot of yellow hover text did not seem appealing to me and very off from the overall color palate. in any case, i think the font i used is better. anyway here's the new icons with changes.

Posted Image
left to right: base, alien base, terror site, craft, ufo (fly), ufo (land), ufo (crash), selection (outer ring). Then followed by first frame of hover text background and animated series behind.

i edited the ufo icons to as Mad suggested.

and here is a XenoNew.png with new mouse icon

Posted Image
====================

Gu35sing is a big part of life...

====================

#382 Mad

Mad

    Creative Text Department

  • [Xenocide Senior Members]
  • 1,958 posts

Posted 27 October 2009 - 03:12 AM

Well done gu35s! The new UI look very nice! I can't wait to see the new icons implemented (I'll post a new build (including the new UI) once they are).
Keep smiling while dying

Of course I have gone mad with power! It would be completely ridiculous to go mad without power!
And no, this is not a quote from the Simpson's movie, I want it on paper, that I actually wrote that quite some time before the movie came out.

Posted Image

#383 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 27 October 2009 - 03:46 AM

uh. thx. i didn't do anything to the UI other than editing the new mouse icon in. the buttons are also from previous editing. there are still lots of things i would like to change, I just have no idea how. like how do i add in new buttons so the time buttons (stop, 5min and all that) has a different look. and with that i would also change the pop up window buttons to something that is more center oriented rather than like the sidebar. it just looked wrong on a lot of places.

Edited by gu35s, 27 October 2009 - 03:47 AM.

====================

Gu35sing is a big part of life...

====================

#384 Mad

Mad

    Creative Text Department

  • [Xenocide Senior Members]
  • 1,958 posts

Posted 27 October 2009 - 04:38 AM

uh. thx. i didn't do anything to the UI other than editing the new mouse icon in. the buttons are also from previous editing. there are still lots of things i would like to change, I just have no idea how. like how do i add in new buttons so the time buttons (stop, 5min and all that) has a different look. and with that i would also change the pop up window buttons to something that is more center oriented rather than like the sidebar. it just looked wrong on a lot of places.

Yea, there are also a lot of problems in the submenus (Research, Statistics etc) like text too long for the buttons etc. but as far as i can tell, there is nothing you can do about this: this is something that has tto be done by PRG. I'm not sure if you can, but if you can, you might want to have a look at these threads: http://www.xcomufo.c...topic=242028438 , http://www.xcomufo.c...h...2&hl=window and especially http://www.xcomufo.c...h...0&hl=window

As for my comment on the UI: I hadn't seen the new UI design in action (only on the spritesheet), so I was quite impressed with the overall design, and the mouse cursor fitted in very nicely.

Oh, and I wanted to again express my concern about the razor sharp day-night border. It used to be very nice before we switched from XNA 1.0 to 3.0... (For (very old) running demo look here or here for a picture) Maybe someone could have a look, since we are already working on the visuals....

Edited by Mad, 27 October 2009 - 04:56 AM.

Keep smiling while dying

Of course I have gone mad with power! It would be completely ridiculous to go mad without power!
And no, this is not a quote from the Simpson's movie, I want it on paper, that I actually wrote that quite some time before the movie came out.

Posted Image

#385 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 27 October 2009 - 07:41 AM

I just tested the latest nightly builds and realized the text actually came out nicely. I like it. I still feel the text being yellow is odd though. it doesn't fit the rest of the theme. And if possible, change the font to something else. Other than that, I like how it appear. And I just realize how great those spinning outer rings looked when personalized to each icon. Maybe I would return to that. First let's see how the new icons hold up.

As for the UI though, I much prefer the one I put up last. The mouse icon is much better and I just remembered that I also darken the pop up windows background tint. The current default is way too light and I can hardly read the text on it.

Mad: I don't think I can do anything about changing the other UI buttons which is somewhat frustrating. I tried it on my end by editing the png and imagset files but it gave me many errors. In the end I just edit what can be done without editing the imageset file.

PezzA: Good job. I like how the text are appearing and maybe the new animated background could hold up to stretch that way after all, but I would suggest taking away the _ at the end of the line when the text are appearing. The way I made the text appear in the Flash preview is a bit different. It is a bit more fluid because I used the same formula as the scaling formula. It would have shown half of the text as you hovered and quickly show the rest of the contents. I think your way works as well but shorten the time. Some impatient players, like me, would like to read it as soon as possible but still have nice animation instead of appearing out of nowhere.
====================

Gu35sing is a big part of life...

====================

#386 PezzA

PezzA

    Squaddie

  • Xenocide Programming Department
  • 5 posts

Posted 27 October 2009 - 05:06 PM

Latest patch is attached!

This uses the latest icon set, includes the animated background for the text areas, speeds up the display of the callout text (to almost 88mph!), and also graduates the night/day border (there is a gap between dusk and the lights going on, until I understand this better, this was the closet I could get, I understand the jist of what going on in the shader file, but some of the syntax is new to me).

The only problem with the sprites for the background is that these also scale the transparent pixel on either side, which when scaled up to long string of text can be a 7-10 pixels blank on either side. For these, can we try them with no transparent borders and let them line up wall to wall? See below for an example...
Attached File  Latest.jpg   58.43K   24 downloads

I think were inching closer with this!

patch:
Attached File  GeoHudwithGlobe.zip   8.95K   7 downloads

#387 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 27 October 2009 - 06:11 PM

i like. can't wait to see them in action.

edit: here's one with no border text background.

Posted Image

Edited by gu35s, 28 October 2009 - 12:57 AM.

====================

Gu35sing is a big part of life...

====================

#388 Mad

Mad

    Creative Text Department

  • [Xenocide Senior Members]
  • 1,958 posts

Posted 28 October 2009 - 01:34 AM

Very nice! Here's the build!

A few things I noticed:

PezzA:
Nice work with the soft day/night border. But did you turn the lights down a bit? I seems to be not as much light on the day side than it used to be. Another thing: The shadows of the night used to use the heightmap to kreep in the valleys first and let the mountains still bathed in sunlight. Do you think this would be possible to have again?

Gu35s:
Nice job with the icons, but I think the background animation could be a bit stronger, it is barely noticeable (at least on my PC). Very nice animation with the blue ring around every icon, I like that very much, this is a keeper.
One more thing that trouble me are the buttons in some of the windows. For example the "UFO Detected" pop-up: 1) if you klick on the UFO but have it where the cancel button of the pop-up will be, the window closes the instant it is opened. 2) There is a problem with the font on some of the windows (again, best seen in "UFO detected"), where you can't read the button text once the button is pressed, and where you barely can see the outlines of the button itself.

I think the animation of the call-up text could be a little bit slower (maybe around 50mph? :) ), but that is only me, I know gu35s thought it was too slow :)

Very nice job you two!
Keep smiling while dying

Of course I have gone mad with power! It would be completely ridiculous to go mad without power!
And no, this is not a quote from the Simpson's movie, I want it on paper, that I actually wrote that quite some time before the movie came out.

Posted Image

#389 kafros

kafros

    Creative Text Department

  • Xenocide Creative-Text Departmen
  • 1,800 posts

Posted 28 October 2009 - 06:39 AM

88mph, hihihihi!

Personally, I totally like the animation! Very nice job friends :D. I don't think it should be changed, it's fast enough and bold enough. Could it be customised in the options menu? (todo for the "far" future).

Concerning the day/night border, I can see a black line/gradient which separates the two parts of the globe. Both are lighter than that line, and the day part is clearly darker than before. If you could look into the light shader, it would be very cool :).

Now, a small issue: As it was posted on the feedback thread, I see that sometimes the game progresses slower than it should, or even freezes for a small time (except from the mouse). I think that it happens more frequently when crafts are flying. Have you noticed anything similar?

Edited by kafros, 28 October 2009 - 06:40 AM.


#390 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 28 October 2009 - 08:03 AM

yes, i felt that way too. sometimes when i click for time elapse, it takes a few seconds before the clock starts again. I have clicked on 1 min a few times and thought that PezzA had accidentally turn 1 min to stop but when I was about to click something else the clock started. I have no idea what happened.

Good work, PezzA. I like the latest build. But as Mad said, now the hover text appear too fast. Sorry about nitpicking. I also felt the daylight is shorter and darker than before. But the font didn't pixelate on my screen. Then again I have pretty small screen. I do like the how the font looks now though. I just have to edit the background so the animation is a little more obvious.

A few things I think can be better, just an opinion, are:

1. the outer ring appear faster than disappearing. It could be because the outer ring is set above the inner icons. If you flip it so the outer rings are under the icons, it may look better.

2. yes, i think the button outline is barely seen in the pop-up windows. I'll try to do some more editing on that front. maybe even use the original skin texture instead of the plain one I have.

3. this is something I can't fix but yes if the mouse click is right on top of OK or Cancel button when clicking on an icon it will automatically select that option. I think the way to avoid that is instead of click and pop open a window, it should be click-release then pop up a window because the buttons are detected at release and icons are detected at clicking. (I think)

4. the Base mini icon when it's on the other side of the globe should be more visible. maybe lighter blue or cyan instead of black/dark blue that it is now.

5. I think the base / alien base / terror site icons might be too big where all others are the right size. I will edit this if someone else also have the same opinion.

6. Make the day time lighter, but if it effects the night time then forget it. I like the night time as it is now.

Edited by gu35s, 28 October 2009 - 08:07 AM.

====================

Gu35sing is a big part of life...

====================

#391 Mad

Mad

    Creative Text Department

  • [Xenocide Senior Members]
  • 1,958 posts

Posted 28 October 2009 - 08:43 AM

88mph, hihihihi!

Haha, I really didn't get this. :D

As for the freezing: yes, I noticed the same thing. And as gu35s mentioned, it happens both, when you start a faster advancement of time, and in between without interaction. I can't say though that I had the feeling it would appear more frequent when UFOs were around. I don't think this behavior was seen in the 1835 (XNA1) build, but I can't confirm it, since this build won't run on my PC anymore (I assume it's the missing XNA 1.0 RF FW, the 3.0 doesn't seem to be downwards compatible).

Edit: I did a test (on my spouse's computer, don't tell her ;) ) and yes, the 1835 build worked flawlessly (and integrated the shading on the globe nicely, check it out:
Attached File  Xenocide_globe1.jpg   69.38K   27 downloads, Attached File  Xenocide_globe2.jpg   116.61K   29 downloads.
I can only urge everyone who's not seen it, or does not remember anymore to check out this build. This is (more or less) where we want to go again (shading- and dialog-wise).

Plus, I'll have to agree with gu35s: although the AB and TS icons don't seem to be bigger on the second glance, the surely are on the first, and maybe also on the third. :)
And the Base Icon really has to lighten up when it's on the far side (pun intended).

Edited by Mad, 28 October 2009 - 09:07 AM.

Keep smiling while dying

Of course I have gone mad with power! It would be completely ridiculous to go mad without power!
And no, this is not a quote from the Simpson's movie, I want it on paper, that I actually wrote that quite some time before the movie came out.

Posted Image

#392 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 28 October 2009 - 09:05 AM

I noticed it slowed down to a freeze at around the time a UFO is suppose to appear. I load it a few times and at the time a UFO is suppose to appear whether detected or not, it would froze the timer for a moment. Again when advancement of time when there are UFO or Crafts on the screen, though these would probably because of caching or something.

Anyway, here's the new XenoNew.png that should work better.

Yep, I return to the original button skin. It is more obvious, but not enough so add in a bit more effect to make it more obvious. However, why is the button in the pop up window set right at the corner?


Edit: I just saw Mad's attached pic. Those are great mountains.

Edited by gu35s, 28 October 2009 - 09:08 AM.

====================

Gu35sing is a big part of life...

====================

#393 Mad

Mad

    Creative Text Department

  • [Xenocide Senior Members]
  • 1,958 posts

Posted 28 October 2009 - 09:12 AM

Yep, I return to the original button skin. It is more obvious, but not enough so add in a bit more effect to make it more obvious. However, why is the button in the pop up window set right at the corner?

I just tried it out, it works better, thanks, but still the issue with the disappearing button texts at mouse-over stays.
Keep smiling while dying

Of course I have gone mad with power! It would be completely ridiculous to go mad without power!
And no, this is not a quote from the Simpson's movie, I want it on paper, that I actually wrote that quite some time before the movie came out.

Posted Image

#394 gu35s

gu35s

    Sergeant

  • Forum Members
  • PipPipPip
  • 17 posts

Posted 28 October 2009 - 09:37 AM

yeah, me too. that would not be my department. i don't even know where to look for that. i ll look over PezzA's patch and see if I can find something that can fix that problem.
====================

Gu35sing is a big part of life...

====================

#395 PezzA

PezzA

    Squaddie

  • Xenocide Programming Department
  • 5 posts

Posted 28 October 2009 - 10:34 AM

88mph, hihihihi!

Haha, I really didn't get this. :D

As for the freezing: yes, I noticed the same thing. And as gu35s mentioned, it happens both, when you start a faster advancement of time, and in between without interaction. I can't say though that I had the feeling it would appear more frequent when UFOs were around. I don't think this behavior was seen in the 1835 (XNA1) build, but I can't confirm it, since this build won't run on my PC anymore (I assume it's the missing XNA 1.0 RF FW, the 3.0 doesn't seem to be downwards compatible).

Edit: I did a test (on my spouse's computer, don't tell her ;) ) and yes, the 1835 build worked flawlessly (and integrated the shading on the globe nicely, check it out:
Attached File  Xenocide_globe1.jpg   69.38K   27 downloads, Attached File  Xenocide_globe2.jpg   116.61K   29 downloads.
I can only urge everyone who's not seen it, or does not remember anymore to check out this build. This is (more or less) where we want to go again (shading- and dialog-wise).

Plus, I'll have to agree with gu35s: although the AB and TS icons don't seem to be bigger on the second glance, the surely are on the first, and maybe also on the third. :)
And the Base Icon really has to lighten up when it's on the far side (pun intended).

That's some nice mountains you got there!

I'll look into that, it really was only a quick hack in the shader file. I would never seriously have put that part of the change in for submission.

I'm away for a couple of days now, but should be able to get something in over the weekend.

Also, gu35s, i've been looking at the CeGUI code, and i think i may be able to help you get some different style buttons in there.

#396 dteviot

dteviot

    Programming Department

  • [Xenocide Senior Members]
  • 1,479 posts

Posted 28 October 2009 - 01:18 PM

The sharper Day/Night transition was my doing. There were a number of errors in the shader logic that I "fixed" in check in 1838.
A side effect of the errors was that the shadows cast by mountains were significantly exageraged.
Specifically, the "night" term was derived from both the sun and the earth's bump map (normalFromMap is the bump map) and that the night term was exagerated. (resulting in much more noticable mountains.)

The relevant sections (old code)
Input.ViewDirection = normalize(Input.ViewDirection);
	Input.LightDirection = normalize(Input.LightDirection);		 
	
	// Calculates light intensity using the normal map instead of the model normal
	// Ambient is hard coded to 0.25
	// and we multiply sunlight by 3 to quickly ramp to full daylight.
	float dotL = max(dot(normalFromMap, Input.LightDirection), 0);
	float sunlight = clamp(dotL * 3, 0.25, 1.0);

	// Night lights bitmap.  (Note, lights start going on at twilight)
	// and make lights ramp up quickly to full
	float nightTerm = saturate((0.2 - dotL) * 3.0);

	// Base Color
	float4 diffuseTexture = tex2D(GeoscapeTextureSampler, Input.TexCoord);
	float4 nightTexture = tex2D(NightTextureSampler, Input.TexCoord);

	Output.Color =  diffuseTexture * sunlight + nightTexture * nightTerm;
Newer version:
Input.ViewDirection = normalize(Input.ViewDirection);
	Input.LightDirection = normalize(Input.LightDirection);

	// figure out if pixel is in day or night
	float sunangle = dot(Input.TangentToWorld[2], Input.LightDirection);

	// quantity of night texture to apply (1 for night, 0 for day)
	float nightTerm = step(sunangle, 0.01);

	// initially set lighting to night conditions (easy case) (Ambient is hard coded to 0.25)
	// but if pixel in daylight, recalc values to day conditions
	float dayTerm   = 0.25;
	if (0.01 < sunangle)
	{
		// Calculates light intensity using the normal map instead of the model normal
		// light intensity on day must be at least 50%
		dayTerm = (max(dot(normalFromMap, Input.LightDirection), 0) * 0.5) + 0.5;
	}

	// Base Color
	float4 diffuseTexture = tex2D(GeoscapeTextureSampler, Input.TexCoord);
	float4 nightTexture = tex2D(NightTextureSampler, Input.TexCoord);

	Output.Color =  (diffuseTexture * dayTerm) + (nightTexture * nightTerm);

Edited by dteviot, 28 October 2009 - 01:19 PM.

Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.

#397 PezzA

PezzA

    Squaddie

  • Xenocide Programming Department
  • 5 posts

Posted 28 October 2009 - 04:10 PM

Update patch attached!
  • Draws outer icons first
  • Adds bump mapping back into geoscape rendering
  • Better day/night transition
  • Occluded base icon more visible
  • Uses new sprite map where text background scales to the edges (thanks Gu35s!)
  • Text animation speed taken down a tad

Preview:
Attached File  Terror_.jpg   79.71K   31 downloads

For those interested, you can change the speed of the text animation to your choosing by altering line 370 in GeoHud.cs
private const float FLUXCAPACITOR = 15.0f;
It's the number of milliseconds between characters.

You can also change how big, fast and small the outer icons get here:
private const float MINICONSCALE = 0.0f;
			private const float MAXICONSCALE = 1.0f;
			private const float SCALEUPRATE = 0.10f;
			private const float SCALEDOWNRATE = 0.05f;

Also if you want you can change some of the parameters of the geoscape shading to produce the exact effect you want: (lines 176-183 in GeoscapeShader.fx)
// ambient light is the amount of light if the sun isn't shineing.
	const float AMBIENT_DAY = 0.7 - bumpTexture;
	// how light is night?  (how bright to make the lights at it's peak)
	const float AMBIENT_NIGHT = 1.0;
	// how much lighter than night is day?
	const float DAYLIGHT_UPLIFT = 0.7;
	// How big is the dawn / dusk transistion area?
	const float DUSK_DAWN_MARGIN = 0.2;

Enjoy!

Attached Files



#398 kafros

kafros

    Creative Text Department

  • Xenocide Creative-Text Departmen
  • 1,800 posts

Posted 28 October 2009 - 04:21 PM

Oh, that looks so beautiful! :D
Can't wait to test it!!

#399 dteviot

dteviot

    Programming Department

  • [Xenocide Senior Members]
  • 1,479 posts

Posted 28 October 2009 - 07:06 PM

I have problems figuring out your shader.

e.g. This term:
// ambient light is the amount of light if the sun isn't shineing.
const float AMBIENT_DAY = 0.7 - bumpTexture;

To do bump mapping, you need a term like:
dot(normalFromMap, Input.LightDirection)

Also, you should use clamp() in preference to if statements.
Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.

#400 Mad

Mad

    Creative Text Department

  • [Xenocide Senior Members]
  • 1,958 posts

Posted 29 October 2009 - 05:04 AM

Very nice work! I'm impressed (although not 100% sure if the light really follows the bumpmap... hmmm Sorry don't have time to figure it out right now)! Here's the build!

Edit: Whoever is interested, a ready to build commit of the source with all the recent patches included can be found in our svn. (To build, you'll need: VS C# 2008 EE and XNA Game Studio 3.0)

Edited by Mad, 29 October 2009 - 05:39 AM.

Keep smiling while dying

Of course I have gone mad with power! It would be completely ridiculous to go mad without power!
And no, this is not a quote from the Simpson's movie, I want it on paper, that I actually wrote that quite some time before the movie came out.

Posted Image