Jump to content

nani

Community Members
  • Posts

    778
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by nani

  1. 1 hour ago, (-_-) said:

    Since 0ad svn came with the source of spidermonkey, I decided to have some fun and got a debug build of it (which allows disassembling bytecode).

    The following js code:

      Reveal hidden contents
    
    
    function doStuff()
    {
        for (var i = 0; i < 10; ++i)
        {
            var j = i*i;
        }
    }
    
    
    function doStuff()
    {
        var i;
        var j;
        for (i = 0; i < 10; ++i)
        {
            j = i*i;
        }
    }

     

    Produced a somewhat different bytecode. (complete output from the js shell)

      Reveal hidden contents
    
    
    flags:
    loc     op
    -----   --
    main:
    00000:  zero
    00001:  setlocal 0
    00005:  pop
    00006:  goto 38 (+32)
    00011:  loophead
    00012:  getlocal 0
    00016:  getlocal 0
    00020:  mul
    00021:  setlocal 1
    00025:  pop
    00026:  getlocal 0
    00030:  pos
    00031:  one
    00032:  add
    00033:  setlocal 0
    00037:  pop
    00038:  loopentry 129
    00040:  getlocal 0
    00044:  int8 10
    00046:  lt
    00047:  ifne 11 (-36)
    00052:  retrval
    
    Source notes:
     ofs line    pc  delta desc     args
    ---- ---- ----- ------ -------- ------
      0:    1     0 [   0] newline
      1:    2     0 [   0] newline
      2:    3     0 [   0] colspan 5
      4:    3     0 [   0] colspan 4
      6:    3     5 [   5] for      cond 32 update 20 tail 41
     10:    3    11 [   6] setline  lineno 5
     12:    5    11 [   0] colspan 1
     14:    5    12 [   1] setline  lineno 4
     16:    4    12 [   0] newline
     17:    5    12 [   0] colspan 5
     19:    5    26 [  14] xdelta  
     20:    5    26 [   0] setline  lineno 3
     22:    3    26 [   0] colspan 24
     24:    3    38 [  12] xdelta  
     25:    3    38 [   0] setline  lineno 5
     27:    5    38 [   0] setline  lineno 3
     29:    3    38 [   0] colspan 16
     31:    3    52 [  14] xdelta  
     32:    3    52 [   0] setline  lineno 5
     34:    5    52 [   0] colspan 6
    
    Exception table:
    kind      stack    start      end
     loop         0       11       52


     

    
    
    flags:
    loc     op
    -----   --
    main:
    00000:  getlocal 0
    00004:  pop
    00005:  getlocal 1
    00009:  pop
    00010:  zero
    00011:  setlocal 0
    00015:  pop
    00016:  goto 48 (+32)
    00021:  loophead
    00022:  getlocal 0
    00026:  getlocal 0
    00030:  mul
    00031:  setlocal 1
    00035:  pop
    00036:  getlocal 0
    00040:  pos
    00041:  one
    00042:  add
    00043:  setlocal 0
    00047:  pop
    00048:  loopentry 129
    00050:  getlocal 0
    00054:  int8 10
    00056:  lt
    00057:  ifne 21 (-36)
    00062:  retrval
    
    Source notes:
     ofs line    pc  delta desc     args
    ---- ---- ----- ------ -------- ------
      0:    1     0 [   0] newline
      1:    2     0 [   0] newline
      2:    3     0 [   0] colspan 4
      4:    3     5 [   5] newline
      5:    4     5 [   0] colspan 4
      7:    4    10 [   5] newline
      8:    5    10 [   0] colspan 5
     10:    5    15 [   5] for      cond 32 update 20 tail 41
     14:    5    21 [   6] setline  lineno 7
     16:    7    21 [   0] colspan 1
     18:    7    22 [   1] setline  lineno 6
     20:    6    22 [   0] newline
     21:    7    22 [   0] colspan 1
     23:    7    36 [  14] xdelta  
     24:    7    36 [   0] setline  lineno 5
     26:    5    36 [   0] colspan 20
     28:    5    48 [  12] xdelta  
     29:    5    48 [   0] setline  lineno 7
     31:    7    48 [   0] setline  lineno 5
     33:    5    48 [   0] colspan 12
     35:    5    62 [  14] xdelta  
     36:    5    62 [   0] setline  lineno 7
     38:    7    62 [   0] colspan 9
    
    Exception table:
    kind      stack    start      end
     loop         0       21       62

     

    Although none of these would lead to a significant performance gain or anything, it was interesting to see the difference.

    How about making a mini profiler for JavaScript mag gen? Knowing functions times and number of calls would allow to know where are the bottle necks. Some functions are called millions times for each map gen.:banana:

  2. version 0.2.6

    Added:

    • Link opener for the lobby (only)

    How does it work?

    /linklist: shows the links that did detect in lobby messages, will show a list with a number (index) for each link

    /link index: will open the link with the index specified, if no index is set will open link index = 0 (the more recent if no links then gives error message) 

    ** Each time it detects a new link it will add it to the list. The link list will be chronologically sorted from newest (index 0) to oldest.

    • Like 1
    • Thanks 1
  3. 1 hour ago, Palaiologos said:

    Nice map in theory. Some minor issues where you have resources that are inaccessible or there are 10 units stuck trying to reach a single tree.

    nani_1.png

    nani_2.png

    Very interesing :beta:

    Looking only at the image seems that the cause is probably addBluffs(...) function, that deep water  happens when the height is set to undefined value.

  4. MAP NAME: Riverway

    Hello again, new random map to share.

    DESCRIPTION:

    On 3/28/2019 at 9:39 PM, Hannibal_Barca said:

    The icecaps are melting, causing numerous problems such as polar bear migrations and rising sea levels. The snowy peaks of mount Vesuvius give way to volcanic rock yet again and the River Styx resurrects from its dry bed. Penguins and iguanas alike frolic in lukewarm waters as celtic tribals prepare for their annual bath. A truly enchanting map to play on, seeing as it comes in many sizes, colours and flavours.

    riverway.thumb.png.d04fb0482ab5911d52ef0a6d474f12d7.png

    This map is specially made for 1v1 2v2 3v3 4v4 team game as you can see.

    riverway_river_gaia.thumb.png.586d41696a95b3c99cd726a8cb12cd0a.png

    At each extreme of the river you can find gaia units protecting treasure bounty. Catch it if you can!

    riverway_river_stones.thumb.png.00d1e7492aa291123b67b6140e5fd9c2.png

    All resources are concentrated at the middle so be fast to defend your territory !

    Try it and give your opinion!

    DOWNLOAD LINK (mod)

    nani_maps_v0.10.0.pyromod

    AUTHOR@nani
    COAUTHOR: @Hannibal_Barca

     

    • Like 7
  5. On 8/15/2018 at 9:30 AM, Stockfish said:

       2) Send a message to the following email: 0a.dLeague@gmail.com with the following requirements:
            
                 * ID of you and your partner (Perfectly written)
                 * A capture of a conversation from you and your partner in which you explicitly see that your partner agree to be your teammate (in English)
                 * Name of your team and a square image that you want to have as logo
                 * ID of each player with the 3 civilizations that will be used during ALL THE LEAGUE

    Can we just send a private message to your account @Stockfish with all the info ?
    I'd prefer  not having to make yet another new email account ....

  6. 6 minutes ago, AnnoCrat said:

    ah I managed to display the skybox, if the map is circular, why is the skybox square? and why are the borders of the map crossing to the skybox still black? is it possible to make the skybox circular like the map itself?  @elexis

    Ps: is there somewhere a mod that has stonehenge for this game?

     

    screenshot0012.png

    As the name describes the skyBox is just a box with images on each face, in 0ad the skybox botom side is black because is not necessary for the game.

    https://en.wikipedia.org/wiki/Skybox_(video_games)

    • Like 1
  7. version 0.2.3

    Added:

    • Custom map size

    How does it work?

    /mapsize number : set map size

    ** minimum map size is 1,  minimum recommended is 50  if less than 128 is possible  starting cc wont appear)

    ** size maps refence:   tiny=126  normal=256  gigant=512   

    • Thanks 1
  8. version 0.2.2

    Added:

    • Custom starting resources
    • Custom population cap

    How does it work?

    type:

    /population  number   : set the population cap

    /resources   number  : set the starting resources ( the same  quantity for each type)

    /help   : to see all commands  possible

    • Thanks 1
  9. version 0.2.0

    Added:

    • Mute option for lobby
    • Mute option for gamesetup/ingame  ( another separated from lobby )

    How does it work?

    type:

    /mute playername     : adds player to your mute list
    /unmute playername   :deletes player from your mute list
    /muteclear    :deletes all mutes
    /mutelist       :shows the list of muted players

    • Thanks 2
×
×
  • Create New...