Sorry Pip, Still getting text ghosting? :-(

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Sorry Pip, Still getting text ghosting? :-(

Post by GottaLove88s »

Pip,

I've got some text labels two squares away from my flags, to indicated names and VP values for each flag.

But they're ghosting when the campaign is played on other computers...
See screenshot here -> viewtopic.php?f=87&t=38844&start=360#p367046

Any ideas why this is happening and how to avoid it? It's giving one of the guys nystagmus, lol!

This is in my .BSF file...

Code: Select all

FUNCTION PreBattleSetup()
{
ShowTextMarker(1, 17, 25, "IDS_LOC_SWORD_ROAD2OUISTREHAM", 12, "FFFFFF", 1);
ShowTextMarker(1, 38, 35, "IDS_LOC_SWORD_BARRACKS", 12, "FFFFFF", 1);
ShowTextMarker(1, 53, 43, "IDS_LOC_SWORD_WATCHTOWER", 12, "FFFFFF", 1);
ShowTextMarker(1, 28, 39, "IDS_LOC_SWORD_CENTRALBUNKER", 12, "FFFFFF", 1);
ShowTextMarker(1, 41, 16, "IDS_LOC_SWORD_TRACK2PERRIERS", 12, "FFFFFF", 1);
ShowTextMarker(1, 16, 16, "IDS_LOC_SE", 8, "FFFFFF", 1);
ShowTextMarker(1, 55, 16, "IDS_LOC_SW", 8, "FFFFFF", 1);
ShowTextMarker(1, 55, 55, "IDS_LOC_NW", 8, "FFFFFF", 1);
ShowTextMarker(1, 16, 55, "IDS_LOC_NE", 8, "FFFFFF", 1);
}
This is in my Text1.TXT

Code: Select all

IDS_LOC_SWORD_ROAD2OUISTREHAM, "Road to Ouistreham 5pts",
IDS_LOC_SWORD_BARRACKS, "Barracks 3pts",
IDS_LOC_SWORD_WATCHTOWER, "Watchtower 1pt",
IDS_LOC_SWORD_CENTRALBUNKER, "Sword Bunker 5pts",
IDS_LOC_SWORD_TRACK2PERRIERS, "Track to Perriers Ridge 3pts",
Last edited by GottaLove88s on Tue Nov 20, 2012 9:35 pm, edited 1 time in total.
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
pipfromslitherine
Site Admin
Site Admin
Posts: 9929
Joined: Wed Mar 23, 2005 10:35 pm

Re: How to get rid of text ghosting?

Post by pipfromslitherine »

Is this a MP game? It could be an issue with the loading/saving of text markers on the map. It might be that it is both being created in the script, and then also loaded from the save file. Potentially not something I had considered.

Cheers

Pip
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: How to get rid of text ghosting?

Post by GottaLove88s »

pipfromslitherine wrote:Is this a MP game? It could be an issue with the loading/saving of text markers on the map. It might be that it is both being created in the script, and then also loaded from the save file. Potentially not something I had considered.

Cheers

Pip
Yep it's an MP...

Ok, that's intriguing... Do text labels always do this in MP games?

I wonder, can I get around the duplication by putting my text in a function other than PreBattleSetup?

Or, alternatively, is there a Slith command to suppress BA from saving/loading text markers whenever it passes the game over to an opponent?
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Sorry Pip, Still getting text ghosting? :-(

Post by GottaLove88s »

Hi Pip, I've started a new game using the GJS'44 Caen map...

The force selection works, my first movement turn worked (with no ghosting), but once my opponent made his first turn and returned the game, the ghosting appears on all of the labels... Have attached a screenshot...

PS. This seems to have affected all of the players in the GJS'44 campaign, on all platforms (PC, Mac, iPad)

Image
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Sorry Pip, Still getting text ghosting? :-(

Post by GottaLove88s »

PS. Afterthought...

Could this be caused by the placing of my PreBattleSetup() call?
I've put it inside a StartTurn(side) function but it's inside a condition which should only run if GetTurn()==0... so I assumed it would only run once...
Essentially, it's inside a piece of Merr code that runs our dual-side MP deployment (copied below)... Is there a better place to put it?
The text ghosting is darned frustrating... Any ideas how we can get around this?

Code: Select all

FUNCTION StartTurn(side)
{
int id ;
int i ;

	// if it is turn 0 or 1, i.e. the first turn for each player show the briefing message. 
	if( (GetTurn() == 0 ) || ( GetTurn() == 1 ) )
	{
		if ( GetShowSide() == GetCurrentSide() )
		{
			ShowUIScreenX( "BattlePop0", "Anim1", "IDS_MERRMP_DEPLOY", "BHead0Image:US_infantry_head") ;
		}		
	}
	if ( GetTurn() == 0 )
	{		
		PreBattleSetup();
		SetAreaLOS(18, 50, 55, 53, 0, 1) ;
	}
	if ( GetTurn() == 1 )
	{		
		SetAreaLOS(16, 16, 55, 45, 1, 1) ;
	}	

	// Setup and clear smoke (fired by bombardment units)
	if ( side == 0)
	{
		for(i=0;i<999;i++) 
		{ 
			id = GetObjectFromName("merr_objects", "SMOKE_ALLIED", i) ;
			
			if(id == -1) 
			{ 
				i = 999 ; // end the loop 
			} 
			else 
			{ 
				Log ("id ", id , i);
				
				SetObjectPosition(id, 0100, 0100) ;
				//DeleteObject(id) ;
			} 
		}
		AddVizFunctionCall("HideEffectMarker", -9000) ;
	}
	
	if ( side == 1)
	{
		for(i=0;i<999;i++) 
		{ 
			id = GetObjectFromName("merr_objects", "SMOKE_AXIS", 0) ;
			
			if(id == -1) 
			{ 
				i = 999 ; // end the loop 
			} 
			else 
			{ 
				SetObjectPosition(id, 0, 0) ;
				//DeleteObject(id) ;
			} 
		}
		AddVizFunctionCall("HideEffectMarker", -9001) ;
	}	
}
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
pipfromslitherine
Site Admin
Site Admin
Posts: 9929
Joined: Wed Mar 23, 2005 10:35 pm

Re: Sorry Pip, Still getting text ghosting? :-(

Post by pipfromslitherine »

It's an unintended consequence of the fix to save text on the map. Basically it's not being saved at the right point, so the loaded map includes the text that was placed on it by a prior call to the script, and then it called the script again. At least I think that is what is happening.

I'll try and get it fixed asap so we can roll it out in the next update. For now you could fix it by adding a check to only add the text when ShowSide is 0 (so the first turn for the first side).

Cheers

Pip
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Sorry Pip, Still getting text ghosting? :-(

Post by GottaLove88s »

Thanks Pip!

I've edited my FUNCTION StartTurn(side) to look like this now... including the PreBattleSetup call, which runs the labelling, if GetShowSide()==0...

Will test it out tonight...

Code: Select all

FUNCTION StartTurn(side)
{
int id ;
int i ;
	
	// Show labels on MP maps
	if ( GetShowSide() == 0)
		{
		PreBattleSetup();
		}

etc, etc...
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Sorry Pip, Still getting text ghosting? :-(

Post by GottaLove88s »

Hey Pip,

I've added that fix you recommended, and the weirdest thing is happening... Sometimes the user text stays perfect for both players, sometimes it screws up... using exactly the same scenario files...


Example of Broken VP Flag Text (should say Barracks in the top left, and Bunkers in the top centre)
Image

Example of Clear VP Flag Text (Bunkers text remains perfectly clear)
Image

Am asking the guys what systems they're using, to figure out if it's some sort of PC doesn't match up properly with iPad thing... Btw, the smoke for Merr/Enric's smokey mortars mod looks great on a Mac but looks more like a feeble "about to go out candle" on an iPad2 (which is why I'm wondering if our text problems could be system related)...

:?:
Last edited by GottaLove88s on Wed Dec 19, 2012 11:25 am, edited 1 time in total.
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

Re: Sorry Pip, Still getting text ghosting? :-(

Post by enric »

GottaLove88s wrote:Hey Pip,

Am asking the guys what systems they're using, to figure out if it's some sort of PC doesn't match up properly with iPad thing... Btw, the smoke for Merr/Enric's smokey mortars mod looks great on a Mac but looks more like a feeble "about to go out candle" on an iPad2 (which is why I'm wondering if our text problems could be system related)...

:?:
Gotta I don't see any differences between Mac smoke and iPad smoke (the picture zoom are the sole difference)
Attachments
mac smoke.jpg
mac smoke.jpg (95.62 KiB) Viewed 4368 times
iPad smoke.jpg
iPad smoke.jpg (118 KiB) Viewed 4368 times
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Sorry Pip, Still getting text ghosting? :-(

Post by GottaLove88s »

Hmmm... that's intriguing Enric... Which version of iPad are you using? I don't see smoke like that on mine (only an iPad 2, I confess).
I'll shoot some smoke when I get my turn on Sword and upload so you can see what I mean...
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
pipfromslitherine
Site Admin
Site Admin
Posts: 9929
Joined: Wed Mar 23, 2005 10:35 pm

Re: Sorry Pip, Still getting text ghosting? :-(

Post by pipfromslitherine »

To answer both things after the thread got side-tracked :)

1 - the text ghosting was caused by some saved data which was screen resolution dependent. This is now all fixed in the latest version.

2 - on iPad 1 we reduce considerably some smoke and particle effects (for performance reasons) so that could explain why you are seeing something different on a specific iPad.

Cheers

Pip
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Sorry Pip, Still getting text ghosting? :-(

Post by GottaLove88s »

pipfromslitherine wrote:1 - the text ghosting was caused by some saved data which was screen resolution dependent. This is now all fixed in the latest version.
When you say "all fixed in the latest version", does that mean we should all update our BA to the latest and it will be ok? Or is this a latest version "coming soon"?
pipfromslitherine wrote:2 - on iPad 1 we reduce considerably some smoke and particle effects (for performance reasons) so that could explain why you are seeing something different on a specific iPad.
I've got an iPad2 with 64GB memory. It's not Retina tho. Does that still suffer the downgraded smoke/particle effects? Please tell me I don't "need" a new iPad... :D

Thanks again Pip!
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
pipfromslitherine
Site Admin
Site Admin
Posts: 9929
Joined: Wed Mar 23, 2005 10:35 pm

Re: Sorry Pip, Still getting text ghosting? :-(

Post by pipfromslitherine »

It will be fixed in the next update, but that won't be until after Xmas now, as it will ship along with the release of the next expansion.

I'm pretty sure that the particle effects shouldn't be toned down on an iPad 2. I will double check the code.

Cheers

Pip
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Sorry Pip, Still getting text ghosting? :-(

Post by GottaLove88s »

pipfromslitherine wrote:It will be fixed in the next update, but that won't be until after Xmas now, as it will ship along with the release of the next expansion.
Next update coming soon after Christmas? That's excellent news...!!
Much speculation onsite about Operations beginning with "H" and possibly having to learn Italiano...?
:mrgreen:
pipfromslitherine wrote:I'm pretty sure that the particle effects shouldn't be toned down on an iPad 2. I will double check the code.
Thanks Pip. Alternatively, if there's anything I can do on settings for iPad2, to fix the problem, that would be great too...
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Sorry Pip, Still getting text ghosting? :-(

Post by GottaLove88s »

Pip, Apologies this took awhile... But here's what I mean about smoke looking like a wimpy candle on an iPad2...
Intriguingly, it starts looking just as impressive as on a Mac, but then fizzles away to what you see below...

Merr/Enric's smoke on a Mac
Image

Merr/Enric's smoke on an iPad2
Image
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
pipfromslitherine
Site Admin
Site Admin
Posts: 9929
Joined: Wed Mar 23, 2005 10:35 pm

Re: Sorry Pip, Still getting text ghosting? :-(

Post by pipfromslitherine »

Hmmm. It could be that the iPad 2 has some slight adjustments for performance (the iPad hw is very poor at alpha blending) and that the various numbers are interacting to kill off the smoke too quickly. I will need to check the code when I get back to the office.

Cheers

Pip
GottaLove88s
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3151
Joined: Fri Apr 06, 2012 6:18 pm
Location: Palau

Re: Sorry Pip, Still getting text ghosting? :-(

Post by GottaLove88s »

pipfromslitherine wrote:Hmmm. It could be that the iPad 2 has some slight adjustments for performance (the iPad hw is very poor at alpha blending) and that the various numbers are interacting to kill off the smoke too quickly. I will need to check the code when I get back to the office.

Cheers

Pip
Thanks for looking into this Pip, Kind of you to read while on hols. Hope you're having a great Christmas and wishes for a fabulous New Year... Good luck with the expansion release!... Jon
SCENARIO LINKS
Seelow'45 -> www.slitherine.com/forum/viewtopic.php?f=313&t=55132
Normandy'44 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42094
Dieppe'42 -> www.slitherine.com/forum/viewtopic.php?f=87&t=42347
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1855
Joined: Sun May 15, 2011 8:47 am

Re: Sorry Pip, Still getting text ghosting? :-(

Post by enric »

it starts looking just as impressive as on a Mac, but then fizzles away to what you see below...
Gotta, I installed BA in my old iPad 2 (now is my wife's iPad) and the smoke (immediately) looks as you said, like a candle, so this should be a specific issue of BA on iPad2.

I tried installing CityRiver by hand and it also happens the same.

------
BTW, Pip, I see that once installed a downloaded campaign the .CPF file is not deleted and keeps in the iPad forever.
pk867
Sr. Colonel - Battleship
Sr. Colonel - Battleship
Posts: 1602
Joined: Fri May 08, 2009 3:18 pm

Re: Sorry Pip, Still getting text ghosting? :-(

Post by pk867 »

Is there a way to reduce the particle generator for smoke? What if we had a settings for BA under Settings to reduce the number of Shadows or graphics 16 or 32 bit ?

Maybe the app defaults to retina display and the iPad2 can not handle it?
Post Reply

Return to “Battle Academy : Modders Corner ”