HomeGeneral Discussion

General topics about Barons of the Galaxy

Mid-construction at upgrade? Messages in this topic - RSS

Hutton
Hutton
Posts: 276


5/4/2017
Hutton
Hutton
Posts: 276
If you are part way through construction of a unit or structure when a Base or Shipyard levels up, does the remaining time on the construction get cut accordingly?

The reason I'm asking is that I want to know if you should wait for an upgrade to finish before queing up a big unit or you can just punch it in and still get the benefit of the upgrade when it goes through.
0 link
badmaw
badmaw
Posts: 80


5/5/2017
badmaw
badmaw
Posts: 80
You ask if ten men will beat you up or just eight. The proper question is why the men should beat you up. Can't we just get along? Can't we just have reasonable times?
0 link
Hutton
Hutton
Posts: 276


5/5/2017
Hutton
Hutton
Posts: 276
badmaw wrote:
You ask if ten men will beat you up or just eight. The proper question is why the men should beat you up. Can't we just get along? Can't we just have reasonable times?


???
0 link
Doctor Dread
Doctor Dread
Administrator
Posts: 1478


5/5/2017
Doctor Dread
Doctor Dread
Administrator
Posts: 1478
I think badmaw is just having flashbacks, he makes Monoliths out of Narcotics ya know =)

The construction time is unaffected by leveling up the structure. its given a completion date and it doesn't change.

I'm not 100% sure about things in the queue, whether the listed turns is used or if it looks it up again. I'm pretty sure it uses whats listed in the queue.

So perhaps its a bug of sorts, when the structure levels up, it should update all the unstarted construction in its Queue to lower their time. This would be significant in Military Bases more than anything.
0 link
badmaw
badmaw
Posts: 80


5/5/2017
badmaw
badmaw
Posts: 80
I was saying that it doesn't matter if the remaining time gets cut or not, it't too long anyway.

A solution would be to store the time of start, not the time of finish, so when an interval gets shorter with the upgrade then we get the shorter period.
0 link
Vulpex
Vulpex
Posts: 390


5/5/2017
Vulpex
Vulpex
Posts: 390
I can confirm how this works currently.

If a shipyard is updated in the middle of constructing a ship it does not change the time to finish the construction of that ship.

Happened to me a couple of times.
0 link
Doctor Dread
Doctor Dread
Administrator
Posts: 1478


5/5/2017
Doctor Dread
Doctor Dread
Administrator
Posts: 1478
badmaw wrote:
I was saying that it doesn't matter if the remaining time gets cut or not, it't too long anyway.

A solution would be to store the time of start, not the time of finish, so when an interval gets shorter with the upgrade then we get the shorter period.


It stores the time of start when the item come up next in the queue and then it calculates the end turn based on how many turns it takes. How many turns it takes is put in when you add it to the list and doesn't change. The turn flip only has to look at End turns that match the current turn and not calculate all of them,.

calculating the "new lower" time as it comes up int he queue still wouldn't solve the problem of it displaying one thing and doing another. The display in the queue needs to be updated. Also if I calculate a new correct turn time as it comes up it makes it hard to make custom construction times like 1 turn when you're in the tutorial, because it would always get overwritten.

This is all academic anyway =) The construction times, or at least the upgrade times, need to be lowered. and updating the turns on the list when a structure finishes upgrading is needed also.
0 link
badmaw
badmaw
Posts: 80


5/5/2017
badmaw
badmaw
Posts: 80
"How many turns it takes is put in when you add it to the list and doesn't change."

You found the problem. You don't need to save that number, it's a simple difference between the start round and the current round.

"Also if I calculate a new correct turn time as it comes up it makes it hard to make custom construction times like 1 turn when you're in the tutorial, because it would always get overwritten."

You don't "solve" an issue breaking things around until the issue is no more. If you want something special for the tutorial then make something special for it and let the right things be right.
0 link
Doctor Dread
Doctor Dread
Administrator
Posts: 1478


5/6/2017
Doctor Dread
Doctor Dread
Administrator
Posts: 1478
badmaw wrote:
"How many turns it takes is put in when you add it to the list and doesn't change."

You found the problem. You don't need to save that number, it's a simple difference between the start round and the current round.

"Also if I calculate a new correct turn time as it comes up it makes it hard to make custom construction times like 1 turn when you're in the tutorial, because it would always get overwritten."

You don't "solve" an issue breaking things around until the issue is no more. If you want something special for the tutorial then make something special for it and let the right things be right.



You don't want the system to make calculations on the fly for entire lists of things x100 players every turn to figure out if anything needs to be constructed this turn. It is far far easier on the database to simply look for a single number in a column of a straight table. If I did things this way the turn flip would take 6 minutes not 6 seconds. The UI needs to do more database work to set it up to be easier for the turn flip when it runs. Most games don't run the entire game on a turn flip, the changes and updates are distributed throughout the day.

For example, there is a view in the database for Military units that makes a dozen joins and a lot of calculations. It show the "true and current" stats for everything on any unit. I don't use that view anywhere but in one place, and that is to gather that information and then update the actual military unit with its stats whenever something on a military unit changes. Everything else in the game, the UI and especially the turn flip looks at the straight table for military units without any calculations needed. It can now use indexes and a small simpler table to return any query instantly.
0 link
badmaw
badmaw
Posts: 80


5/6/2017
badmaw
badmaw
Posts: 80
There's a lot to talk about this and you are more right because you actually have done it. I have in my mind for years an economy game and I'm every day closer to finally start writing it, but it's a little bit different and real time, not turn based.
0 link
Doctor Dread
Doctor Dread
Administrator
Posts: 1478


5/6/2017
Doctor Dread
Doctor Dread
Administrator
Posts: 1478
badmaw wrote:
There's a lot to talk about this and you are more right because you actually have done it. I have in my mind for years an economy game and I'm every day closer to finally start writing it, but it's a little bit different and real time, not turn based.



Real time are usually "tick based" or event driven. Everything you do is simply "It will be done by this time" and everything is a countdown. It is VERY easy to manage that. You are manging a list of "events" and the system is checking every few seconds for anything that is up. So you can have Build Structure in 5 seconds or 34 hours and its one line in the data somewhere and that's it.

Combat, like OGame or Astro Empires, is like this also. The fleet move and attack is just "Be there at 2:08PM" and when that time comes that event is processed and resolves instantly. Everything is resolved immediately when the time is up. Thats how 99% of the games are made

The problem is that everyone is running in there own little time warp. Its impossible to have a fight that start against 4 different people in New york, that goes on for several turns with other forces coming in and out, because its like everyone is on their own timer. You can't chase down anyone's fleet because they aren't moving from square to square, they are "in warp" until a certain time. A turn based system puts everyone in a board game where the increments of time are the same. A normal board game with rounds and everyone takes a turn is impractical with a lot of people. Like a 32 player game of Civ IV. But if the turns are simultaneous then it works.

Simultaneous turns like I made here has a host of problems to implement also. It's why the game turn is so complicated. Everything has to happen at the same time and resolving conflicts is tricky if you want to keep the turn flip at a reasonable speed. I am a professional website and Database guy for decades and it is challenging to pull off. I DO NOT recommend anyone try this kind of system =)
0 link
badmaw
badmaw
Posts: 80


5/6/2017
badmaw
badmaw
Posts: 80
Maybe there's something escaping me but turn based is exactly tick based with a tick of 10 minutes long.

The movement is the same, you have 20x20 squares or something like that and the other game has 1920x1080 px or 20x20x20 parsecs, it doesn't matter.
You can warp your ships the same like they do too, or they can show their ships where them are at every tick same as you.
You don't have to chase anything, every ship has its coordinates and if two of them are in visual range they are in the same place just like in your game they are on the same square and them can engage.

The turn flip doesn't have to happen when I want to see the page. There's no reason to delay the calculations 10 minutes. You can do the calculations in real time, distributed over the 10 minutes, and when the time comes you just show the stuff.

Also because you are a database guy you know that with a database you do three things: put data in, process data, read data.

What we as players do in the game is your input data. You save all our commands: when I order a plant, when I buy the water, when I dump the polymers etc.

The processing is the turn flip. You start to do it when we already needed it. Don't. Process it on the spot if it can be processed or just save the user input and process the data with another worker.

Reading data happens when we ask for pages. Don't make this data when I request it.
Make it in the 10 minutes, and when the time comes just show it to me.

Make two tables, one for input to write in it the user input and one for output to read from it when I wanna know where is my water at.

1. User input: just like you are doing now. Write all the data players send you with the turn ID.
2. Next turn: Process the data as you do now in the turn flip, but do it as soon as is available, don't wait 10 minutes.

Make all the things you want players to see: money, stock, plants, transports, demands, damages, you know them. You already make this, so you know what to do, just do it as soon as you can and save it in the read table, let the input table handle the input. Save it with the id of the next turn so you can read it when the time comes.

When I request a page, any page, you just read it from the read table where is in the form for presenting. Just select the data marked with the current turn, made a little earlier before the current turn.

This is important: you don't need to make joins and anything expensive in terms of time. Disk space is cheap. Just read the data, send it to the browser. The joins and all the processing was done at the processing time, at the previous turn.
Now the users just want to see the data, show it to them. Disk space is cheap, users' patience is expensive.

Thank you for reading. If you have questions, by all means ask them. I'm here all week Big Grin.
0 link
Doctor Dread
Doctor Dread
Administrator
Posts: 1478


5/6/2017
Doctor Dread
Doctor Dread
Administrator
Posts: 1478
badmaw wrote:
Maybe there's something escaping me but turn based is exactly tick based with a tick of 10 minutes long.

The movement is the same, you have 20x20 squares or something like that and the other game has 1920x1080 px or 20x20x20 parsecs, it doesn't matter.
You can warp your ships the same like they do too, or they can show their ships where them are at every tick same as you.
You don't have to chase anything, every ship has its coordinates and if two of them are in visual range they are in the same place just like in your game they are on the same square and them can engage.

The turn flip doesn't have to happen when I want to see the page. There's no reason to delay the calculations 10 minutes. You can do the calculations in real time, distributed over the 10 minutes, and when the time comes you just show the stuff.

Also because you are a database guy you know that with a database you do three things: put data in, process data, read data.

What we as players do in the game is your input data. You save all our commands: when I order a plant, when I buy the water, when I dump the polymers etc.

The processing is the turn flip. You start to do it when we already needed it. Don't. Process it on the spot if it can be processed or just save the user input and process the data with another worker.

Reading data happens when we ask for pages. Don't make this data when I request it.
Make it in the 10 minutes, and when the time comes just show it to me.

Make two tables, one for input to write in it the user input and one for output to read from it when I wanna know where is my water at.

1. User input: just like you are doing now. Write all the data players send you with the turn ID.
2. Next turn: Process the data as you do now in the turn flip, but do it as soon as is available, don't wait 10 minutes.

Make all the things you want players to see: money, stock, plants, transports, demands, damages, you know them. You already make this, so you know what to do, just do it as soon as you can and save it in the read table, let the input table handle the input. Save it with the id of the next turn so you can read it when the time comes.

When I request a page, any page, you just read it from the read table where is in the form for presenting. Just select the data marked with the current turn, made a little earlier before the current turn.

This is important: you don't need to make joins and anything expensive in terms of time. Disk space is cheap. Just read the data, send it to the browser. The joins and all the processing was done at the processing time, at the previous turn.
Now the users just want to see the data, show it to them. Disk space is cheap, users' patience is expensive.

Thank you for reading. If you have questions, by all means ask them. I'm here all week Big Grin.


You're missing something. If the ships are actually moving at every "tick", then you just made the exact system I'm using =) If the ships are exactly at the same location or "in warp until the timer is up" then you made the tick system. In the tick system NO UPDATES happen until the event is up. If you are actually moving the ships or do ANYTHING during the event time. You are now on the system I have here. The whole point was not to update anything between timers so you can handle 10,000 players on a small machine easily.

How can I raid you product when I show up and they aren't there, but show up 12 second later? Then I attack which takes 20 seconds but you already transferred them 3 seconds ago. How can we all attack a Kaiju at the same time without an escort order of some kind? The tick system puts all the players in their own mirror universe
0 link
badmaw
badmaw
Posts: 80


5/7/2017
badmaw
badmaw
Posts: 80
You say that I'm missing the point then you state my exact point. My point is that what you see two different systems they are in fact the same.

"How can I raid you product when I show up and they aren't there, but show up 12 second later?"

You don't ride my product when you show up because my product is not there, you have nothing to ride. But 12 seconds later, when my product show up, you can ride me.

Then I don't quite understand what you are saying with the 20 seconds and 3 seconds but if it is what I think it is then:

The state for the next round is not final until the current round is over. If several events happen in the current 10 minutes round then they are processed in the same way you are processing them now. Nothing is different but only the time when you do the processing. You do the exact same things but as soon as you can, not all of them at the 10 minutes mark.

Please take your time to make a succession of events you think would not work out, I'll process the next round table step by step for you to see how it will be done.

"How can we all attack a Kaiju at the same time"
The same way we attack him now. Nothing changes. You make the same calculations, same order, just each at different times. You don't use different numbers, you just process operation A at 11:44:12, operation B at 11:16:02 and operation C at 11:18:33 instead of processing all the operations A, B and C at 11:20:00.
0 link
badmaw
badmaw
Posts: 80


5/7/2017
badmaw
badmaw
Posts: 80
I think I understand now. You are describing what could happen in a real time game and ask me how could a turn game would process that. Well, the answer is simple: it will not happen so you don't have to worry about that. In a turn based game nobody shows up at a place and 12 seconds another one comes with water to be raided. You fooled me for a moment Big Grin.
edited by badmaw on 5/7/2017
0 link
badmaw
badmaw
Posts: 80


5/8/2017
badmaw
badmaw
Posts: 80
I just realized I made the same mistake.

"You are describing what could happen in a real time game and ask me how could a turn game would process that."

In fact, the thing is not that it happens in real time games and this is not a real time game. The thing is the you can't process user's actions with lower than 1 tick time resolution.

So in a turn game with 10 minutes round we won't have 12, 12 or 3 seconds actions because all the actions gets processed (from the user's perspective, this is important) at the 10 minutes mark.
It's the same for a real time game, because in a real time game the users's actions isn't actually processed in real time but delayed until the next tick. Many ticks per second, it's true, to get the illusion of real time.

So the take out from all of this is that these games process the actions at the tick mark **from the user's perspective**, we don't wait for the round to finish in order to process the round.
When the frame gets rendered in real time games, the game already knows what to render. It doesn't start processing user's actions when the tick ticks, it would be too late. As you can see in this game when the "Round is being processed" message shows up.
0 link
Silverlv
Silverlv
Posts: 1


5/8/2017
Silverlv
Silverlv
Posts: 1
If you are referring to "real time games" as in for example ogame or similar, there are no ticks of 1 second. It's all about events happening at a set time. The ships don't "move" during the time in between events (launch -> disappear - > appear at the location in set time) unlike here where they actually move across the grid each tick and can be intercepted anywhere in between the origin and destination.

Each of the methods have its up and down sides but I have doubts they can be mixed successfully as you have suggested but there are most certainly ideas that come from event based games into tick based.

The biggest downside in event based games is that there is nothing you can do in between the events. Let's say I have a fleet located at A which you want to destroy, you are bringing in your fleet from B and I notice it. I immediately send away my fleet to XYZ which is going to take 5 billion years. Even if your fleet is faster and theoretically could catch up there​ is nothing you can do apart from waiting at the arrival destination.

Resource usage should be redesigned. As of right now the only thing you can do with resources / products is to sell them off and it greatly benefits players that have more resources. If they were actually used for constructing buildings / ships or even upkeep it would improve economics significantly as players would have to trade more. As of right now trading seems more like a joke and only serves the purpose of giving money to someone in one way or another.

It seems reasonable that logistics are capped in some way but considering that the game promotes different play styles there should be ways to increase it if you really want to. Research / command centers (which could also increase firepower for units around that area) or even account wide perks would greatly benefit variety in play style rather than trying to be the biggest / best at everything at the same time. You want to produce stuff? Fair enough specialise in it and be better at production than someone who has specialised in military but he should have different advantages rather than just having more ships and less facilities.
0 link
badmaw
badmaw
Posts: 80


5/8/2017
badmaw
badmaw
Posts: 80
I was referring to real time games as in games that don't take 10 minutes to change the state. For our eyes, real time means 60 frames per second for example, but even games with a tick of a second can be considered as real time because you don't wait too long of a time until the refresh.

"The ships don't "move" during the time in between events (launch -> disappear - > appear at the location in set time) unlike here where they actually move across the grid each tick and can be intercepted anywhere in between the origin and destination."

This warping gimmick is not particular to a game type or another, you can warp a ship in this game too when it makes sense. And warping to Mars should be making a lot of sense because if it takes 2 rounds for a ship to go from Paris to Sidney then it takes 10k rounds to go from Earth to Mars. But I was told that making sense is not a goal for Barons of the Galaxy, so we are good.


However, what we were talking here is not how the player perceive the pass of time, but how the developer implements the game.


"If you are referring to "real time games" as in for example ogame or similar, there are no ticks of 1 second. It's all about events happening at a set time."

This is how you as a player perceive the pass of time in that game. For the developer, that game is a game like any other game including this one and process the player's actions with a resolution of probably 1 second.

"The biggest downside in event based games is that there is nothing you can do in between the events. Let's say I have a fleet located at A which you want to destroy, you are bringing in your fleet from B and I notice it. I immediately send away my fleet to XYZ which is going to take 5 billion years. Even if your fleet is faster and theoretically could catch up there​ is nothing you can do apart from waiting at the arrival destination."

That is not because the game is tick based, round based or event based. That is because the ship is in the warp space and you can't intercept it there (this is the story, in that world they discovered warp space).

Even if the developer would have been chosen to move the ship in the normal space, it would still not make much sense for you to be able to intercept the ship because a ship in space is like a speck of dust in Nevada, how could you find it? It's not like you search for your friend in the mall, it's more like you search for your friend somewhere in the space between Earth and the Sun.

It's true that this game is far away from a game like EVE Online, but I learned a few days ago that not all humans like the same things. The dev has a long history of playing board games and he wants this game to be like a board game. Think of it as being a game like Jumanji, where you throw a dice and move a peon but in your imagination a monkey steals your food. These games still exist and many people plays them, in spite of the fact that games like Left 4 dead exists too.
0 link
FuriousGeorge
FuriousGeorge
Posts: 51


5/8/2017
FuriousGeorge
FuriousGeorge
Posts: 51
Badmaw,

I think you have a great idea and should start a journey on making your own economy game. Dread is very capable but if his views on mechanics down't line up with your own you are totally free to put in the same man-hours that he has creating a game. I encourage you to do so.
0 link
Doctor Dread
Doctor Dread
Administrator
Posts: 1478


5/8/2017
Doctor Dread
Doctor Dread
Administrator
Posts: 1478
If you're expecting a game like EvE online from a solo dev you should take furious georges advice and try making a game yourself =)

It's like movies, people don't understand why movies take 200 million dollars and 3 years to make, it's all CG now right? I mean just tap on the keys and hit the "Make Movie" button right? =)
+1 link
12






Powered by Jitbit Forum 8.3.8.0 © 2006-2013 Jitbit Software