Page 5 of 8 FirstFirst 12345678 LastLast
Results 81 to 100 of 148

Thread: ETW Runtime Memory Stucture Documention

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: ETW Runtime Memory Stucture Documention

    dammit. this looks great.

    why oh why did i choose now to leave for the army

  2. #2
    Timefool's Avatar Primicerius
    Join Date
    Feb 2009
    Location
    Florida
    Posts
    3,921

    Default Re: ETW Runtime Memory Stucture Documention

    How much of the memory bytes have you mapped out yet?

  3. #3
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: ETW Runtime Memory Stucture Documention

    We have pretty much all relevant info about units. I'm guessing units will be the main thing to be effected by any new mechanics. Though cities and spies should be relatively similar.

    That OP is way out of date btw, I should really do something about it.

  4. #4

    Default Re: ETW Runtime Memory Stucture Documention

    Quote Originally Posted by .Mitch. View Post
    We have pretty much all relevant info about units for the attrition mod. I'm guessing units will be the main thing to be effected by any new mechanics. Though cities and spies should be relatively similar.

    That OP is way out of date btw, I should really do something about it.
    There's still lots more to be learned, the more help the better. For now Mitch and I are focusing on the attrition mod, not research.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  5. #5

    Default Re: ETW Runtime Memory Stucture Documention

    Any news?

  6. #6

    Default Re: ETW Runtime Memory Stucture Documention

    Quote Originally Posted by Lordsith View Post
    Any news?
    Attrition implementation from the Lua side is almost finished. Just waiting on a few bits from Mitch, should see a release soon
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  7. #7
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: ETW Runtime Memory Stucture Documention

    We need a map relative to ETW coordinate with areas of attrition marked on it, that's whats holding us back right now.

    This is a good description of what needs to be done, but I don't know how to do it:
    extract the borders of the ETW map, on a texture file with the size of the etw map (so the coordinates are 1:1) and then simply paint over some colours, which mitch tool can read (eg. red = high attrition etc)?

  8. #8
    Ordinarius
    Join Date
    Jul 2009
    Location
    Italy
    Posts
    737

    Default Re: ETW Runtime Memory Stucture Documention

    Quote Originally Posted by Primergy View Post
    extract the borders of the ETW map, on a texture file with the size of the etw map (so the coordinates are 1:1) and then simply paint over some colours, which mitch tool can read (eg. red = high attrition etc)?
    quite meaningless statement

    empire map coordinates system

    x range = -1280,1280
    y range = -640,640

    what does it mean 1:1 in a png picture? 2560*1280 pixels? nonsense

    where are coordinates 13,45;-43,12 in a 2560*1280 image?

    I can do an image keeping empire map proportion, but you have to find a way to convert from coordinates in this image to coordinates in empire map

    I hope I will upload soon a map with all year heat attrition areas in yellow.

  9. #9

    Default Re: ETW Runtime Memory Stucture Documention

    Quote Originally Posted by PietroMicca View Post
    quite meaningless statement

    empire map coordinates system

    x range = -1280,1280
    y range = -640,640

    what does it mean 1:1 in a png picture? 2560*1280 pixels? nonsense

    where are coordinates 13,45;-43,12 in a 2560*1280 image?

    I can do an image keeping empire map proportion, but you have to find a way to convert from coordinates in this image to coordinates in empire map

    I hope I will upload soon a map with all year heat attrition areas in yellow.

    Yes, I was about to say that negative co-ordinates will cause an issue. So long as the map is to scale, we'll work out the math to convert the co-ordinates.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  10. #10
    Ordinarius
    Join Date
    Jul 2009
    Location
    Italy
    Posts
    737

    Default Re: ETW Runtime Memory Stucture Documention

    this is a preview image for all year heat attrition areas (I have attached a much larger version; more is impossible for me)

    Spoiler Alert, click show to read: 


    I have changed choice

    heat attrition orange RGB 247 150 70

    pixels are proportional to empire map dimension

    make attrition system work on these areas and I will make a more complete map with all kinds of attrition areas

  11. #11

    Default Re: ETW Runtime Memory Stucture Documention

    Quote Originally Posted by PietroMicca View Post
    this is a preview image for all year heat attrition areas (I have attached a much larger version; more is impossible for me)

    Spoiler Alert, click show to read: 


    I have changed choice

    heat attrition orange RGB 247 150 70

    pixels are proportional to empire map dimension

    make attrition system work on these areas and I will make a more complete map with all kinds of attrition areas
    Cheers. I'll get onto Mitch about this + rep
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  12. #12

    Default Re: ETW Runtime Memory Stucture Documention

    PietroMicca, could you upload a version of that map with the pixel representing 0,0 in game marked a different colour.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  13. #13
    Ordinarius
    Join Date
    Jul 2009
    Location
    Italy
    Posts
    737

    Default Re: ETW Runtime Memory Stucture Documention

    Quote Originally Posted by T.C. View Post
    PietroMicca, could you upload a version of that map with the pixel representing 0,0 in game marked a different colour.
    just one pixel? I have uploaded 2 images the latest time, one smaller and one larger in rar archive, which of these?

  14. #14

    Default Re: ETW Runtime Memory Stucture Documention

    Quote Originally Posted by PietroMicca View Post
    just one pixel? I have uploaded 2 images the latest time, one smaller and one larger in rar archive, which of these?
    Yes, one pixel is all we need. The .rar one please
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  15. #15
    Ordinarius
    Join Date
    Jul 2009
    Location
    Italy
    Posts
    737

    Default Re: ETW Runtime Memory Stucture Documention

    It could seem an easy request, but it isn't.

    The problem is that 0,0 is not a pixel, but coordinates. Coordinates are part of a continuum, pixel are part of discrete system. Finally is a math problem. While 0,0 in continuum is unmistakable, 0,0 in discrete system of pixels could be:



    in case A we have an odd number of pixels both vertically and horizontally, so 0,0 is exactly in the center
    in case B we have an even number of pixels both vertically and horizontally; 0,0 is not in the center and so it doesn't seem consistent with coordinates system.

    I need to know how you are converting pixels in coordinates to set the correct pixel for 0,0. Can't you work with centimeters, instead pixels? Why do you need this pixel?

    anyway I have re-uploaded images, because in my previous version there was something wrong. It's strange, but now it seems correct (even if a bit smaller).

  16. #16

    Default Re: ETW Runtime Memory Stucture Documention

    Quote Originally Posted by PietroMicca View Post
    It could seem an easy request, but it isn't.

    The problem is that 0,0 is not a pixel, but coordinates. Coordinates are part of a continuum, pixel are part of discrete system. Finally is a math problem. While 0,0 in continuum is unmistakable, 0,0 in discrete system of pixels could be:



    in case A we have an odd number of pixels both vertically and horizontally, so 0,0 is exactly in the center
    in case B we have an even number of pixels both vertically and horizontally; 0,0 is not in the center and so it doesn't seem consistent with coordinates system.

    I need to know how you are converting pixels in coordinates to set the correct pixel for 0,0. Can't you work with centimeters, instead pixels? Why do you need this pixel?

    anyway I have re-uploaded images, because in my previous version there was something wrong. It's strange, but now it seems correct (even if a bit smaller).

    When we retrieve unit campaign co-ordinates, we will round them off to the nearest whole number (rather than X: 124.0355, Y: -56.0254). We will then find the corresponding pixel on your image and check it's colour to determine whether there is attrition here or not. But the problem with this is that the pixel 0,0 will be at the top left of the image, and the image has no negative pixel co-ordinates. So to solve this problem we do a little mathmatical translation. Let us assume that 0,0 in game is in the enter of the game's world, not nearby London as we know it to be. We also know that the game's co-ordinates have the following properties:
    x range = -1280,1280
    y range = -640,640
    So next we divide the range of both X and Y in two, and get the numbers 1280 (x) and 640 (y). We then use these numbers to adjust the pixel co-ordinates of the image for the game, by subtracting 1280 from any X pixel co-ordinate and 640 from any Y co-ordinate.

    So if your image was 2560 X 1280, the centre point would be at co-ordinate 1280, 640. So we would do our subtraction and get the resulting position 0,0. Which would equal 0,0 in game.

    Now, the problem with that is 0,0 isn't in the centre of the in game world; it's at Greenwich, London as it is in real life. So we need you to mark 0,0 on the image in order to determine the correct figures for x and y translation.

    And no, we can't work with centimetres as we need to reference pixels explicitly in the C# code in order to check their colours.

    N.B. You're also slightly mistaken - 0,0 does not equal the centre of all co-ordinate maps; it is just the point most commonly used. In an irregular map you should not try to equate 0,0 to the centre of it. A prime example is ETW's map. 0,0 is far from the centre of the in game world in that instance.
    Last edited by T.C.; August 06, 2012 at 05:40 PM.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  17. #17
    Ordinarius
    Join Date
    Jul 2009
    Location
    Italy
    Posts
    737

    Default Re: ETW Runtime Memory Stucture Documention

    no you are mistaken

    0,0 is exactly the center of Empire map, and it is southern of gulf of Guinea, not in London

    I have plotted all coordinates of Empire; I can state it with certainty.

    Greenwich is just the 0 meridian in real life

    PS: don't forget to use my latest uploaded image
    Last edited by PietroMicca; August 06, 2012 at 06:10 PM.

  18. #18
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: ETW Runtime Memory Stucture Documention

    Your latest image works great.

    The problem with the first one was that the Y axis was off, I could plot the X axis perfectly but then the Y would always be off.

    For anyone interested, to get the pixel in relation to a coordinate and see if the pixel is an attrition pixel my functions inside the program are as such:

    Probably of interest to nobody.
    Spoiler Alert, click show to read: 

    Convert Coordinates to pixel point.
    Code:
    private Point GetPixelFromCoords(int coordX, int coordY)
    {
    int pixelX = (imageMap.Width / 2) + (coordX * (imageMap.Width / 2560)); int pixelY = (imageMap.Height / 2) - (coordY * (imageMap.Height / 1280)); return new Point(pixelX, pixelY);
    }
    Return bool of whether given pixel is an attrition pixel.
    Code:
    private bool IsPixelAttrition(Point pixel)
    {
    Color pixelColour = imageMap.GetPixel(pixel.X, pixel.Y); if (pixelColour != Color.White) {
    return true;
    } return false;
    }


    Thank you Pietro.

  19. #19
    Ordinarius
    Join Date
    Jul 2009
    Location
    Italy
    Posts
    737

    Default Re: ETW Runtime Memory Stucture Documention

    I look forward to see attrition working in Empire

  20. #20

    Default Re: ETW Runtime Memory Stucture Documention

    Brilliant stuff! The Lua implementation is finished, now all we need to do is see how efficiently Lua and the C# program communicate.
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

Page 5 of 8 FirstFirst 12345678 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •