Important Dates

Latest Posts

Topic: main roads becoming normal again

kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1810
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-04-28, 17:16

einstein13 wrote:

I don't like animations in games

oh sorry, i meant it to be used here in forum. Just to show how the visual change will look ....


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1107
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-04-28, 18:12

kaputtnik wrote:

einstein13 wrote:

I don't like animations in games

oh sorry, i meant it to be used here in forum. Just to show how the visual change will look ....

Ok, that sounds great face-smile.png I like the idea very much now face-wink.png

But I'm not sure if the idea will be implemented. We have almost all needed information now face-smile.png It is time to testing face-wink.png


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3159
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-04-29, 09:36

If you're satisfied with the math, it's bug report time face-smile.png

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 face-sad.png

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, 09:36

Busy indexing nil values

Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1527
Ranking
One Elder of Players
Posted at: 2015-05-05, 19: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
Avatar
Joined: 2013-02-18, 20:48
Posts: 1810
Ranking
One Elder of Players
Location: Germany
Posted at: 2015-05-05, 22:19

einstein13 wrote:

kaputtnik wrote:

Let say that Shift or Alt (here I will use Shift) is "magic" key for roads. If you hold Shift and click on the road, the road becomes busy imidiatelly (the m_busyness can be set to some big number like 500 or something else). Then we will bring to Widelands more micromanagement and all the roads we want to be high priority will be busy face-smile.png

This would affect the logic of "which is the cheapest route for a ware to get from point A to point B". I don't know if a route get a higher priority just because it consist of busy roads. I assume that a busy road (those with an additional carrier) don't get a higher priority by the logic.

What logic you are talking about?

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 face-smile.png

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 face-smile.png


Top Quote
Tibor
Joined: 2009-03-23, 23:24
Posts: 1317
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2015-05-05, 22: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? face-wink.png


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1527
Ranking
One Elder of Players
Posted at: 2015-05-06, 00:15

Tibor wrote:

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? face-wink.png

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
Avatar
Joined: 2013-07-29, 00:01
Posts: 1107
Ranking
One Elder of Players
Location: Poland
Posted at: 2015-05-06, 11:12

kaputtnik wrote:

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 face-smile.png

ok, now I understand more face-smile.png 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 face-smile.png

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 face-wink.png

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. (...)

Yes it is! face-smile.png

i build only a (f.e.) donkeyfarm very late in game.

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.

To the timer story: The timer has to depend on the game speed, not on the real time. Only for clarification face-smile.png

Yes, we assumed that the timer will have 40-something seconds in gametime. face-wink.png

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? face-wink.png

I think that I hate C++ face-tongue.png My skills in programming are out of this unfriendly language face-smile.png 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, 11:17

einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/
backup website files: http://kartezjusz.ddns.net/upload/widelands/

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3159
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2015-05-06, 11: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
Joined: 2009-03-23, 23:24
Posts: 1317
Ranking
One Elder of Players
Location: Slovakia
Posted at: 2015-05-06, 21: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 face-smile.png So you (@king_of_nowhere) has better education in this area then me face-smile.png


Top Quote