Author Topic: Pokemon Topaze (Axe)  (Read 126464 times)

0 Members and 1 Guest are viewing this topic.

Offline deeph

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 138
  • Rating: +6/-0
    • View Profile
    • deeph.servhome.org
Re: Pokemon Topaze (Axe)
« Reply #255 on: March 16, 2013, 05:40:30 am »
No, I have more than 77 tiles. I see a "r1<229" in the code, and even if there are some blanks somewhere, I think it is still over 127 :(
For the trainer, there are two kinds of them: the ones that you must beat (they are blocking the road) and that can beat only once, and the ones that you don't have to beat, but you can beat them as many times as you want. For the ones blocking the road, yeah, you have to beat them in order.

Why do you have so much tiles ? To handle events ("teleportations" etc...) ? This said, the datas I posted earlier may not be usable : I haven't check if the tile ID was under 127 before changing its 7th bit, but without doing it the map is still compressed to 80% (2220 bytes) :

Spoiler For compressed map only using horizontal RLE:
F019052702640527051905200266052005190C2005191201819150051901270A00127051901200A00120051901200A001201C190E270519150051901270A00127051901200A00120051901200400123012404001201C1901270C00127051915005190127010022701280114010012802270100127051901200300128011401001280300120051901200400122012501103001201C1901270A001740100127051915005190127030012802001280300127051901200300128020012803001200519012003001140220011030012005191227051901270C00127051915005190127020012701280200128012702001270519012003001280200128030012005190120030016906001200519012705001140A00127051901270300A2705191500519012703001280200128030012705190120030012802001280300120051901200A00120051901270500180A001270519012703001270E1915005190C2705190C2005190C200519012702001730200180A001270519012703001270E19150381901270C00127030012705190127010017501001270E19150381901270C001270300127051905270E1915038190B2702001270300127651901270700118040012703001273219052002630520051905200265052005190A270519032707001900400127030012732190120013012006001200130120051901200A001200519012703001140400127051901270900127040011403001270519162707190A20061901200130220040022001301200519012002001200400120020012005190327040032705190127011202806001270400180300127051901270900114080011801001270719012005001140121010012006190120023012001280118010012801200230120051901200100120010012801180100128010012001001200519012708001270519012709001270400180300127051901270900192080018010012707190120080012006190120023012001280200128012002301200519012001001200100128020012801001200100120051901270100112038030012705190127090012704001803001270519012709001920800180100127071901200800120061901200130220012802001280220013012005190120020012001280200128012002001200519012708001270519082702680A27051901270400A27010018040012706190520020052005190120013012001001280200128010012001301200519012003001280200128030012005190127060011001001271E190127025803270600427011104001270619080038011305190C2005190C200519012708001272319012701001760500427040012706190100121020012102001210200121010271904270267042723190127080032704001270619011202809036191310B1906270400191050012706190100121010011401210200121020012101036190110130440150B002103190720519012704001910500127061903001808036190110660C003102206005190127040011105001270619030018040011003011190262061901202561120519051026014303602001301401507001140A005190C270619030018080111902006190120200120F001205190110C00160180160700135060014030171905002590501119020061901201120180120F001205190110C0016010016070013509001228190410200120011030012002006190120200120200B20200120519011040011611001350900122819041010011012001101200118010012002006190120200120200120100114030012060012051901113006102205001205190500421A1905001103200110220020061901205001201001803001206001205190110D001140500110619012050012051908001205190527051906005190210C0061901205004202001201120180520519011030013024015011020013014015060011061901205001205190200140500120519012701001780100127051906005190210C006190A20200120200520519011030016019010016011020016017016060011061907205190120700120519012703001270519060051901120110C00619012120012051901103001602301601102001601001606001112190120700120519012703001270919020051901001200C0061901201120280F001205190110700110B001112190120700120519012703001270919020051902200500261050061901212001205190110700110B0011121901201120280400120519012703001270919020191908202550A205190C10300120510B19082070012051901270300527051902037190720400120700819012053011080012051901270700127051902037190120A001207008190120530110500420519012707001273E190120A0013604001402008190120610500120819052703001270C1907270250927031918005190120A0012060012081901201120180900120819052703002270B19012701140170100127080011803001270F190C005190120A001206001208190120B00120C190127040072705190127018020012708001803002270E190C0051902202570F208190120B00120C1901270A0012705190127030012708001803002270E190C020190120400820519020051904270600177012705190127011201801005270114080062709190C02019012039301130820519020081901270700127

For the compression, wow, that is very compressed O.O
What could be possible, instead of having it divided in parts, would be to have it in one compressed part but uncompressing small parts, this way, there would only be one map file and not too much slowness (only when going from one part to another) :)

Yeah I guess you can do it before teleporting the player, you'll just have to define the small areas before.

No, you don't walk on top of a trainer to battle them, you walk on the dots right in front of them :P
And yeah, my only variable (that I called TrainerNumber in this explanation but that is not called like that in the code :P) handles all the trainers for now.
But what I was worried about was that adding a table of coordinates would be stupid because it would be saving data by adding data, but now, seeing how Deeph compressed my map, I think that the table of coordinates won't be over 9000 so it would still save space, so it is a good idea :)

If you don't plan to complexify your current system there's no need to add tables, but to my part I think I'm going to handle trainers as events (every step the players does, I'll check if it's in the sight of some trainers, this way I could even handle moving trainers).

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Pokemon Topaze (Axe)
« Reply #256 on: March 16, 2013, 12:34:56 pm »
No, I have more than 77 tiles. I see a "r1<229" in the code, and even if there are some blanks somewhere, I think it is still over 127 :(
For the trainer, there are two kinds of them: the ones that you must beat (they are blocking the road) and that can beat only once, and the ones that you don't have to beat, but you can beat them as many times as you want. For the ones blocking the road, yeah, you have to beat them in order.

Why do you have so much tiles ? To handle events ("teleportations" etc...) ? This said, the datas I posted earlier may not be usable : I haven't check if the tile ID was under 127 before changing its 7th bit, but without doing it the map is still compressed to 80% (2220 bytes) :

Spoiler For compressed map only using horizontal RLE:
<snipped again :P>
Yeah, teleporting carpets and doors for example, all have their own number. What could be done for them would be a stupid thing like ".db 1,door". That would of course waste one byte since that won't use the 7th bit trick, but they are not so many. And carpets usually go by two so that would be ".db 2,carpet" which doesn't waste anything :)
And the 7th bit trick would be reserved to more usual tiles like trees and such, with numbers under 127 :)
(I should put that on my to do list as soon as I get on the right PC -.-°)

For the compression, wow, that is very compressed O.O
What could be possible, instead of having it divided in parts, would be to have it in one compressed part but uncompressing small parts, this way, there would only be one map file and not too much slowness (only when going from one part to another) :)

Yeah I guess you can do it before teleporting the player, you'll just have to define the small areas before.
I think that they would not be very complicated, like squares, all with the same dimension and all :P
A separation could be right in the middle of a town but I don't think uncompressing will be too slow since nothing happens during that process. I recall the true Pokemon Yellow having small latencies at the border of towns (where the color of the environnment changes) and I guess it is because they must use this kind of uncompression.

No, you don't walk on top of a trainer to battle them, you walk on the dots right in front of them :P
And yeah, my only variable (that I called TrainerNumber in this explanation but that is not called like that in the code :P) handles all the trainers for now.
But what I was worried about was that adding a table of coordinates would be stupid because it would be saving data by adding data, but now, seeing how Deeph compressed my map, I think that the table of coordinates won't be over 9000 so it would still save space, so it is a good idea :)

If you don't plan to complexify your current system there's no need to add tables, but to my part I think I'm going to handle trainers as events (every step the players does, I'll check if it's in the sight of some trainers, this way I could even handle moving trainers).
But how will you handle the fact that trainers can have different range of view ?
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline deeph

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 138
  • Rating: +6/-0
    • View Profile
    • deeph.servhome.org
Re: Pokemon Topaze (Axe)
« Reply #257 on: March 16, 2013, 01:59:01 pm »
Yeah, teleporting carpets and doors for example, all have their own number.
You mean each one, right ? Cause I think you can easily guess which door (with the same tile for all, if that's not the case) the player have crossed by comparing its coordinates (x*y*map width) with a list like that : ".dw door_01_coordinate,pointer_to_teleporting_handler_01,etc...".

Don't know if you can do this in Axe, though.

What could be done for them would be a stupid thing like ".db 1,door". That would of course waste one byte since that won't use the 7th bit trick, but they are not so many. And carpets usually go by two so that would be ".db 2,carpet" which doesn't waste anything :)
And the 7th bit trick would be reserved to more usual tiles like trees and such, with numbers under 127 :)

Yeah but take care not to have the same tiles repeated horizontaly more than 127 times, else it will mess up the decompression (for example, you can't differenciate 143 tiles with the tile #15 alone, in both cases that'll give %10001111).

I think that they would not be very complicated, like squares, all with the same dimension and all :P
A separation could be right in the middle of a town but I don't think uncompressing will be too slow since nothing happens during that process. I recall the true Pokemon Yellow having small latencies at the border of towns (where the color of the environnment changes) and I guess it is because they must use this kind of uncompression.

Uncompressing the beginning of the datas is fast, but not the end, that's why it would be more convinient to do it while teleporting the player.

But how will you handle the fact that trainers can have different range of view ?

I'll just define that for each one, I guess.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Pokemon Topaze (Axe)
« Reply #258 on: March 16, 2013, 02:13:52 pm »
Yeah, teleporting carpets and doors for example, all have their own number.
You mean each one, right ? Cause I think you can easily guess which door (with the same tile for all, if that's not the case) the player have crossed by comparing its coordinates (x*y*map width) with a list like that : ".dw door_01_coordinate,pointer_to_teleporting_handler_01,etc...".

Don't know if you can do this in Axe, though.
Yeah, for now each one has a specific tile number.
And of course your method is doable in Axe, everything that is possible in ASM is possible in Axe, the differecne is just a matter of speed (like a raycaster might not run very fast in Axe but it would still run).
Also, you wrote x*y*map_width, but I assume that the first "*" is meant to be a "+" right ?
And I thought about something that could work too, since usually, doors are coupled by pairs, one leading to another, so this would be possible, where 2n is the number of doors:
-having a list like that door(1)coordinates,door(2)coordinates,...door(n)coordinates,door(n+1)coordinates,door(n+2)coordinates,...door(2n)coordinates
-then, when you hit the door k, it teleports you to the door k+n or k-n (basically the door k+n modulo 2n I guess) :)

What could be done for them would be a stupid thing like ".db 1,door". That would of course waste one byte since that won't use the 7th bit trick, but they are not so many. And carpets usually go by two so that would be ".db 2,carpet" which doesn't waste anything :)
And the 7th bit trick would be reserved to more usual tiles like trees and such, with numbers under 127 :)

Yeah but take care not to have the same tiles repeated horizontaly more than 127 times, else it will mess up the decompression (for example, you can't differenciate 143 tiles with the tile #15 alone, in both cases that'll give %10001111).
Yeah, in that case, if n is the number of tiles, I would just do ".db 127,tile,n-127,tile" ;)

I think that they would not be very complicated, like squares, all with the same dimension and all :P
A separation could be right in the middle of a town but I don't think uncompressing will be too slow since nothing happens during that process. I recall the true Pokemon Yellow having small latencies at the border of towns (where the color of the environnment changes) and I guess it is because they must use this kind of uncompression.

Uncompressing the beginning of the datas is fast, but not the end, that's why it would be more convinient to do it while teleporting the player.
Well, It will be slower for the "end" of the map but I think it will be still bearable for users to have a little map change sometimes, if that is not too often, that should not take more than 2 seconds :)
Else, there could be 2 decompression routines, one uncompressing "from left to right", the other one "from right to left', this way, it will be slower in the middle but still quite fast everywhere ;)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline deeph

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 138
  • Rating: +6/-0
    • View Profile
    • deeph.servhome.org
Re: Pokemon Topaze (Axe)
« Reply #259 on: March 16, 2013, 03:35:19 pm »
Also, you wrote x*y*map_width, but I assume that the first "*" is meant to be a "+" right ?

Yeah that's what I meant.

And I thought about something that could work too, since usually, doors are coupled by pairs, one leading to another, so this would be possible, where 2n is the number of doors:
-having a list like that door(1)coordinates,door(2)coordinates,...door(n)coordinates,door(n+1)coordinates,door(n+2)coordinates,...door(2n)coordinates
-then, when you hit the door k, it teleports you to the door k+n or k-n (basically the door k+n modulo 2n I guess) :)

Yes it would work, but in my case I'll need to know the map ID too. Plus I was thinking of placing teleporters to the same pokecenter (to win space) through the whole game, so it won't work whithout some more datas (where was the player before enter...). Currently you have as many pokecenters as towns, right ?

Erf, I've just found a bug in my compression program, which caused to misread hex numbers... Looks like the compressed map using horizontal RLE+7th bit trick+more than 127 tiles will finaly takes 4712 bytes (57%, and RLE only will take much more)  x.x

Though, that's not that bad :P

Spoiler For Compressed map using horizontal RLE+7th bit trick+more than 127 tiles:
8019939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939B9B9B9B9BC0C09B9B9B9B9B93939393939494949494C2C294949494949393939393949494949494949494949494939393939380808080808080808080808080808080808093939393939393939393939393939393939393939393939380808080808080808080808080808080808080808093939393939B0A009B939393939394020005000300949393939393940A0094939393939393939393939393939393939393939393939393939393939B9B9B9B9B9B9B9B9B9B9B9B9B9B939393939380808080808080808080808080808080808080808093939393939B0A009B9393939393940200050003009493939393939404009798040094939393939393939393939393939393939393939393939393939393939B8080808080808080808080809B939393939380808080808080808080808080808080808080808093939393939B809B9B9C8E809C9B9B809B93939393939403009C8E809C03009493939393939480030096998180020094939393939393939393939393939393939393939393939393939393939B80808080808080808080CA809B939393939380808080808080808080808080808080808080808093939393939B03009C02009C03009B9393939393940200809C02009C0300949393939393948002008E9494818002009493939393939B9B9B9B9B9B9B9B9B9B9B9B9B9B9B9B9B9B93939393939B8080808080808080808080809B939393939380808080808080808080808080808080808080808093939393939B02009B9C02009C9B02009B9393939393940200809C02009C0300949393939393940300C506009493939393939B80808080808E808080808080808080809B93939393939B8080809B9B9B9B9B9B9B9B9B9B939393939380808080808080808080808080808080808080808093939393939B03009C02009C03009B93939393939403009C02009C0300949393939393940A009493939393939B808080808088808080808080808080809B93939393939B8080809B939393939393939393939393939380808080808080808080808080808080808080808093939393939B9B9B9B9B9B9B9B9B9B9B9B9393939393949494949494949494949494939393939394949494949494949494949493939393939B8080C9808088808080808080808080809B93939393939B8080809B939393939393939393939393939380808080808080808080808080808080808080808093939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939B8080808080808080808080809B8080809B93939393939B80CB809B939393939393939393939393939380808080808080808080808080808080808080808093939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939B8080808080808080808080809B8080809B93939393939B9B9B9B9B939393939393939393939393939380808080808080808080808080808080808080808093939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939B9B9B9B9B9B9B9B9B9B9B80809B8080809B93939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939B8080808080808092808080809B8080809B93939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939494949494BFBF949494949493939393939494949494C1C1949494949493939393939B9B9B9B9B9B9B9B9B9B93939393939B9B9B80808080808080DA808080809B8080809B939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939394839406009483949393939393940A009493939393939B03008E04009B93939393939B8080808080808080809B808080808E8080809B93939393939B9B9B9B9B9B9B9B9B9B9B9B9B9B9B9B9B9B9B9B9B9B93939393939393949494949494949494949393939393939483949404009494839493939393939402009404009402009493939393939B9B9B04009B9B9B93939393939B8C88888080808080809B80808080888080809B93939393939B8080808080808080808E808080808080808092809B93939393939393940400808E958094939393939393948383949C92809C948383949393939393948094809C92809C8094809493939393939B08009B93939393939B8080808080808080809B80808080888080809B93939393939B808080808080808080DC808080808080808088809B9393939393939394080094939393939393948383949C02009C948383949393939393948094809C02009C8094809493939393939B808C88888803009B93939393939B8080808080808080809B80808080888080809B93939393939B808080808080808080DC808080808080808088809B9393939393939394080094939393939393948394949C02009C949483949393939393940200949C02009C9402009493939393939B0200030003009B93939393939B9B9B9B9B9B9B9BC4C49B9B9B9B9B9B9B9B9B9B93939393939B808080809B9B9B9B9B9B9B9B9B9B8088808080809B9393939393939494949494020094949494949393939393948394809C02009C8094839493939393939403009C02009C03009493939393939B02000300808A809B9393939393939393939393939393939393939393939393939393939393939BBABA9B9B9B8080808080809B9B9B9B8B808080809B93939393939308008888888D9393939393949494949494949494949494939393939394949494949494949494949493939393939B08009B93939393939393939393939393939393939393939393939393939393939393939393939B80CC80808080809B9B9B9B808080809B9393939393938095020095020095020095809393939393939393939393939393939393939393939393939393939393939393939393939393939B9B9B9BC3C39B9B9B9B93939393939393939393939393939393939393939393939393939393939393939393939B80808080808080809B9B9B808080809B9393939393938C88880900939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393130193939393939393939393939B9B9B9B9B9B80808080DB80808080809B9393939393938095808E950200950200958093939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939381830404850B000201939393070293939393939B80808080DB80808080809B939393939393030088030005009393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393938106060C000301020280808080808093939393939B808080808B80808080809B9393939393930300880300808A03009393939393939393939393939393939393BEBE93939393939382B8B81102939393939305010206AB0306020083848507008E040080808080808093939393939B9B9B9B9B9B9B9B9B9B9B9B939393939393030088080093939393939393939393939393939393930200939393939393820200820F00829393939393810C008688860700A3040080808480808093939393939393939393939393939393939393939393930500BBBB050093939393939393939393939393939393930200939393939393828C88820F00829393939393810C008680860700A309008293939393939393939393939393939393939393939393939393939393939393939393939393939393818181810200948103009402009393939393938280808202000B020200829393939393810400901100A309008293939393939393939393939393939393939393939393939393939393939393939393939393939393818181818081948194928094020093939393939382808082020082808E030082808080030082939393939381130006010202808080808082939393939380808080800402939393939393939393939393939393939393939393939393939305008194949481949402009393939393938280808080808280880300828080800300829393939393810D008E0500819393939393938280808080808293939393938080808004008293939393939B9B9B9B9B9393939393808080808080939393939381810C0093939393939382808080808004028080828C8805029393939393810300830204858102008384850600819393939393938280808080808293939393938080848004008293939393939B80CE809B9393939393808080808080939393939381810C009393939393930A0280808202000502939393939381030086898086810200868786060081939393939393070293939393938207008293939393939B8080809B939393939380808080808093939393938C810C00939393939393828080800A008080808080829393939393810300868383868102008680860600819393939393939393939393939393939393938204008080808293939393939B8080809B9393939393939393938080939393939380940C00939393939393828C88880A008080808080829393939393810700810B00819393939393939393939393939393939393938204008080808293939393939B8080809B9393939393939393938080939393939394940500BDBD0500939393939393828080800A008080808080829393939393810700810B0081939393939393939393939393939393939393828C8888808080808293939393939B8080809B9393939393939393938080939393939393939393939393939393939393939393939393930802B7B70A0293939393930C0103008205019393939393939393939393080204008080808293939393939B8080809B9B9B9B9B939393939380809393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939307020400820200808080808093939393939393938283838383838105008080808293939393939B808080808080809B93939393938080939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393938280808080060082020080808080809393939393939393828383838383810500040293939393939B808080808080809B939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939382808080800600A4020080808480809393939393939393820601030080808293939393939393939B9B9B9B9B8080809B9393939393939393939393939B9B9B9B9B9B9B85859B9B9B9B9B9B9B9B9B939393808080808080808080808080808080808080808080808080939393939382808080800600820600829393939393939393828C88070080808293939393939393939B9B9B9B9B8080809B9B93939393939393939393939B8E87809B8080808080808080928080809B9393939393939393939393939393938080808080808080808080809393939393820A008206008293939393939393938206008080808080829393939393939393939393939B808080809B9B9B9B9B9B9B93939393939B8880809B8080808080808080888080809B9B939393939393939393939393939380808080808080808080808093939393930202B9B90F0293939393939393938206008080808080829393939393939393939393939B808080808080808080809B93939393939B8080809B8080808080808080888080809B9B9393939393939393939393939393808080808080808080808080939393939393939393939393939393939393939393939393939393939393939382040008029393939393808093939393939B9B9B9B808080808080CD9B93939393939B8C88809B9B9B9B9B8E80808080808080809B9B9B9B9B9B939393939393939393808080808080808080808080939393939393939393939393939393939393939393939393939393939393939382DDDDDD8D08029393939393808093939393939393939B808080808080809B9393

Well, It will be slower for the "end" of the map but I think it will be still bearable for users to have a little map change sometimes, if that is not too often, that should not take more than 2 seconds :)
Else, there could be 2 decompression routines, one uncompressing "from left to right", the other one "from right to left', this way, it will be slower in the middle but still quite fast everywhere ;)

Yeah it would work, but you'll have to know when to use which one.

I still think that using small maps instead of a big one can allow you to gain speed and space.
« Last Edit: March 16, 2013, 04:03:29 pm by deeph »

Offline Dapianokid

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 539
  • Rating: +46/-27
  • That one dude
    • View Profile
Re: Pokemon Topaze (Axe)
« Reply #260 on: March 16, 2013, 03:42:24 pm »
I play pokemon like I breath. I'm good at it and I do it all the time. I played this game hardcore and within about 5 hours I had impressive stats. I was sad when the game maxed out!
Keep trying.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Pokemon Topaze (Axe)
« Reply #261 on: March 17, 2013, 06:21:24 am »
And I thought about something that could work too, since usually, doors are coupled by pairs, one leading to another, so this would be possible, where 2n is the number of doors:
-having a list like that door(1)coordinates,door(2)coordinates,...door(n)coordinates,door(n+1)coordinates,door(n+2)coordinates,...door(2n)coordinates
-then, when you hit the door k, it teleports you to the door k+n or k-n (basically the door k+n modulo 2n I guess) :)

Yes it would work, but in my case I'll need to know the map ID too.
This is why I wanted to divide the map in equal squares so the "map ID" can be obtained directly with the coordinates of the player ;)

Plus I was thinking of placing teleporters to the same pokecenter (to win space) through the whole game, so it won't work whithout some more datas (where was the player before enter...). Currently you have as many pokecenters as towns, right ?
Lolnope, I only have one PokeCenter. See the map in this post, you can see the only PokeCenter in the bottom left corner :P

Erf, I've just found a bug in my compression program, which caused to misread hex numbers... Looks like the compressed map using horizontal RLE+7th bit trick+more than 127 tiles will finaly takes 4712 bytes (57%, and RLE only will take much more)  x.x

Though, that's not that bad :P

Spoiler For Compressed map using horizontal RLE+7th bit trick+more than 127 tiles:
<hey, what did you expect :P>
Yeah, that is still half the size it originally takes :)

Well, It will be slower for the "end" of the map but I think it will be still bearable for users to have a little map change sometimes, if that is not too often, that should not take more than 2 seconds :)
Else, there could be 2 decompression routines, one uncompressing "from left to right", the other one "from right to left', this way, it will be slower in the middle but still quite fast everywhere ;)

Yeah it would work, but you'll have to know when to use which one.
And I thought about it during this night (:P), I discovered that there will probably be problems for the right to left uncompression due to the 7th bit trick :(

I still think that using small maps instead of a big one can allow you to gain speed and space.
Yeah, And I thought about something, there is no need to be several appvars in fact, just several maps in one appvar. This can be done easily if you know how much space takes every compressed map. Well yeah, that can do it :D

I play pokemon like I breath. I'm good at it and I do it all the time. I played this game hardcore and within about 5 hours I had impressive stats. I was sad when the game maxed out!
Lol ok, then I think what you could do is a savegame-hacking program to get back to a level under the max I should have put :P
You'll see, my savegame is quite well organized at the beginnig so you won't be lost if you try :)
I should put that max in my todo list too -.-°
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: Pokemon Topaze (Axe)
« Reply #262 on: March 17, 2013, 11:03:27 am »
Hayelia can you pm me the save state code you use for this project? If I use it you will get credit
This used to contain a signature.

Offline deeph

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 138
  • Rating: +6/-0
    • View Profile
    • deeph.servhome.org
Re: Pokemon Topaze (Axe)
« Reply #263 on: March 17, 2013, 11:53:45 am »
I've finally done an encoder/decoder that works :P

So the final size is... 3726 bytes (66%) :D

I had to be sure this time (:P), so I've managed to create a program that generates an image of the decoded map, and here it is :

Spoiler For map:

There are some tiles messed up because of the way I ripped them, but the compression works.

Of course you'll need to know how you'll handle map in the hypothetical future versions of Pokémon Topaze, so this may not be helpful, at least immediatly.

Otherwise this could help programing a map editor on PC, just like the one I use for Pokémon Monochrome, or the one I've done for project "juego".

If you want to see how the encoder/decoder works : Pokémon Topaze RLE+7th bit encoded map.zip

Lolnope, I only have one PokeCenter. See the map in this post, you can see the only PokeCenter in the bottom left corner :P

So how do you handle returns ? You're saving the player coordinates somewhere I guess.


And I thought about it during this night (:P), I discovered that there will probably be problems for the right to left uncompression due to the 7th bit trick :(

That's right, unless you don't have tiles with ID above 127 :-\

Yeah, And I thought about something, there is no need to be several appvars in fact, just several maps in one appvar. This can be done easily if you know how much space takes every compressed map. Well yeah, that can do it :D

And if you don't want to stop the scroll when the player reach the limits (like I'm doing in my version), I think you can make a routine that outputs a black tile if the mapper is asking for a tile which out of the map (this way you wont need to have so much $19 :P).

Offline Dapianokid

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 539
  • Rating: +46/-27
  • That one dude
    • View Profile
Re: Pokemon Topaze (Axe)
« Reply #264 on: March 17, 2013, 11:59:49 am »
Thank you for recommending I hack it! I'll get right on it! I immediately just decided to use calcsys to get by, but I love to spend some time hacking someone elses code! :)
Keep trying.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Pokemon Topaze (Axe)
« Reply #265 on: March 17, 2013, 12:54:48 pm »
I've finally done an encoder/decoder that works :P

So the final size is... 3726 bytes (66%) :D

I had to be sure this time (:P), so I've managed to create a program that generates an image of the decoded map, and here it is :

Spoiler For map:

There are some tiles messed up because of the way I ripped them, but the compression works.

Of course you'll need to know how you'll handle map in the hypothetical future versions of Pokémon Topaze, so this may not be helpful, at least immediatly.

Otherwise this could help programing a map editor on PC, just like the one I use for Pokémon Monochrome, or the one I've done for project "juego".

If you want to see how the encoder/decoder works : Pokémon Topaze RLE+7th bit encoded map.zip
Yeah, there are some messed up tiles (where are the doors ? :P) but it seems to work pretty well anyway :D
Great work !

Lolnope, I only have one PokeCenter. See the map in this post, you can see the only PokeCenter in the bottom left corner :P

So how do you handle returns ? You're saving the player coordinates somewhere I guess.
Yes, and this is why there was a bug sometimes that teleported you to a random place when you lose a battle instead of leading you to the last PokeCenter, I somehow erased the saved coordinates :P

Yeah, And I thought about something, there is no need to be several appvars in fact, just several maps in one appvar. This can be done easily if you know how much space takes every compressed map. Well yeah, that can do it :D

And if you don't want to stop the scroll when the player reach the limits (like I'm doing in my version), I think you can make a routine that outputs a black tile if the mapper is asking for a tile which out of the map (this way you wont need to have so much $19 :P).
Yeah, this or having the uncompressing routine add automatically the $19 in the uncompressed map ;)

Thank you for recommending I hack it! I'll get right on it! I immediately just decided to use calcsys to get by, but I love to spend some time hacking someone elses code! :)
Great :D
I was thinking about a program that would hack the savegame to change the values in the appvar and that would display what you are changing exactly. That way, you could have published it for other people. But if you manage it with CalcSys, why not ? :)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline deeph

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 138
  • Rating: +6/-0
    • View Profile
    • deeph.servhome.org
Re: Pokemon Topaze (Axe)
« Reply #266 on: March 17, 2013, 05:07:21 pm »
Yeah, there are some messed up tiles (where are the doors ? :P) but it seems to work pretty well anyway :D

That's because the "mapper" don't know which tile to assign to the different teleporters/trainers/etc... But you know those values, and what's important is that it works. It'll even be helpful for my project, I guess I can add the compression option to my map editor (but right now I'm rather focusing on the battle system).

So what do you plan ? Making an asm version or improving the axe one (maybe later) ? :)

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Pokemon Topaze (Axe)
« Reply #267 on: March 18, 2013, 03:14:09 am »
So what do you plan ? Making an asm version or improving the axe one (maybe later) ? :)
Well restarting all in ASM would be quite hard o.o
So for now, I recruited one person to optimize the Axe version :P (because remember that I was a complete noob when I coded this so there is a lot to optimize).
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Pokemon Topaze (Axe)
« Reply #268 on: March 18, 2013, 05:23:53 am »
Another option for maps that gives you much more flexibility is using brushes. Each tile can take up the same size or you can create a table (i don't know how you'd do this in Axe):
.db 1,1,1,1,1,1
.db 1,1,0,1,1,1
.db 1,1,1,0,1,1
.db 1,2,2,2,1,1

.dw tile0addr
.dw tile1addr
.dw tile2addr

;first byte (.db) = list of actions:
;bit 0: passable
;bit 1: reduce random battle counter (things like grass or cave floors)
;bit 2: 2nd action (when you press 2nd some action pops up)
;bit 3: walking action (when you stop on a tile: doors, teleporters, etc)
;bit 4:
;bit 5: [whatever else you want]
;bit 6:
;bit 7:
;second byte = sprite number
;third byte+ (optional) = extra data (action number, text address, etc.)
tile0addr:
.db %00000001 ;not passable
.db 0
tile1addr:
.db %00000100 ;passable
.db 1
.db 0 ;we'll say action 0 = display some text
.dw text
tile2addr:
.db %00000010 ;passable, reduce random battle counter
.db 2

EDIT: This way you can also reuse tilesprites for many different tiles and give them different actions/properties.
« Last Edit: March 18, 2013, 05:24:39 am by chickendude »

Offline deeph

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 138
  • Rating: +6/-0
    • View Profile
    • deeph.servhome.org
Re: Pokemon Topaze (Axe)
« Reply #269 on: March 18, 2013, 05:58:28 am »
Well restarting all in ASM would be quite hard o.o

Not as easy as doing it in Axe, but you could still ask for help (and asm isn't that hard, specially since we have awesome tools like spasm/Wabbitemu/TilEm/etc...). But it's as you want, I just wanted to show you that technically Pokémon Topaze could fit into 27ko or less :P