IRC logs for #openttd on OFTC at 2015-12-30
⏴ go to previous day
02:03:39 *** Supercheese has joined #openttd
02:09:30 *** Biolunar has joined #openttd
02:59:42 *** Hiddenfunstuff has quit IRC
03:37:18 <Keridos> what does affect the acceleration of trains, tractive effort or power?
03:59:55 * debdog is not an expert but isn't the one conditional to the other? well, with the force transmission in between
04:04:01 <debdog> power as in energy or as in energy/time
04:42:09 *** Biolunar_ has joined #openttd
04:46:26 <Keridos> the horse power debdog
05:13:28 *** smoke_fumus has joined #openttd
05:21:35 *** Supercheese is now known as Guest3063
05:21:40 *** Supercheese has joined #openttd
05:48:12 <Flygon> Keridos: It's... 'simple'
05:48:33 <Flygon> Tractive effort is the raw accleeration effortavilable
05:49:08 <Flygon> Top speed is... erm, top speed
05:49:27 <Flygon> Power is what controls if you can reach the top speed with a heavy enough load
05:49:31 <Flygon> So if you lack enough power
05:49:37 <Flygon> You can't hit the top speed for a load you have
05:49:41 <Flygon> In addition, at higher speeds
05:49:46 <Flygon> More power lets you accelerate easier
05:50:03 <Flygon> Tractive effort has the most effect at lower speeds
05:50:15 <Flygon> Like, if you have a freight only line
05:50:35 <Flygon> You might just run 60-80km/h stuff with a single Steam Locomotive for each 6-12 tile long freight
05:50:45 <Flygon> With very high TE, and mid-high HP, but low top speed
05:51:06 <Flygon> Because that helps get you off the ground from a stop
05:51:22 <Flygon> And speed isn't a factor with 2CC set freight wagons anyway :U
05:51:30 <Flygon> Anyway, I'll let other more competent people field this
05:51:47 <Flygon> Tractive Effort = Acceletion Effort from Low Speeds
05:52:05 <Flygon> Power = Helps you reach the vehicle's top speed, can affect acceleration closer to the top speed.
05:53:10 <sim-al2> Power is the energy applied per time, opposing energy wasted in drag and overcoming hills
05:54:21 <sim-al2> Going faster takes more and more power, and results in more drag
06:08:27 <Flygon> Was just trying to explain it within gameplay terms
06:40:23 *** ChanServ sets mode: +v tokai
06:56:17 *** Eddi|zuHause has joined #openttd
08:56:02 *** sla_ro|master has joined #openttd
09:01:49 *** HerzogDeXtEr has joined #openttd
10:16:14 *** Alberth has joined #openttd
10:16:14 *** ChanServ sets mode: +o Alberth
11:08:33 *** Myhorta has joined #openttd
11:11:21 *** Myhorta has joined #openttd
11:31:43 <Eddi|zuHause> maybe 11:38 would have been funnier :p
11:32:25 <Wolf01> usually when i look at the clock i see 11:38 or 13:37 or 22:22
11:34:02 <Zuu> I probably will re-do the grapihcs so the elevator car can be visible, but for now made a top and a bottom piece that fit with the current graphics to work on the code part of editing and simulating elevators.
11:34:53 <Eddi|zuHause> i once paid 33,33€ at the store
11:35:00 <__ln__> where's the emergency stairway?
11:35:27 <Zuu> __ln__: Not implemented yet. On the other hand fire is neither implemented. :-)
11:36:28 <Zuu> And there is a feature(?) that you can remove rooms below other rooms. But thanksfully there are no agents yet that can get stuck in the sky. :-)
11:47:24 <Wolf01> mmmh, stupid rectangles
11:49:20 <Wolf01> i set the position of the object with absolute coordinates, the object has the origin in another point instead of the top-left corner, the bounding box should be moved again in place because the rectangle starts drawing from top-left corner while circles start from the origin -.-
11:50:16 <Eddi|zuHause> i don't get what can be so complicated there
11:50:38 <Wolf01> all the additions and subtractions to do
11:50:38 <Eddi|zuHause> just calculate (corner-origin)
11:51:10 <Wolf01> i always mistake the signs
11:51:26 <Eddi|zuHause> always do one step at a time
11:51:34 <Eddi|zuHause> don't "simplify" the formulas
11:52:11 <Eddi|zuHause> Wolf01: always do (end-beginning)
11:52:43 <Wolf01> i'll extend Rectangle to give the origin and the size instead of top-left and size, so i won't bother about it anymore
11:53:59 <Eddi|zuHause> sounds like a transformation you should do in a constructor
11:54:05 <Eddi|zuHause> or a factory method
11:54:37 <Wolf01> too bad i have to change the signature because overloading won't work with same number or type of parameters
11:55:02 <Eddi|zuHause> CreateRectangleFromOrigin(...)
11:55:32 <Wolf01> i would like to use the constructor
11:56:54 <Wolf01> just to keep coherence
11:57:07 <Eddi|zuHause> i'd suggest you take a step back and revisit some design decisions
12:02:57 *** fonsinchen has joined #openttd
12:07:21 *** Myhorta has joined #openttd
12:10:52 <Alberth> compute bounding box from the rectangle object?
12:11:41 <Wolf01> the bb is the Rectangle object
12:13:28 *** andythenorth has joined #openttd
12:13:37 <andythenorth> “It’s turtles all the way down"
12:14:31 <andythenorth> if you have a stack of co-ordinates in *signed* x,y pairs, then you can stick them in an array / list and just walk the list
12:14:47 <andythenorth> [(-1, 0), (2, 10), (-7, -14)] etc
12:14:55 <andythenorth> and they’ll resolve cleanly
12:15:25 <andythenorth> any given x,y point in any shape in your hierarchy is just part of a stack
12:15:29 <Wolf01> i know, that is how the framework's bounding box work, but i need to calculate them first
12:16:11 <andythenorth> is the problem finding the first pair (offsets for a point in the shape, from loc)?
12:16:20 <Wolf01> i'm looking to use vectors instead of rectangles
12:17:04 <Wolf01> so i can easily rotate the bounding box
12:17:42 <andythenorth> potato / potato imho :)
12:17:57 <andythenorth> rectangle + trig = same result
12:18:18 * andythenorth ponders making an eddi-bot
12:18:27 *** andythenorth is now known as eddi-bot
12:18:43 <eddi-bot> “probably your architecture is wrong"
12:18:57 <eddi-bot> “assemble a tree and use a recursive function”
12:19:03 *** eddi-bot is now known as andythenorth
12:19:32 * andythenorth misses games programming
12:19:46 <Wolf01> the bounding box can only be created with a list of vectors, so i'm stuck with vectors (which i extracted from the rectangle)
12:21:04 <andythenorth> vector is a pair of: distance, angle?
12:21:15 <Wolf01> yes, or just the coordinates of the point
12:21:40 <Wolf01> which automatically converts to distance and angle relative to the origin
12:22:06 * andythenorth wonders if a paste would help
12:22:32 <andythenorth> is it isolated code, or is there a lot of boilerplate and such to understand?
12:23:18 <Wolf01> i'm just using the framework functions, the only code i have right now is "Rectangle r = new Rectangle((int)_position.X, (int)_position.Y, (int)_size.X, (int)_size.Y);"
12:23:24 <Wolf01> which misses the offset
12:23:47 <Eddi|zuHause> Wolf01: i still think your problem is really trivial...
12:24:55 <Wolf01> eddi, i know at least 4 different ways of doing this thing, but each one has its downsides and i need
12:25:16 <Wolf01> *because i need to transform it to a different one in different places
12:25:24 <Eddi|zuHause> rule #1 applies: if your solution is not clean and elegant, it's probably wrong
12:25:47 <andythenorth> rule #2: rule #1 often can’t be applied
12:26:16 <Eddi|zuHause> Wolf01: so just implement a bunch of get/set functions that handle the different transformations
12:26:34 <andythenorth> in > 15 years of being around software, rule #1 always fails somewhere around the 80% point :P
12:26:44 <andythenorth> usable software entails lots of inelegance
12:26:55 <Alberth> reality is very buggy :p
12:27:01 <Eddi|zuHause> Wolf01: if the set/get functions are more than 3 LOC, they're probably wrong
12:27:28 <Rubidium> andythenorth: isn't rule #1 more like "third time is a charm"?
12:27:35 <Alberth> or perhaps, our understanding of reality is
12:27:41 <andythenorth> Rubidium: I could +1 to that
12:28:11 <Eddi|zuHause> Rubidium: shouldn't that be rule #3 instead?
12:29:22 <Wolf01> the main problem is that i'm uncertain on how to write this thing, when to compute things, when to cache them, how many variables do i need
12:29:38 <andythenorth> don’t cache them
12:29:52 <andythenorth> your game’s not multiplayer?
12:30:03 <Wolf01> yes, it will be multiplayer
12:30:27 <Wolf01> and i'll expect headaches with lag hiding
12:30:46 <andythenorth> I would deal with the caching later
12:30:55 <andythenorth> do the minimum to make it work
12:31:18 <andythenorth> you need an architecture teddy bear
12:31:22 <Eddi|zuHause> Wolf01: all those things are implementation details, not design decisions
12:31:39 <andythenorth> architecture teddy bear says: “don’t worry about the best implementation, just write something, it’s only a game"
12:32:02 <Eddi|zuHause> Wolf01: the object should behave the same, no matter whether the set/get function read caches or calculate on the spot
12:32:17 <andythenorth> I’ve made / seen made games with multi-million play counts, made in the most basic way by people who have no comp sci. training at all :)
12:32:52 <andythenorth> Wolf01: how many rectangles do you have? o_O
12:33:07 <andythenorth> or rather, how many sizes of rectangle?
12:33:54 <Wolf01> infinite, i couldn't know the size of the object, i could calculate it on game loading, but the object will keep the same size for the entire game
12:34:15 <Wolf01> but it can rotate with 90° steps
12:34:33 <Wolf01> so the bounding box need to change accordingly
12:35:47 * andythenorth wondered if it could be hard-coded, come back to it later
12:36:30 <Wolf01> so, restarting from scratch, i have a position of the origin and the offset, then i have a bounding box and a sprite which might not be exactly of the same size of the bounding box
12:36:53 <Eddi|zuHause> Wolf01: here's what i would do: 1) in the constructor, "normalize" the rectangle to (corner+size), 2) set/get functions do the calculations, no caching
12:37:01 <andythenorth> origin for this object, or global origin? o_O
12:37:53 <andythenorth> so what determines the size of the bb, if not the sprite size?
12:37:54 <Eddi|zuHause> i'm not entirely sure what purpose the "origin" has
12:37:56 <Wolf01> also i have a more system wide global origin, because the map has a offset since it's not screen-aligned
12:38:43 <andythenorth> you’re using the origin as the center of rotation?
12:39:23 <Wolf01> the origin of the object is needed to center things on the object, like the sprite (which need to be rotated in the center instead of the top-left corner), the point of the gun which is centered on one side of the sprite
12:39:35 *** Hiddenfunstuff has joined #openttd
12:40:01 <andythenorth> usually the origin would also be the location point of the object in the parent co-ordinate space
12:40:15 <andythenorth> and the centre of rotation
12:40:39 <andythenorth> so what gives you the bb size?
12:40:45 <Eddi|zuHause> so origin is a random point within (or maybe outside) the rectangle?
12:40:47 <Wolf01> when i spawn new tanks, i give the tile, and the tank must spawn in the middle of that tile
12:41:01 <Eddi|zuHause> or always the center?
12:41:39 <Wolf01> the origin should always be the center, the only things with doesn't have it at the center are the GUI elements
12:42:30 <Eddi|zuHause> why are gui elements different?
12:42:55 <Wolf01> because they are drawn on screen and not on the playground
12:44:41 <Eddi|zuHause> so, gui elements should be completely different objects, or you should eliminate this difference
12:44:44 <Wolf01> also i'll need a viewport, because now the playground is little, but it might be a lot bigger
12:45:11 <Wolf01> i would keep them different
12:45:22 <Eddi|zuHause> anyway, calculating the center from the corner and size is just center = corner+size/2, and the other way around is corner=center-size/2
12:45:41 <andythenorth> in principle, moving the origin is no big deal, at least when I was writing flash games, it’s just a mutable property
12:47:02 <Eddi|zuHause> (like i said: trivial)
12:48:22 <Eddi|zuHause> (interestingly, "size" can also be a negative number and this still works)
12:50:17 <Wolf01> <andythenorth> so what gives you the bb size? <- usually it is slightly bigger than the sprite up to the tile size, if i'll need precise collision checking i'll add a mask
12:51:07 <andythenorth> stepping back, do you actually need to draw this rect, or is it for the collision detection calculation?
12:51:21 <Wolf01> at the moment it's used for both
12:51:57 <Wolf01> but i'll keep it only for debug as i'll switch to the internal bounding box system which uses vectors
12:52:14 <Wolf01> (the list of coordinates)
12:52:33 <Wolf01> i could even have an octagonal bounding box
12:53:05 <Wolf01> but i prefer to use rectangles :P
12:53:30 <DorpsGek> __ln__: I have not seen DorpsGek.
12:54:25 <andythenorth> you know that for 90º rotation of rectangles, you can just switch x, y for points?
12:54:42 <andythenorth> it only works for limited case of rects, not a general solution
12:55:02 <Wolf01> i could just multiply the movement vector normalized
12:55:05 <__ln__> you probably mean °, not º
12:55:21 <andythenorth> yeah, that again
12:56:04 <andythenorth> ok, so your rect is specified as origin, size pairs
12:56:20 <andythenorth> so you likely want to calculate all the corners and transform them?
12:57:27 <Wolf01> i don't know if it's the right way, but that was my idea
12:57:53 <andythenorth> it’s how I would do it
12:58:08 <andythenorth> is there a general shape / lining drawing method?
12:58:18 <andythenorth> the rect looks like a specialised convenience method
12:58:40 <andythenorth> usually, something like polygon(points)
12:58:57 <Wolf01> i have a boilerplate to draw lines and geometric figures, as i can only draw sprites
12:59:37 <Wolf01> and each line is made up from 1px*1px sprite stretched
13:00:34 <Wolf01> a week ago it was there
13:04:20 <andythenorth> Wolf01: I leave you to it :) But have you drawn it out? I always use paper and pencil for solving geometry / trig problems in games.
13:04:41 <Wolf01> i have a school book for that
13:32:29 *** TheMask96 has joined #openttd
13:33:08 *** Supercheese has joined #openttd
13:46:01 <Wolf01> nice, i removed the drawing offsets and it is drawn in the opposite corner XD
13:59:01 <Wolf01> i think that the problem is due to the drawing coordinates which are absolute, while everything other is relative to the object, so i'm trying to do stupid fixes instead of getting the sprite drawing correctly
14:02:06 <Wolf01> i might get rid of this by using more sprite batches
14:02:35 <Wolf01> and then rendering the batch with offset instead of inserting in the batch with offset
14:03:00 <Eddi|zuHause> i think you need to think more and program less
14:17:17 *** Progman has joined #openttd
14:18:08 *** Progman has joined #openttd
14:25:38 <andythenorth> local-to-global stuff is always a bit wtf
14:26:14 <andythenorth> I would define all the shapes separate from their drawing
14:26:25 <andythenorth> it’s a bit boilerplate heavy, but easier to work with
14:27:23 <Wolf01> i removed all the global offset layer now, i'll move the playground with a viewport as soon as i understand how to draw things outside of it
14:27:23 <andythenorth> and I would define all the points as polygon vertices, relative to the origin of the current shape
14:35:00 *** Progman has joined #openttd
14:57:11 *** Myhorta has joined #openttd
16:08:28 <Keridos> when doing a fast passenger route with maglevs, do i really need 2 rails in each direction?
16:08:38 <Keridos> my maglevs konstantly break down, even if renewed
16:23:24 <Wolf01> they don't have enough reliability
16:24:38 *** Alberth has joined #openttd
16:24:38 *** ChanServ sets mode: +o Alberth
16:25:26 <Keridos> hm i see that I have only access to two maglevs
16:25:42 <Keridos> there is pretty much no point in them this way
16:33:33 <planetmaker> Keridos, amount of tracks per direction depends very much on how much usage those track see
16:34:07 <planetmaker> And whether maglev is worth the upgrade or not ... depends on available trains. And whether the speed and possibly reliability is worth the upgrade
16:34:27 <planetmaker> without any NewGRFs you'll finally end up with 4 different maglev engines
16:34:53 <planetmaker> and the train engines will eventually become unavailable, thus it will become a necessity to upgrade to maglev eventually
16:41:36 <Keridos> planetmaker: I have 2cc trains and vactubes
16:41:46 <Keridos> saw that I can construct magtubes with 99% reliability
16:42:02 <Keridos> and they drive at 3840 km/h
16:54:02 <Alberth> quite unbalanced thus :)
17:00:49 *** andythenorth has joined #openttd
17:03:05 <Alberth> I wonder if you could correct such things automagically :p
17:03:09 <Eddi|zuHause> uhm... so i docked on my satellite with a klaw, but i can't seem to transfer fuel...
17:08:38 *** Wormnest has joined #openttd
17:16:09 <Keridos> Eddi|zuHause: is that openttd or space engineers? :p
17:16:30 <Eddi|zuHause> it's called KSP :p
17:19:59 *** Passion_Fruit has joined #openttd
17:20:41 <Eddi|zuHause> you'll feel better afterwards
18:33:34 <Eddi|zuHause> ah... i figured it out... it's not "alt+click" like the internet suggests, but "right shift+click"
18:42:41 *** sla_ro|master has joined #openttd
19:41:38 *** TheMask96 has joined #openttd
19:45:47 <DorpsGek> TrueBrain: Commit by translators :: r27484 /trunk/src/lang (4 files) (2015-12-30 19:45:36 +0100 )
19:45:48 <DorpsGek> TrueBrain: -Update from Eints:
19:45:49 <DorpsGek> TrueBrain: croatian: 4 changes by UnderwaterHesus
19:45:50 <DorpsGek> TrueBrain: english (us): 1 change by Supercheese
19:45:51 <DorpsGek> TrueBrain: serbian: 21 changes by stravagante
20:15:21 *** oskari89 has joined #openttd
20:40:36 *** andythenorth has joined #openttd
21:00:21 *** andythenorth has joined #openttd
21:01:50 *** FLHerne has joined #openttd
21:06:48 *** sim-al2 has joined #openttd
21:50:55 *** andythenorth has joined #openttd
21:58:40 *** Hiddenfunstuff has quit IRC
22:12:39 *** Progman has joined #openttd
23:01:16 *** Supercheese has joined #openttd
23:15:02 *** Cybert1nus has joined #openttd
23:19:14 *** fonsinchen has joined #openttd
23:22:31 *** Biolunar has joined #openttd
23:29:18 *** Flygon_ has joined #openttd
23:46:37 <Keridos> are there any GRFs that add stuff beyond year 2100 ?
23:51:50 *** fonsinchen has joined #openttd
23:58:28 <Eddi|zuHause> the downside is, that if you add e.g. trains beyond 2100, then all planes, ships and road vehicles will probably disappear
continue to next day ⏵