danbuis / ArmadaAIEngineNew

Revisit of an old project to create an AI for Star Wars Armada
1 stars 0 forks source link

Create game constants #20

Closed danbuis closed 3 years ago

danbuis commented 3 years ago

This pull request intends to build a basic game constants file to be used in ship construction and basic measuring.

It also serves as a primer for @Sobonis01 when it comes to using git/github.

danbuis commented 3 years ago

Here is the scoop on how git/github works and what it does for us.

At its core it is an instance of version control, which means that it saves the state of our project at several different points and makes it really easy to roll back changes, integrate edits, and generally allow us to work cleanly on the same files without worrying about overwriting someone else's changes.

A couple key concepts on how git works 1) The "for real" code is in our "master" branch. You can think of it kind of like the trunk of a tree. 2) When I want to make changes to the code I create a new branch off that trunk. This basically makes a snapshot of what the code looks like at that moment. 3) When I make an edit and want to save it to this repo I make a "commit" which is effectively another snapshot. There are 4 commits in this branch. If you click on them up there you can see what was changed, and see a message attached to the commit. The summary should be what was changed, and the message is why it was changed. At work we often start the message with "Do this because/so that...." 4) At any point I open a pull request, which is basically I want "master" to pull these changes in. When it is done enough you can tag someone to review it. In general it is good to have 2 people look at every bit of code that gets put in. A 2nd pair of eyes to look for mistakes, check tests, suggest changes etc. Plus now everyone is familiar with a larger portion of the code. 5) Once the reviewer approves the pull request it is merged back into "master" and closed out.

danbuis commented 3 years ago

So, let me know if you have any questions.

You should have the ability to start a review with a green button in the upper right. Clicking on some lines in the files changed tab or the commit history should allow you to comment on any lines.

Sobonis01 commented 3 years ago

Ok I saw your code in there today. I saw how you defined the ship in terms of size in mm. I can see about how to define the arcs for each ship. It would be something like finding the angles of each ship than draw them out from the center?

Once I define them we can move onto what reaction the Ai will take? Ie if a ship is in Arc ft arc, attack.

Sobonis01 commented 3 years ago

Like the GSD would have Front arc 72.5 side arc 110 Rear 67.5 degrees

danbuis commented 3 years ago

That would work. You'll have to define where the apex of the arc is. I know several ships don't meet at one point.

I opted for the other way because i had a ruler not a protractor.

danbuis commented 3 years ago

You could also probably get away with just doing front and rear arc angles and locations. Side arcs are the leftovers.

Sobonis01 commented 3 years ago

I found a excel doc which has the arc measurements laid out. It’s from like 2016 so a lot of stuff is missing. But it gives me a starting point.
https://docs.google.com/spreadsheets/u/0/d/1iFgjjXuY6SOLjaR-2QHiDUCnV0te9eYlym30OC2BHuc/htmlview