Topic: New roads
kaputtnik Topic Opener |
Posted at: 2015-01-27, 21:33
Yes, i think its really good: I tried to get a closer look into the code, but as i am about 20 years away from C++ i would request someone else to implement the code for tribe specific roads... Edited: 2015-01-27, 21:34
Fight simulator for Widelands: |
SirVer |
Posted at: 2015-01-28, 07:38
I am really eager getting the tribe specific roads into the game. I am pretty busy, so no idea if I can make it this week though... Top Quote |
GunChleoc |
Posted at: 2015-01-28, 14:51
I have continued fiddling: https://code.launchpad.net/~widelands-dev/widelands/busy_roads_for_buildings I have added the texture filenames to FieldsToDraw::Field for the field owner's tribe. All I need to do now is to correctly assign glBindTexture in RoadProgram::draw, but I don't know how that works. Busy indexing nil values Top Quote |
kaputtnik Topic Opener |
Posted at: 2015-01-28, 15:47
i did nearly the same as you did....
Now are the roadtypes tribe specific, so, i think, the roadprogram needs to know about, which tribe he should use for drawing the corresponding roads.... But storing only the strings Edited: 2015-01-28, 15:48
Fight simulator for Widelands: |
dershrimp |
Posted at: 2015-01-28, 15:49
I just saw the picture above and I love it, really cool idea to change the look of the roads. Nice work. Looking forward to see them in game. Top Quote |
Rayback |
Posted at: 2015-01-28, 16:11
amazing (ignore my signature) Edited: 2015-01-28, 16:12
Top Quote |
GunChleoc |
Posted at: 2015-01-28, 16:50
I managed to give the roadprogram the info, my problem is in how to apply it. Edited: 2015-01-28, 16:50
Busy indexing nil values Top Quote |
SirVer |
Posted at: 2015-01-28, 17:59
So my approach to this problem would be:
This allows for more than one road texture for each roadtype and tribe and allows for a lot of variations and is pretty straightforward to implement. Gun, if you can do the first step, I think I can do the rest. Top Quote |
kaputtnik Topic Opener |
Posted at: 2015-01-29, 10:35
If possible, the new code should allow future use of terrain-dependend roads. If so we could make e.g pebbly mountain roads, sandy beach roads, muddy meadow roads and so on. This will also making roads easier, because one road must not contrasts to all terrains. Maybe i (we) had thought about such roads earlier instead of making tribe specific roads... Fight simulator for Widelands: |
GunChleoc |
Posted at: 2015-01-29, 11:32
With the tribe specific roads, we can have both. I am creating a new enum with road texture types, and we could add road types for different terrains there as well. We can then query the terrain type from the field's TerrainDescription in the GameRenderer to pick the correct texture. For the tribes, I am putting the texture filenames into a map, so we can expand easily. Edited: 2015-01-29, 11:33
Busy indexing nil values Top Quote |