One Hour One Life Forums

a multiplayer game of parenting and civilization building

You are not logged in.

#1 2020-01-19 05:10:38

Wuatduhf
Member
Registered: 2018-11-30
Posts: 406

Jason's Pattern update has accidentally made Curved Rails viable

Yes, you read that title right.

A few weeks ago, Jason made a change in order to implement Bottle storage without having to go through the intensive hassle of multiple-type states:

https://github.com/jasonrohrer/OneLife/ … 1e98e55b74

Little did he, or mostly everyone in the community, realize how big of a deal the Pattern change actually is.

unknown.png

Thanks to the ability to repeatedly list the same object multiple times in a Pattern-based Category, additional rail types are now 100% viable to be added to base OHOL.

This was tested successfully in a local branch of CCM, after a little bit of time to work out the necessary components to get the system to work.

9dyy3uL.png

h8LTFMG.png

2dCalF2.png

Each cardinal direction requires ~5 Pattern-based Categories in order to be successfully setup.

It will also require expanding the list of @ Moving Cart to include the additional states of the carts.

Bonus picture of the conclusion for building the Pattern Categories that would then become Transitions:
3yIJT88.png




Overall, I think I have cemented my case we can feasibly ask Jason for curved rails without asking him to spend more time than was spent coding the original rails.

Last edited by Wuatduhf (2020-01-19 05:14:09)


Avatar by Worth

Offline

#2 2020-01-19 05:20:53

Wuatduhf
Member
Registered: 2018-11-30
Posts: 406

Re: Jason's Pattern update has accidentally made Curved Rails viable

On a separate note, in case Jason does see this thread, is it possible that OHOL might also get a type of insulated-wall that can support Track Carts transporting thru it?

unknown.png

Also successfully implemented and tested on CCM, worked like a charm. Would be a MASSIVE boost to insulated bakeries in every town. It'll add another type of 'rail' technically to account for, so that might require extra time to code.


Avatar by Worth

Offline

#3 2020-01-19 08:23:39

Grim_Arbiter
Member
Registered: 2018-12-30
Posts: 943

Re: Jason's Pattern update has accidentally made Curved Rails viable

This is definitely something interesting and promising


--Grim
I'm flying high. But the worst is never first, and there's a person that'll set you straight. Cancelling the force within my brain. For flying high. The simulator has been disengaged.

Offline

#4 2020-01-19 08:28:25

DestinyCall
Member
Registered: 2018-12-08
Posts: 4,563

Re: Jason's Pattern update has accidentally made Curved Rails viable

Very cool. :-)

Offline

#5 2020-01-19 09:57:52

Amon
Member
From: Under your bed
Registered: 2019-02-17
Posts: 781

Re: Jason's Pattern update has accidentally made Curved Rails viable

Seconding that. That's really great.


My favourite all time lives are Unity Dawn, who was married to Sachin Gedeon.
Art!!

PIES 2.0 <- Pie diversification mod

Offline

#6 2020-01-19 20:53:38

Tipy
Member
Registered: 2019-01-09
Posts: 90

Re: Jason's Pattern update has accidentally made Curved Rails viable

Chu chu all abord the hype train!


Build bell towers not apocalypse towers

Offline

#7 2020-01-19 23:19:25

StrongForce
Member
Registered: 2018-03-09
Posts: 474

Re: Jason's Pattern update has accidentally made Curved Rails viable

Loop all the trains!!!


Baby dance!!

Offline

#8 2020-01-20 18:35:02

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,802

Re: Jason's Pattern update has accidentally made Curved Rails viable

I drew the curved rails a long time ago, and they looked really good...

H1M3Kev.png

I'm still worried about combinatorial explosion, but I'm looking into how this change to patterns affects the situation.

Offline

#9 2020-01-20 18:43:20

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,802

Re: Jason's Pattern update has accidentally made Curved Rails viable

Ah, I see what you mean.  We essentially can have an "entering from left" pattern that every right-moving cart dumps into...

Offline

#10 2020-01-20 18:52:06

Wuatduhf
Member
Registered: 2018-11-30
Posts: 406

Re: Jason's Pattern update has accidentally made Curved Rails viable

jasonrohrer wrote:

I drew the curved rails a long time ago, and they looked really good...

https://i.imgur.com/H1M3Kev.png

I'm still worried about combinatorial explosion, but I'm looking into how this change to patterns affects the situation.

I forgot these existed! yikes

Damn. I don't think they are in the sprites folder, or else I probably would've just used those instead of my very tacky edit. Oh well, here's to your research!

And yeah, as far as I could personally tell, you'd have to organize them very specifically, and if you ever plan on expanding the list of rails in the future, splitting up each cardinal direction is (potentially) best...


Avatar by Worth

Offline

#11 2020-01-20 18:54:03

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,802

Re: Jason's Pattern update has accidentally made Curved Rails viable

Another:

hVu0hNz.png

Offline

#12 2020-01-20 18:58:54

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,802

Re: Jason's Pattern update has accidentally made Curved Rails viable

Yeah, they were never checked in as sprites.

But I still have the source (and scanned) artwork in the cache.

The trick for very exact drawings like this is to lay them out in CAD first to get the angles all perfect.  Then print the cad, and trace it with pen and ink on a light table.

Here's what they looked like in CAD:

76qc5OZ.png

I've also used this trick for walls, doors, and some other things that need to be exact.

Oh, and the whole engine was done this way.  Lots of tiny parts that need to line up exactly.

Offline

#13 2020-01-20 19:01:20

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,802

Re: Jason's Pattern update has accidentally made Curved Rails viable

Anyway, first step will be to see if I can get the existing NS and EW tracks converted over to patterns in a sensible way.

I must say that this kind of multi-layered complexity makes my 42-year-old brain a little nervous...

Reminds me of the mental gymnastics necessary for functional programming.

This kind of thing is a young man's game, for sure!

Offline

#14 2020-01-20 19:01:51

Wuatduhf
Member
Registered: 2018-11-30
Posts: 406

Re: Jason's Pattern update has accidentally made Curved Rails viable

Ah, neat, I didn't consider that. I'll have to use that for the next time I try to get a rough sketch of a new asset. Thanks!


Edit: The last tip I can provide on how I ultimately came to the solution of Patterns for the NSEW directions is that you have to multiple Inbound possibilities by the Outbound possibilities.

eg. 5 Easts x 5 Wests made each Category pattern require 25 in total for all possible combinations.

After that, I just had to fill in what kind of Cart direction + origin, and Cart + track result was produced by the two rails, and the rest fits.

Using '.' to sort by recent also made the combinations SUPER easy to add, as it cycled through the list with each click. An issue I stumbled upon while setting this up - trying to delete a repeat Pattern entry only deletes the top duplicate, rather than the duplicate selected.

Another issue encountered during this, is that trying to use PgUp and PgDown to move repeat entries up/down the list would ONLY affect the top-most one. It looks like both of these issues are due to the Category system only looking for the first result of that name before interacting with it, rather than the # of the instance selected.

Last edited by Wuatduhf (2020-01-20 19:13:01)


Avatar by Worth

Offline

#15 2020-01-20 19:16:55

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,802

Re: Jason's Pattern update has accidentally made Curved Rails viable

Ah, thanks for pointing out the page-up/down bug.  Will fix.

Offline

#16 2020-01-20 19:51:23

Tipy
Member
Registered: 2019-01-09
Posts: 90

Re: Jason's Pattern update has accidentally made Curved Rails viable

You know trains would be a nice adittion to the curved rails
Saddly I think Jason said they were impossible...
But he said the same about curved rails tongue


Build bell towers not apocalypse towers

Offline

#17 2020-01-20 20:03:07

Wuatduhf
Member
Registered: 2018-11-30
Posts: 406

Re: Jason's Pattern update has accidentally made Curved Rails viable

Tipy wrote:

You know trains would be a nice adittion to the curved rails
Saddly I think Jason said they were impossible...
But he said the same about curved rails tongue

I mean, yeah, it required an engine update tongue

Technically an editor update, as it turns out the base game was already OK with supporting repeats of objects in the same category pattern...but getting one tile's object to influence a neighboring tile's object? And not just that, but an object that'd have to interact AND re-combine with objects below it? oof, that'd require a huge overhaul.

...

at minimum...maybe, somehow...combining TapOut function in a 1x1 area from the 'front' of a train, that 'taps' out each cart in a line? ... it'd be super jank, but that might be feasible, somehow...

I don't think that'd work, though, as I think TapOut affects the map rather than the objects directly, and has no way to reverse the "tapout" effect.

Last edited by Wuatduhf (2020-01-20 20:06:00)


Avatar by Worth

Offline

#18 2020-01-20 20:52:43

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,802

Re: Jason's Pattern update has accidentally made Curved Rails viable

When you say "trains," you mean a bunch of linked cars?

Yeah, that's not happening in this engine, currently.

And if you mean, "Things on tracks that people can ride in," again, the engine doesn't support that either.

A + B = C + D is pretty powerful, but it can't do everything.


So far, everything in the game fits that pattern, or some version of that (an animal or track cart is A and the thing it's moving onto is B, for example).

Stuff like a train with multiple cars all moving together would obviously not fit this pattern, which would require custom-coding.  The whole point of the engine is to see how far we can go in simulating almost everything without custom coding.


And for the few things in the game (currently) that don't fit the A + B = C + D pattern, like writing, maps, flight, and radio, the were all implemented through some kind of quick, simple hack.  If you look at the amount of custom programing done to support each of these things, there's almost none.


Trains, boats, multiplayer vehicles, and networks (plumbing, electric) are not do-able with simple hacks.

Offline

#19 2020-01-20 20:53:07

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,802

Re: Jason's Pattern update has accidentally made Curved Rails viable

Also, the PGUP/DOWN glitch in the pattern editor has been fixed.

Offline

#20 2020-01-20 20:55:22

Tipy
Member
Registered: 2019-01-09
Posts: 90

Re: Jason's Pattern update has accidentally made Curved Rails viable

What about the abbility to ride a cart on the tracks (A fast way of transportation like cars but it's locked on the railway)

Well I guess that's too hard to add to :C

One can always dream

Last edited by Tipy (2020-01-20 20:56:31)


Build bell towers not apocalypse towers

Offline

#21 2020-01-20 20:58:52

Tipy
Member
Registered: 2019-01-09
Posts: 90

Re: Jason's Pattern update has accidentally made Curved Rails viable

But hey I am happy at curved rails!

Thanks Wuat and Jason big_smile


Build bell towers not apocalypse towers

Offline

#22 2020-01-20 21:09:20

fug
Moderator
Registered: 2019-08-21
Posts: 1,130

Re: Jason's Pattern update has accidentally made Curved Rails viable

Curved rails + an insulated wall the cart can go through will probably finally make rails viable for bakeries. Rails always suffered from the fact they had to be planned around due to the whole straight line thing but now? Now we can finally see the tech get a bit of use out here in the world.


Worlds oldest SID baby.

Offline

#23 2020-01-20 21:16:54

Wuatduhf
Member
Registered: 2018-11-30
Posts: 406

Re: Jason's Pattern update has accidentally made Curved Rails viable

Tipy wrote:

What about the abbility to ride a cart on the tracks (A fast way of transportation like cars but it's locked on the railway)

Well I guess that's too hard to add to :C

One can always dream

I tried to do it raw with just what's already ingame.

It worked out poorly.


Avatar by Worth

Offline

#24 2020-01-20 21:59:04

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,802

Re: Jason's Pattern update has accidentally made Curved Rails viable

Wuat, I hope I'm missing something here, but I'm still kindof encountering a hairy combinatorial explosion.

I'm just trying to handle east-moving carts with patterns (without doing curves yet), and I'm running into the fact that each pattern needs 9 members (with 3 members repeated three times each), and there are FIVE of these patterns just for east-moving carts.

Also, even this far, it seems very error-prone, because my east-moving carts aren't working correctly currently, and I'm having a really hard time finding the bug.  I probably have some object in the wrong order in one of the patterns.

In the pre-pattern implementation of east-moving carts, I could figure out which case isn't working, and then check the transition for that case.

Here, I'm kinda flying blind.


And to actually flesh this out just for east-moving carts with curved tracks included, there will be 25 elements in each pattern, and five patterns as well.  So 125 elements in order-sensitive lists just for east-moving carts.

Of course we'll also need S-moving, N-moving, and W-moving carts.  Which means a grand total of 500 items on order-sensitive lists.

That's pretty insane.

Yeah, it's great that we don't have to specify all 500 transitions (or however many)....   actually, I think that because of the duplication necessary, there are MORE items on the lists than would be necessary if the transitions were all done manually.  I think it would be way less than 500 transitions.


The duplication on the lists is necessary because the pattern implementation doesn't explode the combinatorics automatically.  I.e., if you have a pattern of 3 items on the actor side and 4 items on the target side, it doesn't auto-generate all 12 transitions for you.  If you want that to work, you need to flesh these patterns out into 12 each with repeats.


But even if the pattern implementation DID auto-explode for us, it wouldn't work here, because the actor and the target side MATCH in terms of number of members.

For example, we have 3 east-moving carts, 3 tracks left behind, and 3 possible destination tracks (currently, without curves).  So the pattern implementation would see 3 on the right and 3 on the left, and think the whole thing was one big pattern, and not generate all the combinations (not that it does that anyway, currently).

Offline

#25 2020-01-20 22:15:16

jasonrohrer
Administrator
Registered: 2017-02-13
Posts: 4,802

Re: Jason's Pattern update has accidentally made Curved Rails viable

Okay, here are some screens of what I've got for East-moving carts and tracks (no curves).

https://imgur.com/a/l7wNuqv

For some reason, this isn't working, and all the carts (which start on west-ends in my test) crash after I wind them up.  The only one that seems to work is where a West-end is hooked directly to an East end.

What am I missing here?  I've been staring at this way too long today...

Offline

Board footer

Powered by FluxBB