Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Nil Eyeglazed

Pages: 1 2 [3] 4 5 ... 86
31
DF Wiki Discussion / re minecart logic, am i smoking crack?
« on: February 15, 2014, 02:51:36 am »
Checking out minecart logic today (which I'm wholly unfamiliar with, btw) and I'm seeing a memory section, followed by a power-to-signal section containing multiple designs.

Aren't all examples of PTS also examples of memory, via toggling gears?  I don't just mean for just minecart logic, but always.

Lacking a little confidence, because I've been known to get things incredibly wrong in the past, lol, hoping somebody will agree with me or explain why I'm wrong.  Anticipating making some changes to that page, adding what logic gates I can find and understand, but also getting rid of some of the redundancy.

32
The only spelling/grammar issue I see is "...I would suggest you to read a complete...."  Native English speakers would likely write "...I would suggest you read a complete...."  Of course, the meaning is perfectly clear, and there's nothing wrong with having a distinctive voice, at least in my opinion.

33
Yeah, forgot you need the slopes penetrating the z-level below-- leaves you with a space that's hard to use for computing.

Still, I can't imagine Jong's really at 10 tiles/bit?

Code: [Select]

 ##
 .#
 %#
 %#
 .#

Even reusing walls, that's 10 tiles per z-level per bit, with another z-level necessary below, then a third z-level scattered with reservoir pockets...  Not to mention space required by addressing, power transfer, power....  You do realize that all of those memory cells need multiple z-levels per bit, right?  I think you have Jong beat for space requirements.

Quote
I've endeavoured to delve into the foundations of this kind of powerless minecart signal processing on my wiki user page - http://dwarffortresswiki.org/index.php/User:Larix/MPL but that'd be a very long read and much of it is probably either too basic to warrant explanation, too byzanthine to warrant talking about or too clumsily worded to be understandable (or a combination of those three). It absolutely doesn't help that i have no prior computing education, and i don't mean the "i only know how to program in visual basic lol" 'uneducated'; i barely know that a thing named Visual Basic exists and it took me until today to even understand what the various steps in Jong's testing program actually did and what the hell the PC and IR and whatnot in there actually are.

It's really funny-- I'm looking at your user page right now, and I basically worked along the same path as you, but for creature logic (http://dwarffortresswiki.org/index.php/User:vasiln if you want to read my own basic and byzanthine explorations of DF computing, lol).

Super, totally mind-blowing, because like you, I've never really studied computers, and it was always kind of a mystery to me how they went from "here's an xor circuit" to "here's photoshop, tada!"  Creating addressable memory, an adder, (bit shift, conditional jump, etc), I started to see exactly how these things translate to useful, real world stuff.

I'll check it out in more depth later-- kind of hanging out since I see a big new release is coming, but don't really want to fire up DF until then.  Got your user page open though, see if I can puzzle any of it out lol :)

34
Beautiful!

Melee weapons of fortress mode ("choosing the right weapon" insert, bottom of page 30, fourth paragraph):

Should be "...thieves which you'll face quite early..." instead of "...thieves witch you'll face quite early..."

Love the level of professionalism.

35
That's amazing.

Are you doing more?  Do you have an instruction set planned?  I love this stuff.

I'm seeing fewer than 15 tiles per bit.  Is Jong's really twice as compact as that?  Never looked at his map, but wasn't he using over-under water pump cells?  That should come to 16ish tiles per bit.  And addressing should add another 8ish: two z-levels full of pumps, and one z-level full of gears.

How slow is it running?  It sounds like it should be doing 400-tick instructions, getting everything read or written inside the space of a resetting bridge-- is that right?  Doesn't strike me as slow in the least.  Of course, it's hard to compete with the ease and speed of addressable memory via gear grid.

I have to admit, it's very difficult to work out what's going on (especially since I'm not a minecarter yet).  Do you happen to have, say, two bits of addressable memory someplace?  Working along the same principles?  Less to get confused by.  For instance, was trying to see how scalable it would be, but can't find the doors.

36
Also, to answer your earlier question "Can you make a lever which times the dwarfs exit and then very specifically does another action after a series of ticks"; I would use minecarts and pressure plates.  Specifically, I would figure out how long it takes the dwarf to exit, and set up the minecart/plate accordingly.

I'm not fully up to date on this version of DF (have been taking a long vacation from it) but this shouldn't be a difficult problem.

If the goal is to time a dwarf-cart dropping through a volcano, you make an analog-- a shaft, probably filled with magma, that is as deep as the drop.  Then you use a lever to drop both your actual dwarf-cart and your analog dwarf-cart.  You use a pressure plate at the bottom of the analog shaft to time the support destruction (meaning that the timing shaft is probably one z-level shorter than the actual volcano drop).  One lever is used to release both the actual dwarf-cart and the timing dwarf-cart.

I'm not sure if the timing dwarf-cart needs to weigh the same, or if the timing chute needs to be filled with magma.

If you care about 1-tick differences, you would need to pay attention to build order.

37
DF Gameplay Questions / Re: Advice on forgotten beast web farming
« on: April 18, 2013, 06:27:31 pm »
Check out http://www.bay12forums.com/smf/index.php?topic=103682.msg3064909#msg3064909, should answer your questions, includes diagrams

38
DF Gameplay Questions / Re: Mechanical Experimentation
« on: March 09, 2013, 04:47:50 am »
Yeah, you can set up some cheat mods pretty easily.

It's not hard to test just about anything in the game without cheating, but if you want to set up something complicated, I could totally imagine wanting a safe world in which to do it.  I've done that myself, and most folks who make megaprojects disable invasions, and not just to test things out, but to finish them off.

Cheating in DF isn't as easy as in some games, but it's doable: check out "cheats" on the wiki.

39
DF Dwarf Mode Discussion / Re: Panic room design
« on: February 28, 2013, 05:37:21 pm »
Seconding Tevish.  Give a dwarf a barrel, he drinks for a day.  Teach him how to brew...

Designing a panic room is really very similar to your first steps of settling a new area.  The priorities are the same.  So deciding how to stock it is easy-- just stock it with whatever you need for new embarks.

A walled off section of cavern is the best place for a saferoom, because it has good soil, and likely the potential for some silk.  Make it as big as possible (for trees, mostly), then leave a pick, an anvil, and an axe in there.  Even if it's deep, it's not really far from the surface-- just ten or twenty steps up a staircase.

Don't build or dig too close to it.  The design is such that if your panic-room dwarves need more stone, they dig for it.  If they need more food or booze, they grow it.  If they need more wood, they chop it down.  If there are spare dwarves and they need more cavern, they build an airlock and try to claim some of it.  The idea isn't that the panic-room dwarves have everything they need-- it's that they have the capability to build everything they need.  Just like starting a new fortress.

If you want to go from there, a safe water source is a priority, and not too difficult to set up, not in most caverns.  A little bit of stockpiled (and probably forbidden) food is a good idea.  As many slabs as possible are a good idea.  Moody dwarf traps aren't a bad idea, but they're not necessary.  If there's more than one dwarf in your panic room, though, all you have to do is get that dwarf to build a workshop that can be walled off, and if there's only one, you don't really have to worry about it anyways.

All your panic room dwarves have to do is eat, drink, and not go crazy.  Anything else-- danger room training, armor, workshops-- they can build as they see fit.  If you want greater survivability, you can get it by having a larger number of panic rooms, with independent populations.

Usually, if a fortress is close to falling, the outside is no longer safe, but in certain circumstances (say, drawbridged single entrance, and you fall to a misjudged deep dig), migrants can be very survivable, since they don't really know or care about any of the dying inhabitants.  It's not a bad idea to make a panic room accessible from the map edge.  There are Roach Hotel designs (dwarves get in, but they don't get out) that can make these useful even if the outside is very dangerous.  Civs trigger pressure plates can be very handy.

The best thing to do, of course, is to think ahead, and have those panic rooms staffed by dwarves who have never met any of the other fortress inhabitants.  That gives you a good head-start on the happiness problem.  The only major concern besides happiness, food, and drink is ghosts.

40
DF Dwarf Mode Discussion / Re: Waterfall Weaponization
« on: February 26, 2013, 03:25:41 am »
Or use z-levels and retracting bridge vs drawbridge to control access.

Code: [Select]
RB_____
_/     \_

Path granted when open, blocked when closed; opposite behavior of traditional drawbridges

41
DF Gameplay Questions / Re: On GCS silk farms
« on: February 26, 2013, 03:19:35 am »
There have been a few code changes since 2011 :)

You should always feel free to edit the wiki.

42
DF Dwarf Mode Discussion / Re: On the farming of Sea Serpents
« on: February 24, 2013, 06:04:38 am »
I don't think that this is a forum where "necro!" is pejorative :)  I've had a good time looking far back in the past, and love seeing the best threads resurrected occasionally.

Definitely, Sphalerite is the kind of person who most often takes the form of a male dwarf, and is associated with oceans and fire.

43
There's probably a little bit of posturing around ASCII :)  And probably an exaggerated perception of that posturing, as well.

Nobody really minds if you use a tileset.  There's a strong culture around DF that the graphics aren't important, and that drives a little bit of "Tilesets are for wussies!" but I think it's all in good fun.  I don't think there are any official numbers about the number of people that use a tileset vs the number of people that don't, but it's not like either is particularly uncommon.

The thing to me is that it's really difficult to understand screen shots and diagrams if they use a tileset with which one is unfamiliar.  It's almost like these forums are multi-lingual, with pics cropping up in multiple tilesets, and ASCII playing the same kind of role that English does.  If you want people to understand your screenshots, using ASCII is probably a safe bet, and if you want to understand the most screenshots, familiarity with ASCII is probably the most important.

44
For pure killiness, a resettable ice trap (as discussed here and at http://dwarffortresswiki.org/index.php/Trap_design#Ice_trap) is hard to beat-- almost nothing survives.  (Maybe things made of flame prevent the water from freezing, not sure.)

Alternatively, you can go with 10 spikes enclosed by doors, bridges, or hatches (bridges are slower; you can make unbreakable doors, at least in previous versions, by abusing ramps, but then you have spots where you can't put spikes; hatches open instantly, even when triggered by plate, but they leave holes in which the spikees can dodge, and can't be made BD-proof), which is even killier: even hot things die, although you'll want to be sure to build your spikes and mechanisms out of something heat resistant.  I've successfully used such a device to clear out the bowels of the earth without any casualties.

But that's only half of the equation; the other parts are bait, and preferably, automation.  Some kinds of artifact furniture are great for baiting building destroyers, because they'll never get destroyed.  You can use live bait (preferably something immortal, like a goblin, vampire, gas spore, or elf; undead work well in appropriate biomes), but then you need to watch for bad guys constantly, or else you lose your bait and have to reset the trap.  That means that automation's preferable, but it's hard to automate a trap against trapavoids.  Trapavoid building destroyers are easy, with the right artifact furniture.  You can automate via a pressure plate triggered by bait critter, but then you've got to reset every time the trap goes off.  If you don't mind manual activation, a high-speed animal logic switch (near-instant activation via allowing a captured critter movement over a pressure plate, by unlocking a door allowing path) is a great investment for a one-size-fits-all trap.

The best solutions are probably multitiered-- for instance, catch the first wave (of building destroyers) with artifact furniture bait; catch the next wave (of non-flying, non-trapavoid) with a pressure plated spike-trap goblin grinder; catch the next wave (flyers that move over your hatches, kobolds, gremlins) with a bait animal that you will, unfortunately, have to occasionally replace.  It's possible that there are some bait animal tricks you could use-- maybe auto-resurrection?  But then you've got to keep the bait where it belongs.

45
I'd risk taking a no-caves embark just for the pure ability to make the computer. How would one calculate said floating point integers?

I mean, for the first go, pong wouldn't even have to be playable. I imagine just a grid of hatches, opening to a pit of water to show pixels; blue would be white and whatever other colour would be black in this case. How would I make the computer track the positions of the ball so it could match the paddles, and calculate the movement of the ball?

I really haven't the faintest how to make a floating point unit :)  I bet if you looked on wikipedia, the info is out there.  Probably take some work to wade through.

If I'm not mistaken, earliest pong implementations weren't floating point anyways.  Movement along the x axis was at a constant speed, and various y speeds were allowed as well.  So when it was moving diagonally, it moved faster.

So something like this would keep track of paddle1_y, paddle2_y, ball_y, ball_x, ball_delta_y, and a few constants, including ball_delta_x (although really I guess it's a variable, because it can be plus or minus).  Every frame, you check:

1) Is ball at x=0 or at x=max?  If so, check ball_y-- is it within a range represented by the position of the paddle, plus or minus the width of the paddle?  If not, somebody loses; if so, then delta x becomes equal to negative delta x (1 - delta x).  You probably want to modify delta y by some value based on distance from center of paddle, or paddle position minus paddle position last frame, or something like that, to keep the ball moving interestingly.

2) Next, ball position x becomes equal to ball position + delta x, and same goes for y.  Write a 0 to graphics memory at old ball position (writable memory linked to your output hatches, tells the hatch to close).  Write a 1 to graphics memory at new position.

3) If ball y position is 0 or -1 (top or bottom), ball delta y becomes equal to negative ball delta y.

4) Get input for paddles.  (AI is probably right out for first iteration; I imagine a set of 4 levers, up/down for each paddle, which isn't really a big deal since a frame will take about a week).  Input is 2 bits: up, down, or nothing.

5) Write a 0 to graphics memory for old paddle positions.  Calculate new paddle positions (just paddle position plus or minus one).  Write a 1 to graphics at new paddle position.  An increment should function fast enough to minimize flickering, otherwise, you need clock cycles devoted to "if paddle_last_frame and not paddle_this_frame then write 0 to graphics bit" which slows down each frame a lot.  Or you need a frame buffer, which means twice as many graphics bits, and would probably lead to flickering anyways.  I recommend just accepting the flicker.

5) If game lost, increment winner's score (I'm assuming you don't need output of this), ball delta y gets modified somehow to keep things interesting, ball position x and position y moved to center of screen.  (Delta x doesn't get modified, because loser has to receive serve.)

So with doable operations in a low-op-count DF computer, you've only got a handful of  variables, a handful of constants, and a handful of operations (with a goto structure, which seems like the easiest for a ultra low memory computer).  Fitting it in 16 (non-graphics) bytes might be hard, but probably you could do it in 32.  Your bytes don't have to be any bigger than your output resolution-- if you're outputting to a 4x4 grid, you could get away with 4 bit bytes.

You're looking at 4 adds a frame, 3 of which could be increments.  So maybe two to four DF days a frame.

You probably don't want floating point stuff in DF.  I don't know how much memory or clock cycles it takes to do a square root, but I bet it's a lot.

If you want to make AI, it's probably easy to make AI that never screws up (would just take a few more bytes), but hard to make fallible AI.  I never managed to make a random function.  A decent random function probably requires a high resolution clock (100 tick increments would be good enough) and more memory and clock cycles.  Clock % (mod) rand_ceiling would probably work good enough.  Mod is expensive for a programmable computer, but if you were willing to make a dedicated random circuit, I believe you could get it working fast enough.

EDIT: With a 4x4 grid, you only need 2 bit bytes, but those aren't large enough to store sufficient operations for your computer.  8 bit bytes allow 256x256 output.  But that's a lot of graphics memory to build.  You probably want 8 bit bytes, and then just whatever output you're willing to build.  I doubt that it's efficient to compress small values into a single byte, you'd probably see more memory involved in compression/decompression than you'd be saving.

Pages: 1 2 [3] 4 5 ... 86