Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 06-05-2011, 11:51 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Just looked through your cs code and it looks great. I wish I could know c# half as good as you do. Sure I have many questions if you do not mind )

We use similar actor destroy code on Repka. It used to have an issue of stopping bomber engines when a player switches to a gunner or navigator position. Did you manage to solve this issue? Does adding this line helps in this respect or it was added for different purposes?
Code:
        foreach (AiActor actor in actorMain.Group().GetItems())
Quote:
Originally Posted by TheEnlightenedFlorist View Post
Also, players are allowed to spawn groups of up to four bombers so they don't have to fly alone.
What happens if a player creates 20 bomber groups in a row one by one? I think they should be destroyed immediately in this case or this can ruin any server. I have seen people creating 20 single Stukas on Repka just for fun. They were destroyed with 5 minutes delay. But with groups different code is probably needed. Just a thought.

Code:
        List<Player> bluePlayers = new List<Player>();

        foreach (Player p in GamePlay.gpRemotePlayers())
        {
            if (p.Army() == 2)
                bluePlayers.Add(p);
        }

        GamePlay.gpHUDLogCenter(bluePlayers.ToArray(), msg);
Why do you have to add players to a list first and then print message to the list members. Can you print message directly to array members like in this example (for server log msg)?

Code:
	private void serverMessage(string msg)
        {
            Player pl = GamePlay.gpPlayer();
            Player[] players = { pl };
            object[] args = { msg };
            GamePlay.gpLogServer(players, msg, args);
        }
This is not my code and I did not check if this code works but I think it does.
Reply With Quote
  #2  
Old 06-05-2011, 12:07 PM
SEE SEE is offline
Approved Member
 
Join Date: Oct 2009
Posts: 1,678
Default

I had really poor FPS over Dunkirk trying to create a single mission campaign for 'Operation Dynamo' and ditched it.

Will MP have the same FPS problems using a full Channel map as it sounds excellent apart from my poor fps over that area of France?

I will certainly give it a try when its available, sounds great!
Reply With Quote
  #3  
Old 06-05-2011, 12:23 PM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Quote:
Originally Posted by SEE View Post
I had really poor FPS over Dunkirk trying to create a single mission campaign for 'Operation Dynamo' and ditched it.

Will MP have the same FPS problems using a full Channel map as it sounds excellent apart from my poor fps over that area of France?

I will certainly give it a try when its available, sounds great!
It runs pretty well on my modest machine. Granted, I have most of the settings turned to low or medium. Dunkirk is a pretty large city. If you normally have performance problems over large cities like Calais, Dunkirk probably won't be any different. I tried to design the map so that a lot of action would take place south of Dunkirk as well as directly over it.

I was hoping that since I see a lot of online missions over Calais, that putting one over Dunkirk wouldn't keep too many people from enjoying it. When did you try making your mission? Maybe a recent patch has helped.
Reply With Quote
  #4  
Old 06-05-2011, 12:13 PM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Quote:
Originally Posted by Ataros View Post
We use similar actor destroy code on Repka. It used to have an issue of stopping bomber engines when a player switches to a gunner or navigator position. Did you manage to solve this issue?
I was not aware of that issue. My code probably exhibits the same behavior. That code actually answers your second question. It goes through all the aircraft in a group and destroys them.

As for the list and array business, I only want to send the message to blue players, so I need to create an array that contains only the players on blue team. The problem is that I don't know how many blue players there are beforehand and when you create an array you can't resize it. That's where the list comes in. The list can be dynamically resized. When I'm ready to send the message, I can use the ToArray() method of the list to get an array that contains only the blue players.
Reply With Quote
  #5  
Old 06-06-2011, 01:18 AM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Quote:
Originally Posted by TheEnlightenedFlorist View Post
I was not aware of that issue. My code probably exhibits the same behavior.
This has now been fixed. I also placed static aircraft in the small hangers so 110s shouldn't spawn in them and blow up. The downloads have been updated.
Reply With Quote
  #6  
Old 06-06-2011, 07:41 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by TheEnlightenedFlorist View Post
This has now been fixed.
Great news! Thanks a lot. It is worth mentioning in the CoD multiplayer section.

The original code for actors destruction comes from oreva at sukhoi.ru forums btw and then was improved by ZaltisZ from 1C forums. Maybe also worth mentioning.
Reply With Quote
  #7  
Old 06-06-2011, 07:50 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Actually ZaltysZ corrected oreva's code to be more friendly to single-engined AC. Sorry, did not notice earlier.
Code:
        int iNumOfEngines = (aircraft.Group() as AiAirGroup).aircraftEnginesNum();
        for (int i = 0; i < iNumOfEngines; i++)
        {
            aircraft.hitNamed((part.NamedDamageTypes)Enum.Parse(typeof(part.NamedDamageTypes), "Eng" + i.ToString() + "TotalFailure"));
        }
upd.
Sorry for multiple posts. Do you plan to develop the mission further, say including a movable frontline and having ground forces to actually push an enemy to the channel waters? Dunkerque tragedy is a remarkable event in history and deserves further development imho.

I am slowly working (mostly studying C# actually) )) with this script to have movable frontlines in Calais area. At this point there is no generator to generate waypoints for ground groups and all submissions should be created manually. In future we could combine our submissions into one mission covering half of existing France map if we use the same script and the same submission naming convention.

Last edited by Ataros; 06-06-2011 at 08:46 AM.
Reply With Quote
  #8  
Old 06-07-2011, 06:13 AM
TheEnlightenedFlorist TheEnlightenedFlorist is offline
Approved Member
 
Join Date: May 2011
Location: SLC, Utah, USA
Posts: 143
Default

Quote:
Originally Posted by Ataros View Post
Actually ZaltysZ corrected oreva's code to be more friendly to single-engined AC. Sorry, did not notice earlier.
Code:
        int iNumOfEngines = (aircraft.Group() as AiAirGroup).aircraftEnginesNum();
        for (int i = 0; i < iNumOfEngines; i++)
        {
            aircraft.hitNamed((part.NamedDamageTypes)Enum.Parse(typeof(part.NamedDamageTypes), "Eng" + i.ToString() + "TotalFailure"));
        }
upd.
Sorry for multiple posts. Do you plan to develop the mission further, say including a movable frontline and having ground forces to actually push an enemy to the channel waters? Dunkerque tragedy is a remarkable event in history and deserves further development imho.

I am slowly working (mostly studying C# actually) )) with this script to have movable frontlines in Calais area. At this point there is no generator to generate waypoints for ground groups and all submissions should be created manually. In future we could combine our submissions into one mission covering half of existing France map if we use the same script and the same submission naming convention.
Hi Ataros. Yes, I am going to improve the mission. Moving frontlines is unlikely. I can barely get the ships to do what I wan them to.

It seems like as soon as I fix one problem, another comes up. In the future though, for sure we'll see.
Reply With Quote
  #9  
Old 06-07-2011, 08:06 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by TheEnlightenedFlorist View Post
It seems like as soon as I fix one problem, another comes up.
I thought it happens only to me every time I open the FMB lol Probably this is what the devs are experiencing too. At least we are not alone

BTW with your level of C# knowledge I would target not less then writing a waypoints generator for tank groups and supply convoys i have a sample code for bombers waypoints generation if you are interested. The hardest part would be to release the tanks that are stack in cities or can not cross rivers but this is an interesting and achievable challenge
Reply With Quote
  #10  
Old 06-07-2011, 09:47 PM
_79_dev _79_dev is offline
Approved Member
 
Join Date: Sep 2010
Location: Dublin
Posts: 242
Default

~S~

Can`t get it work ......... as soon as I start server, everything looks fine, I just cant select army... any advise?
__________________

Asus P6T V2 Deluxe, I7 930, 3x2 GB RAM XMS3 Corsair1333 Mhz, Nvidia Leadtek GTX 470, Acer 1260p screen projector, Track IR 4 OS ver5, Saitek Pro Flight Rudder, Saitek X52, Win 7 x64 ultimate
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:37 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.