Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - asdf14

#1
AI Development / Re: Galaxy syntax validator Tool
March 11, 2010, 06:52:07 AM
It's not really an editor at the moment. It simply lets you select a file to validate and lists file contents with added line numbering and validation results. I've changed it a bit, so you may want to update your link.


http://www.mediafire.com/?ym5tyli2ij3


Changelog:
- Auto-validates a file on load.
- Textboxes are now read-only to avoid confusion.
- If it doesn't find Lapin.exe in current directory it prompts a user to find it's path.
- Status bar now works correctly.


My current goal is to link it to Notepad++ so you can validate any file you're working on by pressing e.g. F5, to get more VS-like feeling.
#2
AI Development / Re: Galaxy syntax validator Tool
March 10, 2010, 04:21:50 PM
Good job man.


I've made a simple GUI for your tool. Consider it a beta. Let me know if you have any suggestions.


http://www.mediafire.com/?tl1yidd1zyy
#3
Again, this is OOP model you are thinking about. Galaxy is not object-oriented and point is not a class, so it doesn't have methods (point.getX()) or properties (point.x). Honestly I don't see the way of getting its coordinates the easy way, but I also don't see any reason for it. Most things you would like to do with the point you can achieve using functions I have listed above. Can I ask what do you need its coordinates for?


Now, if you really wanted to, here's an example which may work and uses a struct to hold both the point and its coordinates:


struct myPoint
{
int x;
int y;
point coordinates;
}
void createMyPoint (int x, int y)
{
myPoint.x = x;
myPoint.y = y;
myPoint.coordinates = (x, y);
}
#4
As far as I'm concerned there is no 'new' keyword in galaxy. It's not Java/C#.
To declare a new point use point Point(fixed, fixed);e.g.

point p;
p = (0,0)



Not sure about the center of the map, but if you knew map size you could do:


x = mapWidth;
y = mapHeight;
point center(x/2, y/2);



Other stuff you might find useful:
point PointWithOffset(point, fixed, fixed);
point PointWithOffsetPolar(point, fixed, fixed);
bool PointsInRange(point, point, fixed);
fixed AngleBetweenPoints(point, point);
fixed DistanceBetweenPoints(point, point);
region RegionCircle(point, fixed);
point RegionRandomPoint(region);
point UnitGetPosition(unit);
#5
AI Development / OpenAI 0.12 SDK released!
March 05, 2010, 06:48:17 PM
I announce the first release of OpenAI - SC2 AI SDK. There is not much in terms of AI yet but there is a custom version of Notepad++ which supports .galaxy files. It offers highlighting, folding, code auto-completion for native functions, and some other nifty features which make development a breeze.  :)
See documentation for more info. Link: http://www.mediafire.com/?mqykhljg4zq


Hope you'll find it useful. More to come somewhere in the future.