Home » MODDING HQ 1.13 » v1.13 Idea Incubation Lab » Extended Tilesets
| Extended Tilesets[message #315423]
|
Thu, 14 February 2013 20:00
|
|
Shuwar |
 |
Messages:18
Registered:September 2010 |
|
|
Hello!
It's been a long time since I was here last time 
Here's orginal (dead) topic - http://www.ja-galaxy-forum.com/board/ubbthreads.php/topics/285033/1.html . So after a long break, I'm back, and here's what I have done so far.
First off, I changed three functions in TileEngine/worlddef.cpp: SaveWorld, LoadWorld and EvaluateWorld to save tiles id bigger than 255. This causes that old maps won't work anymore, to start editor copy included A9.dat map to maps dir.
After that, I managed to add new tile slots, so now there's:
TERRAIN
- Banks And Cliffs: now have only cliffs elements, no fences.
- Roads: no change.
- Debris: 50 slots, 25 sub images.
- Trees: 50 slots, no change in sub images.
- Ostruct 1: 50 slots, 25 sub images (now here can be placed fences)
- Ostruct 2: 50 slots, 25 sub images
BUILDINGS
- Walls: 50 slots, no change in sub images
- Doors: 50 slots, no change in sub images
- Roofs: 50 slots, 32 sub images; Slant Roofs: 25 slots, no change in sub images
- Furniture 1: 50 slots, 25 sub images
- Furniture 2: 50 slots, 25 sub images
- Floors: 50 slots, no change in sub images
- Wall Decals: 50 slots, 25 sub images
And finally I changed Editor/selectwin.cpp to show all new tiles slots in editor.
So far I noticed three errors: smart wall placing method is messed up, I can't figure out how to properly display trees in editor select window and finally the biggest one: there's error in TileEngine/Tile Animation.cpp at line 262.
Assert( gTileDatabase[ usTileIndex ].pAnimData != NULL );
pNewAniNode->usNumFrames = gTileDatabase[ usTileIndex ].pAnimData->ubNumFrames;
I don't know how to fix that, so I just commented this two lines for tests - from what I see, there's no other errors with this.
Here's source code and game files: http://www.speedyshare.com/tBenv/ExTiles.rar .
I think we should discuss how many tiles slots we need - I wrote a small php script to generate tiledat.cpp, tiledat.h and ja2set.dat.xml files with new tiles slots, so changing slots numbers is not a problem - it's quick and painless 
To be honest - my programming skills are low, what I could done is done, the rest is in your hands
Report message to a moderator
|
Private
|
|
|
|
|
|
|
|
|
|
| Re: Extended Tilesets[message #315452]
|
Fri, 15 February 2013 07:17 
|
|
Shuwar |
 |
Messages:18
Registered:September 2010 |
|
|
Did I really wrote somewhere that it's final version? I posted it here, becouse I need you help - so dudes, just chill out, and maybe try to help.
DepressivesBrotAdd "no mention on which version of the code this is based" to the list of gripes.
And yeah, this looks a lot like a prototype hacked together between breakfast and bbq, lot's of issues to address before even thinking about "how many slots to add"
Yeah, I forgot about mentioning code verstion - it's from SVN repostitory, downloaded on 2nd February (5521). Like I said before, the number of slots can be changed very quickly, I wrote here to get feedback how many slots we need.
smeagolShuwar This causes that old maps won't work anymore, to start editor copy included A9.dat map to maps dir.
You're joking, right?
Good luck finding someone for the map work.
Totally killing off backwards compatability is probably not the way to go on extending tilesets...
Why old maps won't work? First - becouse now the tile id is saved to map in two bytes, so we can have more than 255 tiles slots. Second - after adding new tiles slots, numeration of old tile slots is changed, so old maps won't load properly (tiles will be replaced by other).
There's two ways to manage that - include two "methods" to load and save maps - one for old maps, second for the extended tiles, like for bigger maps - there is checkbox to save map in old system or new, 1.13 system.
Second way is to convert all maps - loading original maps with one byte tile id and saving them with two bytes tile id is not a problem. Problem is to change tiles ids numbers from old tiles slots numeration to new numeration. I think we can do this while we are loading map from file - eg. we have a wall (tile id 36, file build_01.sti), so we check where in new numeration is build_01.sti, and change 36 to new tile slot id.
I think first option is better, becouse every map will work witchout conversion.
Flugentei am normally not rude, but.. no backwards compatibility? Your code doesn't even compile? And now you suggest others take that over?
Good luck with that.
Why my code dosen't compile? It's working (here's compiled files - http://www.speedyshare.com/xXGNF/ExTilesE.rar), only error I get is this mentioned earlier - http://picsee.net/upload/2013-02-15/73aa149992b2.png (this error appears when bullet hit the ground) - and it's another reason why I'm writing here. So maybe before you will start bitching, you will try to help and finally 1.13 will have this feature, becouse bigger maps are missing it so much.
[Updated on: Fri, 15 February 2013 07:18] by Moderator Report message to a moderator
|
Private
|
|
|
|
| Re: Extended Tilesets[message #315453]
|
Fri, 15 February 2013 11:03 
|
|
Buggler |
 |
Messages:211
Registered:November 2009 |
|
|
Could I say, in summary, there's some things that require expert knowledge/consensus in order to bring 'Extended Tilesets' to the next development stage.
Expert Coders' assistance to resolve:
1. smart wall placing method
2. properly display trees in editor select window
3. error in TileEngine/Tile Animation.cpp at line 262
Link up w Flugente & JMich(?) as they previously had a look at extending e tileset feature. They may hav EUREKA! what u r facing now.
Expert Modders/Mapmakers' assistance to determine:
- New increased tileslots space to b set aside/allotted in e extended tiles for each & every category
Quote:After that, I managed to add new tile slots, so now there's:
TERRAIN
- Banks And Cliffs: now have only cliffs elements, no fences.
- Roads: no change.
- Debris: 50 slots, 25 sub images.
- Trees: 50 slots, no change in sub images.
- Ostruct 1: 50 slots, 25 sub images (now here can be placed fences)
- Ostruct 2: 50 slots, 25 sub images
BUILDINGS
- Walls: 50 slots, no change in sub images
- Doors: 50 slots, no change in sub images
- Roofs: 50 slots, 32 sub images; Slant Roofs: 25 slots, no change in sub images
- Furniture 1: 50 slots, 25 sub images
- Furniture 2: 50 slots, 25 sub images
- Floors: 50 slots, no change in sub images
- Wall Decals: 50 slots, 25 sub images
Smeagol, wil473, Jasmine, Hawkeye r e active ones that I can recall.
As e tile id is saved in 2-bytes, we could technically hav a max limit of 65k+ tileslots but that's way overkill & potentially affecting performance.
Since there will b reordering, considerations should be thought out for future inclusions of other possible tilesets (grassland, swamp, tropical, cities, desert, snow, water etc.) or juz 1 humongous tileset with ample space to addon.
Somewhere btw 512-8192 limit? It's up to e modders' consensus.
Quote:Problem is to change tiles ids numbers from old tiles slots numeration to new numeration. I think we can do this while we are loading map from file - eg. we have a wall (tile id 36, file build_01.sti), so we check where in new numeration is build_01.sti, and change 36 to new tile slot id.
Currently there's already a map-editor option to save map in vanilla Ja2 (v1.12) format. I assumed Smeagol's Big Maps will fall under e 'New Map' category & hence need to go thru e auto-conversion. Correct?
W the big maps using different tilesets, will there b a lot of work in adding & matching tiles?
Quote:from SVN repostitory, downloaded on 2nd February (5521)
It's e latest version as of 20130202 which is r5828 rather than e r5521 dated on 20120824 right?
Cheerz,
Buggler
Report message to a moderator
|
Sergeant 1st Class
|
|
|
|
|
|
| Re: Extended Tilesets[message #315555]
|
Mon, 18 February 2013 16:46
|
|
The_Bob |
 |
Messages:415
Registered:May 2009 Location: Behind you. |
|
|
WTF these aren't the responses I'd expect for a project like this. It's not like this is the first semi-finished work that's been posted here. I suppose this has more to do with failed expectations than it does with the quality of the work in question.
Although I agree that breaking compatibility is not an option, this could be fixed by an old format loader/converter added to the project.
I'm not sure where does this stand relative to what Flugente did with common tilesets (that one with 65k tiles that should be usable independent of the loaded tileset). As I understand it, Shuwar's work allows for larger tilesets to be constructed, while Flugente's work sticks to the old tilesets supplemented with a huge library of common stuff. But is the latter already integrated into the trunk and used by anyone?
Anyhow, Shuwar, dropping your semi-finished work and expecting someone to pick it up and fix it for you won't really work here. Take a look a few pages down, there's plenty of ambitious projects that were forgotten because authors left them in an unworkable state. The key here is getting your code to the point it seems feasible to use, so any unlikely person who wants to help out will be tasked with fixing some bugs rather than getting the thing to actually work.
You'll definitely have to write (hack together?) a converter for the old map format so everything made to this point won't have to be discarded, as well as fix the tree selector and other glaring bugs, to make this, at least, seem to work at face value.
Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Fri Jun 12 02:37:49 GMT+3 2026
Total time taken to generate the page: 0.00733 seconds
|