We had fun on the ferry and I got some more stuff done, including changing the placeholder from the original ‘trait’ to ‘name’ and then back to ‘trait’ after the character name is input. All subsequent inputs are supposed to be traits, and the page adds ‘Name: “ to this first input when it inserts text into the new paragraph as innerText. I need to figure out how to add a span, I think, or actually several, to the trait and make those clickable so we can detect what the user picks. Then we replace those spans with another, ‘#d’ which is also clickable, this time generating #d6 for a trait roll.
Tuesday, August 17, 2021
Clickable Elements
Make some clickable objects. F'rex, make this paragraph clickable and change its color when clicked!
Monday, August 16, 2021
I zonked out as usual and got back up at 1 AM to work on stuff, so this is Tuesday morning. I’m headed out with Mom for the ferry in a few hours and I will need to get the passenger seat cleared out presently and get a shower. What I’ve been doing instead is playing around with input fields. I just found out that I still need a button on the code I copy-pasted to my blog, but other than that I’m happy with what I’ve been working on. I want to make my shape divs clickable, so I will experiment with that later, after I get the bugs out of the risus character generator which I got started just now…
(Actually, Google is just stubbornly refusing to update and I can’t copy-paste what I can’t copy…)
Risus is a dead simple RPG based on silly traits. You fight by rolling dice based on the opposing traits, lose dice (temporarily) as you fight and lose the fight when you are reduced to zero dice. I can feed traits into the list of traits with an input text box from which I have removed the box, added a ‘trait’ placeholder and grey underline. You enter a trait by hitting ‘enter’ after to type your input, then I want the page to add clickable numbered spans for ‘1 2 3’ dice (d6, by the way).
So far-
Risus Character Generator
Name: Sir Spamalot
Sling Insults
Dodge Taunts
Fart
Sunday, August 15, 2021
New Oval World Polygon
I fixed my oval from a few days ago. There are now a lot of points and my polygon is a pretty decent oval (or ellipse, CSS calls it an ellipse!). I made a simple daughter polygon with a dog leg somewhere near the center, more or less...
Isaac Arthur uploaded ‘Alien Artifacts and Xenoarchaeology’, but it was a little light on practical xenoarchaeology… 8-P Mostly speculation about death pact technologies, accidental or on purpose. After all, why is this civilization extinct?! Usually artifacts survive because they are the ubiquitous trash of a civilization, but the artifacts could survive because something is protecting them… I had a civilization survive the destruction of its people, the animate technology just kept everything running, adapting to flood by waterproofing parts of the city which now lies below the sea! It made for great local color, but it was another story which I abandoned.
Back to my oval polygon world map! Or an oval-shaped world polygon, anyway. I made the shape by generating points on the right from -50 y at the top of the map to +50 y at the bottom of the map, and then mirroring them on the left. I add the radius of my oval (actually a circle) and make a string which I can feed over to CSS to build a polygon div in the webpage. To subdivide, I grab a couple of points from my list of polygon points, make sure they’re not the same or right next to each other, and draw another string of points connecting them, building a pair of new polygons out of the two legs of the old one and this new leg. Just make sure they’re all clockwise… They need a border, somehow.
(I didn’t get that done)
I had a little trouble making the daughter polygon and positioning it properly with position absolute, but I finally got it to make that daughter polygon and display it properly. I need to make a list of polygons defined by their points and by the string I feed to the CSS. So the id, the list (of P2D), and the polyString.