Author Topic: Pulsar 4X  (Read 33501 times)

0 Members and 1 Guest are viewing this topic.

Offline lupin-de-mid

  • Petty Officer
  • **
  • l
  • Posts: 25
  • Thanked: 1 times
Re: Pulsar 4X
« Reply #120 on: May 21, 2014, 07:43:55 AM »
I monitor their progress on github https://github. com/Pulsar4xDevs/Pulsar4x/commits/master
 

Offline Nathan_

  • Pulsar 4x Dev
  • Commodore
  • *
  • N
  • Posts: 701
Re: Pulsar 4X
« Reply #121 on: May 22, 2014, 06:20:01 PM »
Not much to talk about right now, how bout them turrets?
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: Pulsar 4X
« Reply #122 on: May 27, 2014, 12:17:30 AM »
So I've kind of gotten pissed off to the point of quitting on another 4x project I was helping with, and am looking for a new project.
Where's Pulsar4X at and if I were to help out where could I start?
 

Offline sublight

  • Moderator
  • Captain
  • *****
  • s
  • Posts: 592
  • Thanked: 17 times
Re: Pulsar 4X
« Reply #123 on: May 27, 2014, 07:20:32 AM »
We are using GitHub for our code repository.
Our project is at: https://github.com/Pulsar4xDevs/Pulsar4x.git

Most of the Development chatter takes place on a Skype group. PM one of us your skype user name and we can add you to the conversation.

Either look through the code for something that can be improved or is unfinished or ask Nathan_, the lead Classic Rules coder.
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: Pulsar 4X
« Reply #124 on: May 28, 2014, 05:39:50 PM »
I just installed skype and hate it so much already. what happened to the good old days of IRC?
 

Offline Nathan_

  • Pulsar 4x Dev
  • Commodore
  • *
  • N
  • Posts: 701
Re: Pulsar 4X
« Reply #125 on: May 28, 2014, 07:50:49 PM »
yeah the new versions are really obnoxious, I'm on one of the older ones that still lets you disable supernode.
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: Pulsar 4X
« Reply #126 on: May 30, 2014, 06:24:33 AM »
yeah I can't bring myself to run it. not to mention it's unclear what my skype username is exactly. my email address maybe?

I've been playing Aurora the past few days to remind myself how it works, and have gotten frustrated with all the horrible little bugs in that all over again. setting a ship to overhaul causes it to complain about not being able to move for example, and no wait for shore leave order for another, and a bunch of other seemingly missing orders. etc etc etc. makes me think maybe I'm 'doing it wrong' however if so then 'doing it right' is far too obtuse. kind of feel like I should maybe note these down as specific improvements that could be made for pulsar.

I've opened up and perused the pulsar project a number of times, still looking for an easy place to start getting my fingers dirty.
« Last Edit: May 30, 2014, 06:30:44 AM by se5a »
 

Offline Nathan_

  • Pulsar 4x Dev
  • Commodore
  • *
  • N
  • Posts: 701
Re: Pulsar 4X
« Reply #127 on: May 30, 2014, 12:58:36 PM »
yeah I can't bring myself to run it. not to mention it's unclear what my skype username is exactly. my email address maybe?
we can search for username or email, your skype name should be listed on your profile as skype name.

Quote
I've been playing Aurora the past few days to remind myself how it works, and have gotten frustrated with all the horrible little bugs in that all over again. setting a ship to overhaul causes it to complain about not being able to move for example, and no wait for shore leave order for another, and a bunch of other seemingly missing orders. etc etc etc. makes me think maybe I'm 'doing it wrong' however if so then 'doing it right' is far too obtuse. kind of feel like I should maybe note these down as specific improvements that could be made for pulsar.

I've opened up and perused the pulsar project a number of times, still looking for an easy place to start getting my fingers dirty.

certainly keep in mind stuff you want to add, adding a wait for shoreleave order(morale et al isn't really implemented yet) would mean updating public uint PerformOrders(uint TimeSlice) in Taskgroup.cs under entities to include the new order(you'd need to understand the orders system of course), and then updating private void BuildActionList() in TaskGroup.cs under handlers to put the order in the action listbox provided the appropriate context exists for that order. A friendly being in the locations listbox for example, there are lists of what and where is in the system locations listbox, you'd have to use those as a roadmap to find out what the user is clicking on from the selected index. So entities/taskgroup.cs Handlers/taskgroup.cs and entities/orders.cs are what you'd want to look at for that.

I can't think of anything that would be simple or self contained right now, new components are actually quite a bit of work to add in total, though just doing the definitions for them is simple enough.
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: Pulsar 4X
« Reply #128 on: May 31, 2014, 06:50:40 PM »
currently moveto seems to be the only order that shows up.
Economics shows 'Earth' but earth does not seem to be in any of the systems.
maybe I'll look see if I can't implementing the follow order first, since there's another fleet to test it on.
 

Offline Nathan_

  • Pulsar 4x Dev
  • Commodore
  • *
  • N
  • Posts: 701
Re: Pulsar 4X
« Reply #129 on: May 31, 2014, 08:36:25 PM »
currently moveto seems to be the only order that shows up.
Economics shows 'Earth' but earth does not seem to be in any of the systems.
maybe I'll look see if I can't implementing the follow order first, since there's another fleet to test it on.

Moveto is the only order being printed to the list.  Basically all orders revolve around "Goto point, do something", except for special cases like follow.  I've implemented some others(18 various logistics related orders) on the back end, but they require the economics system to exist in order to have meaning.  The econ page is a standin and nearly all of that simply doesn't exist.  After I've got Point defense and the sub pulse/interrupts system I'll move over to that since combat is fairly well fleshed out right now.

Orders... hmm.
Follow will require some modifications to Entities/Taskgroup.FollowOrders() to not delete the order once perform order reports that it is "complete". maybe a new ordersState should be created for follow since there really can't be orders after follow.  On the front end it would be easiest to just print all orders for now.  Filtering is going to mean some fancy logic needs to be done to determine precisely what order is being issued. Lastly at some point I'll want to move the orders and orderstate enumerations from constants to Orders.cs, it probably belongs there.
« Last Edit: May 31, 2014, 08:41:23 PM by Nathan_ »
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: Pulsar 4X
« Reply #130 on: June 06, 2014, 07:45:54 PM »
I started looking at how to filter the follow order to be only if the selected item in SystemLocationsListBox was a task group or contact, but I'm not fully following how it's getting the type (looking at AddMoveButton_Clicked in Handlers/TaskGroup.cs) it appears to be looping through *everything* in the listbox here when the add button is clicked, and doing a switch case inside this loop.
doesn't it just need to check the selected item index? what am I missing?

regardless, this chunk should probably be put in a function of it's own, since it'll be wanting to get called from the BuildActionList() as well.
« Last Edit: June 06, 2014, 07:52:04 PM by se5a »
 

Offline Nathan_

  • Pulsar 4x Dev
  • Commodore
  • *
  • N
  • Posts: 701
Re: Pulsar 4X
« Reply #131 on: June 06, 2014, 08:29:17 PM »
I started looking at how to filter the follow order to be only if the selected item in SystemLocationsListBox was a task group or contact, but I'm not fully following how it's getting the type (looking at AddMoveButton_Clicked in Handlers/TaskGroup.cs) it appears to be looping through *everything* in the listbox here when the add button is clicked, and doing a switch case inside this loop.
doesn't it just need to check the selected item index? what am I missing?

regardless, this chunk should probably be put in a function of it's own, since it'll be wanting to get called from the BuildActionList() as well.

Index is just a number, it doesn't tell you anything about it, the Build SystemLocationListBox function can put planets, asteroids, contacts, friendly taskgroups,etc based on filtering, and the addMoveButton_clicked function needs a way of determining what exactly the system location is.The function then is looping through the SystemLocationListIndicies, which is going to be a list of 4 or 5(right now) "System Location Types". when it gets to the one it is, then it goes to the switch to determine what type of action should be undertaken.

This is BuildSystemLocationList, and as you can see not everything is put in there, so an index being selected in this list tells you nothing about what type of location is at any particular index without context.
Code: [Select]
/// <summary>
        /// Build the Total System Location List here.
        /// </summary>
        private void BuildSystemLocationList()
        {
            m_oTaskGroupPanel.SystemLocationsListBox.Items.Clear();
            SystemLocationListIndices.Clear();
            SystemLocationListTypes.Clear();

            AddPlanetsToList();

            if (m_oTaskGroupPanel.DisplayContactsCheckBox.Checked == true)
                AddContactsToList();

            if (m_oTaskGroupPanel.DisplayTaskGroupsCheckBox.Checked == true)
                AddTaskGroupsToList();

            if (m_oTaskGroupPanel.DisplayWaypointsCheckBox.Checked == true)
                AddWaypointsToList();

            SystemLocationListIndices.Add(m_oTaskGroupPanel.SystemLocationsListBox.Items.Count);
            SystemLocationListTypes.Add(SystemLocationListType.Count);
        }

you don't have to worry about that right now though, just print the order in BuildActionList() and don't worry about filtering(it can be done later), and just don't click follow Planet/waypoint/etc, and AddMoveButton_Clicked will "automatically" take care of issuing the right order(again as long as you don't try to follow a planet).

If you do want to do orders filtering, then you have to update BuildActionList() to duplicate the for loop, and the switch present in AddMoveButton_Clicked() if an index is selected.

You basically have to duplicate the logic involved in putting entries into these lists if you want to get useful information out of them in other words, so look at how taskgroups are added to the list for example to see how taskgroups should be extracted from it based on index.
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: Pulsar 4X
« Reply #132 on: June 06, 2014, 09:49:53 PM »
There's got to be an easier less obtuse way than that,
I'll have a play around and see what I can come up with.
 

Offline Nathan_

  • Pulsar 4x Dev
  • Commodore
  • *
  • N
  • Posts: 701
Re: Pulsar 4X
« Reply #133 on: June 06, 2014, 10:15:23 PM »
There's got to be an easier less obtuse way than that,
I'll have a play around and see what I can come up with.

Well there is, just don't worry about the filtering for now(and any potential errors this might cause under certain circumstances),for expediency to see if your follow function works. Filtering can be done later. That function is certainly no where near complete though, so if you do find something better that does help.
« Last Edit: June 07, 2014, 01:07:18 AM by Nathan_ »
 

Offline se5a

  • Lt. Commander
  • ********
  • Posts: 288
  • Thanked: 30 times
Re: Pulsar 4X
« Reply #134 on: June 07, 2014, 03:48:30 AM »
how about something a little more along these lines:
https://github.com/se5a/Pulsar4x/blob/master/Pulsar4X/Pulsar4X.UI/Handlers/TaskGroup.cs

smaller.
more efficient. (looking up values in dictionaries instead of looping)
easier to read. (imo anyway)

it's a little messy, I need to clean it up a bit, but should give you some idea of what I'm meaning.