a multiplayer game of parenting and civilization building
You are not logged in.
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.
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.
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:
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
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?
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
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
Very cool. :-)
Offline
Chu chu all abord the hype train!
Build bell towers not apocalypse towers
Offline
Loop all the trains!!!
Baby dance!!
Offline
I drew the curved rails a long time ago, and they looked really good...
I'm still worried about combinatorial explosion, but I'm looking into how this change to patterns affects the situation.
Offline
Ah, I see what you mean. We essentially can have an "entering from left" pattern that every right-moving cart dumps into...
Offline
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!
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
Another:
Offline
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:
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
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
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
Ah, thanks for pointing out the page-up/down bug. Will fix.
Offline
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
Build bell towers not apocalypse towers
Offline
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
I mean, yeah, it required an engine update
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
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
Also, the PGUP/DOWN glitch in the pattern editor has been fixed.
Offline
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
But hey I am happy at curved rails!
Thanks Wuat and Jason
Build bell towers not apocalypse towers
Offline
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
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
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
Okay, here are some screens of what I've got for East-moving carts and tracks (no curves).
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