Topic: main roads becoming normal again
kaputtnik |
Posted at: 2015-04-28, 16:16
oh sorry, i meant it to be used here in forum. Just to show how the visual change will look .... Fight simulator for Widelands: |
einstein13 |
Posted at: 2015-04-28, 17:12
Ok, that sounds great I like the idea very much now But I'm not sure if the idea will be implemented. We have almost all needed information now It is time to testing einstein13 |
GunChleoc |
Posted at: 2015-04-29, 08:36
If you're satisfied with the math, it's bug report time I can't promise that we will implement this really fast tough, because we have a bunch of branches stuck in code review at the moment. Everybody's too busy with RL I'm interested in picking this up eventually though, if no other dev snaps it up first. https://bugs.launchpad.net/widelands Edited: 2015-04-29, 08:36
Busy indexing nil values Top Quote |
king_of_nowhere Topic Opener |
Posted at: 2015-05-05, 18:02
I think a possible addition to reduce the calculations done by the program would be to set additional conditions that is the road value would exceed 1000, then it is 1000 and the timer is stopped for ten minutes. After all, it is unlikely that such a consistently busy road will become deserted soon. and once the timer is restarted, if the road is still busy it will again get a ten minute stop at the end of the period, so that would save plenty of calculations. While if a road is worth less than 50, the counter would not start until some ware passes through it, so that seldom-used roads won't have a counter running all the time. I don't know if checking for those conditions will introduce more calculus than it saves, though. Top Quote |
kaputtnik |
Posted at: 2015-05-05, 21:19
I will try to explain more... There is a logic which calculates the transportation of wares to get each ware from "start" to "destination". I looked into the code, but i couldn't find some hints of how this calculation is made, which circumstances do have an influence about this calculation. So i don't know if a busy road (where wares maybe transported faster because of two carriers) would get a higher priority for the calculation. Assuming a busy road gets a higher priority (with or without a second carrier) making a road busy by micromanaging does affect the logic of transportation of wares. But this is only a maybe, because i (we) don't know how the calculation of transporting of wares is calculated. It's just a thought, nothing against you idea A busy road is only useful, if you have an available second carrier. So if a normal road is turned to a busy road by micromanaging, there is no guarantee, that this will make the transportaion of wares faster. If there is no second carrier, a handmade busy road is useless. The graphic (Busy road but no second carrier) will indicate that a player should build a building which bring a donkey/ox/horse, thats all. Maybe we misunderstoud because i build only a (f.e.) donkeyfarm very late in game. I build it only if i have enough farms for the wheat and enough water. To the timer story: The timer has to depend on the game speed, not on the real time. Only for clarification Fight simulator for Widelands: |
Tibor |
Posted at: 2015-05-05, 21:41
Hi, I am not much interested in the topic, but I looked into code, here http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/src/economy/road.cc#L601 and I think it would not need much C++ coding skills to tweak the code, I mean changing parameters and so on. It could be a good starting point for somebody who wants to start contributing to widelands and is not skillful enough with C++. What do you think? Top Quote |
king_of_nowhere Topic Opener |
Posted at: 2015-05-05, 23:15
Look, just because I understand how algorithms work, it doesn't mean I know anything about programming. I did a university course about programming, which taught me the stuff about algoritms, but the most ccomplicated thing I actually programmed was the cllassic "hello world". Which I wouldn't be able to do now because I forgot even the little I know. Believe me, I would like to contribute if I was able to; even if I could by only reading some manuals or getting some programming skills. but i would have to start from zero. I am an organic chemist. If you guys need something to do with hydrogen bonding stabilization or unimolecular substitution, then I can help you. With a computer, I barely know enough to manage regular operations. Top Quote |
einstein13 |
Posted at: 2015-05-06, 10:12
ok, now I understand more but for sure I don't want to influence anything except busy/normal road. More influence will be as the result on influence on busy/normal roads. My understanding of "priority" is something only YOU think it is, not the engine in Widelands I remember that in the past, Settlers II had simple finding the route: go from one to second point with the fastest way (shortest route). If there were traffic jams, the road was closed. The same behaviour I spotted with Widelands. I don't know anything what is inside the code, but making roads busy manually will not harm that logic at all
Yes it is!
Hmm... I never do that in lategame. I prefer to build it when my empire is expanding and then take benefit of them. On big maps I even change the default number of donkeys from 5 to 100. Then I am almost sure that every road will be occupied.
Yes, we assumed that the timer will have 40-something seconds in gametime.
I think that I hate C++ My skills in programming are out of this unfriendly language I have tried to rewrite C++ code to another language and I thought that it is very bad language. If you want me to help with django-python work on Widelands' site- Ok, I know something about this (now working in that language and framework). Edited: 2015-05-06, 10:17
einstein13 |
GunChleoc |
Posted at: 2015-05-06, 10:45
C++ certainly isn't a beginner's language - you would need a book and start learning from scratch, do excercises and stuff. I still do a lot of "compile and hope" *lol Busy indexing nil values Top Quote |
Tibor |
Posted at: 2015-05-06, 20:17
C++ is really difficult language, especially all that object-oriented stuff. But if a person stays only within that Road::notify_ware function I linked, it would not be that complicated. Because to change one number to another, compile and look after the effect - that really is not that complicated. I have no IT education at all and still I am doing some coding So you (@king_of_nowhere) has better education in this area then me Top Quote |