#text effect javascript
Explore tagged Tumblr posts
divinector · 2 months ago
Text
Tumblr media
JavaScript Typing Text Effect
3 notes · View notes
codingflicks · 27 days ago
Text
Tumblr media
Animated Typewriter Text
3 notes · View notes
codenewbies · 1 year ago
Text
Tumblr media
Typing Text Effect
1 note · View note
codingquill · 2 years ago
Text
Essentials You Need to Become a Web Developer
HTML, CSS, and JavaScript Mastery
Text Editor/Integrated Development Environment (IDE): Popular choices include Visual Studio Code, Sublime Text.
Version Control/Git: Platforms like GitHub, GitLab, and Bitbucket allow you to track changes, collaborate with others, and contribute to open-source projects.
Responsive Web Design Skills: Learn CSS frameworks like Bootstrap or Flexbox and master media queries
Understanding of Web Browsers: Familiarize yourself with browser developer tools for debugging and testing your code.
Front-End Frameworks: for example : React, Angular, or Vue.js are powerful tools for building dynamic and interactive web applications.
Back-End Development Skills: Understanding server-side programming languages (e.g., Node.js, Python, Ruby , php) and databases (e.g., MySQL, MongoDB)
Web Hosting and Deployment Knowledge: Platforms like Heroku, Vercel , Netlify, or AWS can help simplify this process.
Basic DevOps and CI/CD Understanding
Soft Skills and Problem-Solving: Effective communication, teamwork, and problem-solving skills
Confidence in Yourself: Confidence is a powerful asset. Believe in your abilities, and don't be afraid to take on challenging projects. The more you trust yourself, the more you'll be able to tackle complex coding tasks and overcome obstacles with determination.
2K notes · View notes
wholesalemagnesiumoxide · 2 months ago
Text
The Simslops Afterword
hello everybody! thank you for reading my book. seeing people talk about it has been very gratifying & encouraging.
i was going to write this up essay style, but doing it as a q&a is more fun and still lets me cover everything i wanted to, so let's begin.
q&a
first off, a question from @aminoasinine which i'll address in parts:
I really enjoyed Simslops, and in particular I think the "dwarf fortress event log" style of writing is a great way to showcase the machine/algorithm aspect of it. What software was used for this? Did it have trouble keeping track of so many characters? I noticed the centipedes and other numbered masses were accurately tracked throughout the text, which is something that I know AI tends to struggle with. I'm also curious to know how much of the chapters' 'plot' was laid out in advance by the prompting, and whether any major events were the result of emergent narrative. In particular, the coffin + Maude's Salvation plot towards the end definitely felt like direct intervention on your part, but was the AI reacting to you inserting those things, or were you editing the text around them after the fact?
the simslops is the product of a custom program written in nodejs. the source code is available at the download page if you want to examine it in detail, but the core of the framework is as follows:
there are actors, items, and rooms with names and numerical flags.
there are actions, each defined by their conditions, effects upon the scene, and chance of being selected.
each chapter is defined by its starting conditions and available actions.
each round or tick (whatever you want to call it), a random available action is applied to the scene.
this is repeated until an action ends the scene or there are no more actions left to perform.
each action narrates itself when applied to a scene. for example, the source code for the "pick up an item" action looks like this:
Tumblr media
hopefully this is at least semi-intelligible if you don't know javascript. the first parameter defines what the action acts upon: in this case, an actor and an item. the second is the condition: the item must not already be held, and it must not have the pickupAttempted flag. the third is responsible for how the action affects the scene, and the string it returns is how the action is described in the text. when an actor goes to pick something up, if that something is immovable, this is noted. (otherwise every scene devolves into everybody struggling to pick up a couch.) if it's not immovable, the actor picks it up. the first case is described with "actor tries to pick up item, but it's hardly portable." (a reference to the inform 7 default responses) and the second with "actor picks up item." the fourth parameter says to multiply this action's weight by ten if the item in question has a description and has yet to be examined.
each action is defined similarly. a handful use grammars for more varied output, but the majority just have simple fill-in-the-blank sentences. all together there's nearly 6k lines of nodejs to define the whole book. this project started as a test case for this framework, actually. i was outlining a short story and hating it and had a thought: what if i wrote a program to generate an outline for me? then i could have a skeleton to work from and could get to the fun part, the actual writing. out of whimsy i decided to put some simpsons characters in a room and make them fuck. this is a more exhaustive test case than you'd expect. it handles solo actions (moaning) and pair actions (lustful looks & sex.) sex only happens when both participants are horny, which requires setting flags for each actor. kramer's appearance is an action not tied to anything in the scene, and giving birth is an action that creates new actors. a great deal of my motivation here (and in many other things) was "wouldn't it be funny / fucked up if..." but it also did its job of test case pretty well. once i added items, that necessitated inventories; theft & picking up & putting down all require certain types of checks.
it's funny that you mention emergent narrative, because i really think the simslops really became what it was in the telling. early in the process i became enamored with the image of one of the characters descending through text adventure geography, lost and alone. thus came the turn to pathos. i had read "does marge have friends" some time prior, which inspired maude's inclusion and the role she plays. from there i built things out with twin eyes toward thematics and "funny/fucked up". i do find it interesting to what extent all that was emergent from the implementation. it's a framework that tends towards reducing things to mush. a semantic satiation machine.
anyway, i hope this answers your question --- it's not LLM-based, it uses older, more "traditional" procgen techniques. the plot of each chapter is roughly scaffolded by the actions i attach to it. it's really incredibly authored; it's difficult for this framework to surprise me except by juxtaposition. under this framework it's also pretty trivial to track any number of actors. so, to answer this question from @zedogica:
how much of simslops was embellished from the original generated text? a few moments stood out to me
none of it. you can download the source and get your own personal simslops. the only human embellishment was done during development. in an ideal world, this would live on a server somewhere and everyone could download a unique generation. unfortunately, i don't have the knowhow for that kind of thing. (my understanding is that you need to do a lot when writing server-side code to make sure you don't expose a million security vulnerabilities.) i've contented myself with doing what i can client-side: releasing the source code & setting up the download button to give you one of five pre-generated outputs.
returning to aminoasinine's question:
I also really like the difference in language used during the Deviltongue chapters. It's interesting to see what changes when the tone is explicitly defined as 'horror' or 'scary', and how that seemingly translates to those bizarre compound words like tribulationmalice and torturefrenzy. I think it's my favorite chapter(s) in general because of how it takes a much different tone and hammers it into the same monotonous nothing as the other chapters despite its more 'active' and ostensibly 'less boring' setting than your standard centipede sex house. everything shakes and moans and howls with blood-malice, lymph and spines standing on end, over and over until it doesn't mean anything anymore. everyone and everything is trembling in fear of a grim finality bearing down that never actually comes, because nothing ever ends. It's the same nothing-emotion as all the unbearable passionate lust in the sex scenes, an emotional signifier that signifies absolutely nothing.
thank you! the strange compounds are a product of the aforementioned grammars, as are the shaking and moaning and howling. writing the dungeon & horror chapters made me realize i really like broad, dumb pastiches. there's something very satisfying about taking cliches and mangling them.
Anyway, the choice to have 'pet the dog' in every scene did not go unnoticed, I think the last three lines are my favorite part, and finally, I think every book from now on should open with a horoscope chart made from out of context quotes. Thank you for making this, I will be watching your neocities with great interest :)
thank you for reading it! two fun facts about the horoscopes:
each entry's text is taken from a random item description.
the dates are wrong, each offset by a day. due to my strong personal convictions i wished to stress that this novella in no way endorses the practice of astrology.
an anonymous question:
So Marge crying during the video game sequence show the reduction of feelings into simple fun, even though the human experiencing the games in question might feel other emotions when playing them. But what do the horror sections represent? I got the gist of most parts, but as I don’t engage with horror medium often I feel like the commentary is lost on me. What were you trying to say with the horror sections, in other words?
first: one of the major benefits of the framework i used here is that it's very good at creating unintended juxtapositions. the only prerequisite for weeping is if the actor in question is holding part of a corpse, but depending on the context, it can take on a number of different connotations.
second:
a lot of usamerican horror films (particularly aliens and predator) are sublimations of the anxieties surrounding the vietnam war. both are about big grizzled soldier guys getting picked off by an unseen yet omnipresent foe who can strike from anywhere. hell, one of them is even set in a jungle. slender: the eight pages, being a game about the Scary Getter following you around in a forest, feels of a type with these.
seymour skinner was a us soldier in the vietnam war.
in that vein, another anonymous question:
also I understand almost all of the references in the chicken’s names but how does sylvester stallone figure into colonialism?
one of sylvester stallone's two big roles is the rambo series, where he's a heroic us soldier rescuing prisoners of war in vietnam, repelling the soviets in afghanistan, or performing other jingoistic acts of horrendous violence. the other is rocky where he plays a white boxer (the "italian stallion") who's built up as a contender to the current reigning champion, Black boxer apollo creed. he's of a type with the other americana culture slop included, i think.
another question from aminoasinine:
Damn, I thought of another question right after I sent that long-ass ask. What was the thought process behind making The Bart such a minor part of the story? Is it out of a desire (or the AI's internal rules) not to have a child present in the gore/sex chapters, or is it more about how Bart as a character seems almost /more/ of a product or symbol than any of the other characters? Like, he can't really mingle with the other 'people' in this setting, because he is something beyond, having transcended any semblance of characterhood to become ONLY product? Is this the end state of every simslop, to eventually be reduced to a series of identical stimuli on a conveyor belt of endless content?
i settled on the cast of characters pretty early. homer and marge are obvious. ned is also pretty obvious. maude is the emotional core. "kramer bursts in" is a pretty common meme. and i had steamed hams edits on the brain, so seymour gets to come, too. i scaffolded out my story with a focus on these six and whatever pathos & resonance i could wring out of them.
i don't think i had any plans to include bart until i came up with that pun. "the work of bart in the age of mechanical reproduction." that + the factory itself is a very good illustration of the funny/fucked up philosophy & dichotomy. (i think i also had the bart doll from the trash meteor episode of futurama in mind.)
anyway, to answer your actual question: yeah, i didn't want to put bart in the main story because i didn't want to put a child in the mix, and he didn't fit in the outline i had drawn up. i think the intermissions pretty accurately capture the pathos of bart & milhouse, though. the funko pop scamp and the perpetual punching-bag.
this next question is from @where-your-eyes-dont-go:
I'm curious about the reason for "_ pets the dog" being such a frequent refrain in so many sections. I could read it a few ways— it's an action that's often used to humanize characters, and it occasionally does seem to give the characters more apparent personhood, the action almost automatically being interpreted by the reader as affection showcasing an internal life—but its repetition seems to force the reader to instead view it as just another merely automatic process. It also could be a bit of commentary on the common claim that a "pet the dog" button in video games automatically makes such games better. I'd love to know more about your thought process here.
early in the development process, i added "actor votes blue." as an inane flavor action. rqd suggested they pet the dog, and i thought it was brilliant. "can you pet the dog" is exactly the kind of empty posturing i want to satirize. i thought it would be best if the dog is never simulated otherwise. just as petting the dog is an empty gesture in games, in the simslops the dog only exists "in flavor", not mechanically. there is no dog actor or dog affection flag, it's just implied there's a dog around for each scene. the suggestion of something cozy and wholesome and cute happening without any actual substance. (and bob was there, too.)
(a friend had to dissuade me from adding "actor realizes why they're called Kojima games" as another flavor action.)
this anonymous question befuddled me a bit:
have you read Marge Simpson Anime?
"marge simpson anime... what in the world is marge simpson anime?" and then i looked it up and found a tumblr blog with a bunch of drawings of marge and went "oh yeah! marge simpson anime!" i haven't read it, but i've definitely seen it around, and i'm definitely at least in conversation with it.
(on the subject of things i'm in conversation with, i realized recently that i absolutely should have put too many cooks and the simpsons au where homer is in pain in the further reading section.)
a question from @theoretically-questionable:
I'm curious as to why the choices of both explicit sexual acts and disregard for consistent anatomy within said acts were made for Simslops; was it simply a transgression, influenced by the (surprising) amount of actual simpsons porn, or something else?
this one also befuddled me. my original intent had been to generate oddball descriptions of a consistent set of genitals, but, like. on further reflection, that super isn't borne out by the text. i think my mental image of things changed when i added the "adverbly-verbing" snowclone to the sex grammar. (score one for emergent narrative.) my initial motivation was that i think over-the-top, too-mechanical-to-be-erotic sex is a fun thing to write a generator for, and i find kramer and homer doing obscene things to each other amusing. the end result is a lot more mastaba snoopy in a way i really like.
here's a question from @txttletale:
why the simpsons? as opposed to, for example, family guy
i've had to think for a while on this. my instinctive response is "it was essentially random, an act of whimsy," but that's not a very good answer. surely something drew me to the simpsons, even if it was subconscious. let's try and peel it back a layer. my next theory has to do with pathos. it is very difficult to wring anything remotely poignant out of peter griffin. you put peter griffin in a scary cave and he goes "this reminds me of the time i was in the descent" and we get some inane cutaway gag. i can't imagine lois expressing anything more sincere than a scott the woz video. there's an obvious pathos to meg, the constant butt of the joke; treating her with any degree of seriousness gets you pathos in spades. similarly, that comic where chris griffin and bart simpson go to couples therapy is genuinely affecting. there's something there, but it's a very different something from what the simslops ended up being. (for one, i wouldn't feel comfortable doing all the centipede sex stuff if my principal characters are kids.) there's a similar issue with trying this with south park (which was also something i don't have much familiarity with). while the fandom has bafflingly devoted a great deal of time and energy to the emotional struggles of those little weirdos, i don't really see much potential there.
on the other end, we have futurama, a show with perhaps too much emotional weight to go in the blender in the same way. like, there are the episodes with fry's dog and fry's brother and leela's parents. similarly, bob's burgers and bojack horseman (and i'm sure many other shows) draw their characters too realistically. the simpsons hits a sweet spot. its characters are cartoon-enough, commodified-enough, and emotional-enough. they're in the goldilocks zone along all these axes.
in the simpsons movie, there's a bit where bart and ned go fishing. bart messes up somehow, ned goes to assist, and bart flinches away, expecting to be strangled. what was once a comedy routine, a subversion of the "father-knows-best" sitcom family, is treated with real emotional weight.
how did they ever come back from that? by the end of the film homer had redeemed himself as a person and as a father. it was the emotional climax of the movie or whatever. roll credits. there were a million billion more seasons and despite the increasing age of the voice cast, more simpsons are extruded every day. why bother? the rotten heart was laid bare nearly two decades ago.
finally, a question from @fattyopossum:
have you seen any interpretations of it youd consider like. unexpected, in either a good ro bad way? any takes on it now that its been out that youw erent expecting people to get or new interpretations people brought to it that really resonated with you
a lot of the thematic weight of the simslops feels post-hoc to me, like a new interpretation that wasn't there when i wrote it. again, it really became what it was in the telling; technical decisions lead to thematic weight. all characters who have sex have the same genitalia. i decided this because it made writing the sex grammar easier. however, it's also a huge thematic boon. casting marge and maude as transfem makes maude's abjection and their love for eachother much more impactful. it's really easy for me to get chicken-or-the-egg about it. which came first, the High Artistry or the Funny/Fucked Up?
(the real answer, of course, is that it doesn't matter. the text exits anyway and i must shepherd it as it exists, not as i intended it. ego death of the author.)
as for other people's interpretations: i'm quite pleased about the reasoning that anon expressed earlier for why marge was crying while platforming. i was also happy to hear a friend's read that kramer had finally found peace in the meadows, that she's with the girls and relaxing and having snacks. it's not really borne out by the text, but it's such a comforting thought, right? maybe if we imagine kramer happy, she will be.
trivia
the first commit hit my git repo in september 2024, and the simslops released march 2025. all in all it took about six months of on-and-off work.
the name "deviltongue" comes from a character i played in a game of neptune's pride. he ended up getting betrayed and dying badly. so it goes. (on a similar note: as a kid, i thought his name actually was "slideshow bob".)
originally, the sundervalley chapters were going to feature more of the classic cozy small farmer simulator tropes. homer was gonna go fishing and chat up the town's eligible bachelors: crow, tom, and cam. it would've distracted too much from the real core of the chapter, though, so it never got implemented.
my original design for the cover looked like this:
Tumblr media
i'm still not sure i made the right decision switching to the final composition. i like the oddness of eyes on the hair in that version, but the lines over the hair in the this version remind me of one of the ways you see dicks censored in hentai, which feels thematically appropriate.
on that subject, this texture:
Tumblr media
is a heavily mangled collage of a bunch of ai generated images, each of which was created by using the name of a simpsons' character as both prompt and negative prompt. it shows up in the download buttons and (in heavily desaturated form) on the final version of the cover.
the blurbs were slightly modified grammar output. i was pretty fried the day of release & wasn't able to think of anything, so rqd suggested i use a relevant wikipedia extract and use a grammar for the blurbs. i think it turned out pretty well.
there are six secret characters in the simslops. have you found them?
future work
i think i've taken this framework as far as it will go. the system of numerical flags got bent when i stored the farm workers' country of origin as text. the more linear plotted segments required a set of flags trading off each other, which is fiddly to coordinate. generally, everything is very siloed off. the clearest example of this is in the grammars for generating the various bits of procedural text. they're fun to write, and i'm always delighted by the results, but there's a lot of duplication of effort in my current approach. each chapter that uses procedural text has its own grammar with its own set of words and phrases. this is basically fine in this case, but it's not something i want to deal with for future projects. writing grammars is fun, like building a shipyard in a bottle, but it gets mind-numbing after a while. you can only come up with synonyms for laugh so many times, yknow?
my dream is a single massive grammar all output text runs through. since my grammar system can handle conjugating verbs and adding a/an in front of words, integrating all text output with that system would simplify all sorts of things. then i could have big lists of words to query for relevant adjectives or nouns with specific associations, procedural sentence structures, referents that know what adjectives apply to them...
it's really easy to get feature crept in this sphere. we'll see how much of this i'll be able to implement. i don't think all that is necessary to make the simslops framework useful, really. the only thing it urgently needs is some kind of event emitting & handling system. currently all the little special cases have to be implemented specifically. for example, there's a check in the "drop item" action for if the item in question is fragile. if it is, it breaks. if the item is also smoky, we get the "orange smoke pours out" effect. it'd be a lot cleaner (and make me a lot happier) if i could just say "when a smoky object breaks, emit orange smoke" and similar things.
thank you to everyone who read the simslops, and an extra thank you to everyone who asked me questions. now it's time to go back to work on the next issue. it's going to be a very different beast. i hope you enjoy it.
63 notes · View notes
retrcmoon · 2 years ago
Text
Tumblr media
CULPA MIA - MULTIMUSE MUSE PAGE !!!
This page is completely free. Please support me and my work by liking or reblogging this post.
[ INFORMATION ]
THIS CODE IS 100% JAVASCRIPT FREE!!!
This code comes in three versions: one with rules pop up and one without. one version is with filters.
Info on the filter version: For the sake of proper styling, the filters won't work on all browsers! A pic preview can be found here. Further explanations can be found in the code! Please read carefully.
The theme will adjust to (almost) all screen sizes.
All colors and effects are easy editable. Not many colors are needed.
The code offers 2 main links (Home and Ask) but also two free individual links.
Muse boxes come in two versions (with and without text box).
Hover effect on the muse pictures that reveal individual links (the amount of links is up to you!). Links can be easily edited out to remove the hover effect.
Grayfilter & Colored overlay for Muse Pictures available! (Please read in the root section of the css code very closely. It comes with explanations)
[ GUIDELINES ]
Do not claim as your own.
Do not remove the credit!
Do not use as a base code or take parts of this code for your theme.
Feel free to edit as much as you want!
Further credits and inspiration credits can be found in the code.
Click the SOURCE LINK to be redirected to the preview and the code! 
456 notes · View notes
correlatedcontents · 1 month ago
Note
Hi! I played your game 'my father's long, long legs' today and I thought it was great! I'm exploring twine currently for my master's dissertation and i was wondering if you could explain how you got the flashlight effect with the mouse? it was a gorgeous touch and made the whole thing super atmospheric. Thanks :)
thanks so much for playing! i'm glad you liked it. the flashlight effect is javascript: the player's cursor is replaced with a static image of a flashlight beam and the background of the window is set to black, so the overall effect is of a flashlight tracking across a dark space. then the game's text and the concluding images are also black (the legs are outline only, a transparent png), so when the cursor moves over them the flashlight image seems to "illuminate" them (when in fact it is just putting a white background behind them to make them visible). good luck with the dissertation!
8 notes · View notes
yuraslefttoe · 1 year ago
Note
How do you make the shaky text effects in your songs? They look so dynamic and I'd love to steal your skills lmao.
after affects position animator -> wiggly selector -> type wiggle(25, 2); or something like that in the javascript box
23 notes · View notes
parakaryote · 6 months ago
Text
Peeled of All Layers, In All Directions
The sharpest arguments are born from the fullest truth. Have a whetstone for your swords.
We seriously need to put ALL focus into the
Lack of consent,
Environmental,
Bias amplification,
And sheer size of datasets making them impossible to effectively or ethically filter
aspects of generative AI. No more philosophizing on what constitutes Art and makes it Worth Something, because no statement on “ugliness” or “soullessness” touches what actually brings harm.
And the thing is, I know for a fact those aren’t really anyone’s core objections, so it's strange how they've basically become stapled to the Actual Issues.
First, nobody complains about “the lack of human soul” or whatever when it comes to stuff that’s computer-generated/selected but has none of the Actual Issues, like those semi-random geometric patterns you can code JavaScript to create.
Second, I remember back before the Actual Issues were widely known, there were several memes and trends featuring the products of early generative AI models, and nobody made these sorts of statements then. (Remember the whole DALL-E trend, for one?) It was only when the Actual Issues became known that the attitude changed.
Focus on the reasons why “I used a fantasy map generator (the procedural generation type) to make the world for my story” gets no negative response while “we used Midjourney to make decals for some background items in this game”* gets calls for a boycott.
“Why didn’t you mention any of the ways in which it’s being used?”
Because, again, there are reasons to call specifically for the deletion of current genAI instead of regulation.
See the title. Even in a hypothetical situation where all "outer layers" have been peeled off (ie where use is strictly regulated and basically only allowed for memes or something) the problems with the thing in itself still exist.
Having said that, the issue of its uses is related to the issues of its nature. The ability to make images / text / video** of Literally Anything (which is what makes it so broadly dangerous) requires massive datasets… too large to be obtained 100% consensually… or be filtered effectively or ethically… and the immorality of that means it's in the creators' interest not to push for / to push against regulations in general… and their size requires shittons of computing (environmentally costly) to train models with them.
*“I bet they used genAI for other things too” is not an actual reason, because a) the reaction would be the same either way and b) treating the act of assumption, aka speaking without knowledge, as a guiding principle is a bad idea.
**Voice models not mentioned because they operate on different principles which require much less training data, so this paragraph isn't really relevant to them. I might make another post going into them later.
4 notes · View notes
zpuaacapstone · 4 months ago
Text
Update #3 (Part 1)
This'll be progress for the past week, since I went over Update #2 close to the 18th. I'm technically finished with the necessary elements to my Game Design Document. Any changes to it will be a result of edits. I've finished reading Jenny Harder's Creative Character Design for Games and Animation, which has helped greatly with the overall character design process and what I should be looking for when sketching.
Overall, since technically I'm the client and the briefing & character description is done, I'll do a style guide, the iterative sketching phase, the lineart + flat color and expressions, the color iterations, and the final render.
For the game section, the "sandbox" in RPG Maker MZ, where I've been inputting plugins to see what works and what didn't, has also been finished. These are the plugins I'll be including, as follows:
Tumblr media Tumblr media
To summarize, the features are:
A title screen made of custom graphics.
A parallax mapping plugin.
"Gab windows" that are message windows where the player can move as they appear.
Sound effects for dialogue text (like in Undertale).
A plugin that allows for character bust images in dialogue.
Smoother game camera.
Weather effects.
A custom menu system excluding the program's default "Status" and "Equipment" features.
"Skills" assigned for each playable character on the map, to be coded with my common events.
A "Proximity Compass" that serves as a major navigational feature in the game.
I'll have to rethink some mechanics, but at least I have a slightly better grasp at how Javascript works.
Writing the narrative script has also begun, with the introductory cutscene as well as some character establishment having been typed out. It's currently on Google Docs, and I usually have a more screenwriting-related format since I took a course on screenwriting years ago.
Tumblr media Tumblr media
Perhaps I'll put in edits while putting this dialogue into the game engine, and try to make it seem less stilted and full of information dumps. Some hurdles is that now that I have a better grasp at how long each task will be, I'll have to edit my Workback Plan accordingly. It's less than a week left of February, and I want to have at least 95% of what I wanted finished before March to be done, which is made harder by delays. At least by now, the pre-production is ending and the production phase has begun.
2 notes · View notes
tempkiriri · 1 year ago
Text
Spoiler-Covering on the T&B Wiki: Feedback *Needed*
Spoilers. It's kind of absurd and insane when you go on a wiki for the *latest* content and none of it is spoiler covered. And by latest I'm talking about like, maybe released 12 hours ago. At HeroTV Database, we don't do that. All story-related content is put under a year incubation period and must be covered. The only exception to this is S2 Cour 2, which whilst it still must be covered, has an indefinite embargo date atm.
I've made 3 iterations of a "Spoiler" template, aiming to hide text and images by default. Version 1 was just a ripoff of the template as seen on FE Fandom wiki (please forgive me) but that ran into the issue of the expand/collapse prompt being off to the right side and the more text was hidden I came to mind, the lower the click prompt fell, for some reason. It being outside of the box and floating away was not ideal for design. Also, this had to be used in-conjuction with another template to mark off the "end" of a spoiler. Most, not all (namely multiple paragraphs of info and anything containing images) needed this, and it's just very clunky to use and look at. Version 2 was promising at first, but two big issues were that it was a table of sorts and I couldn't find a way to make the drop-down opaque (either just white, or it copied the colour from the primary banner part), and spoilers must reside in the table, meaning if the content it contains is long enough, it will push itself down below any other templates or images just to display. Not great. Version 3 is the best one to date, and would be perfect if not for one problem: Every use of it on a page is recognised as the same instance, since the ID for the "Show me the spoilers" button in the banner is the same across all uses of it. Clicking on just one activates every single spoiler on the page, so you might want to see one but not the others and if you don't close the first one...problems. Yeah. This was so close.
After this specific failure of V3, I went to look for help in the Miraheze discord server, and everyone over there is oh so nice n helpful. Provided by a user going by 'canada' in the discord, they've given us code for a "block spoiler-cover" function that utilises CSS and JS to work, and is VIEWABLE ON MOBILE!!!! (This is something that would not be possible on Fandom, as Fandom Mobile has no JavaScript OR CSS support because Devs are liars when they say they want to make mobile fandom better.)
Before properly implementing it onto main pages, I *require* feedback. The link above is to the sandbox, where the spoiler boxes are being tested. Use the "Show all spoilers" to reveal all of them at once, or click/tap on a box to show, and click/tap again to hide. Tapping on an image takes you to the file page of an image, covered or not, so to not get taken to an image page, safest bet (usually) is to tap on a corner, or click where your mouse cursor does not shift into a hand ready to click. I'll see if there's anything I can put in the code to stop it from doing that. I'm certain I can change the colours of the spoiler box (current colours are purely placeholders), but colour suggestions should try to contrast with red, white, black and the shade of blue that's recognised as hex #2A3C45 (A darker blue intended for a dark mode). The colour should also be somewhat desaturated so it's not blinding to look at, so a pastel colour could be beneficial, maybe a pink or yellow, it's up to you what would look best! The more opinions the better!
The feedback is primarily for if we want this to begin with, and for stating adjustments you want before it does go into effect on main pages. If you do not want this to go into effect and want something else, please make that voice heard!
Thanks and Thanks Again!
7 notes · View notes
divinector · 5 months ago
Text
Tumblr media
Text Effect using typed js
3 notes · View notes
codingflicks · 2 years ago
Text
Tumblr media
Parallax Scrolling Animation with SVG Text Mask
1 note · View note
thegrayascendancy-if · 2 years ago
Text
Sugarcube, flat stats and setter links
As I spent an unspecified time trying to figure it out, maybe it will spare someone the trouble or build towards intuition for how stats work. Or maybe this is bait to see if anyone knows a better solution 😏
First of all, flat stats vs fairmath stats. Fairmath stat accumulation is designed to represent stat gain as inversely relative: the higher your stat value, the smaller your absolute gain would be expressed by the same relative number. E.g. 10% gain at 90 is different from 10% at 15. A bonus (and very important) effect of this is that the stat value increased or decreased via fairmath will never fall below 0 or rise above 100, doing all the stat clamping for you.
Fairmath is easy to test and observe in ChoiceScript, where you can run thousands of tests automatically. You cannot do that in Twine. This is my primary motivation for going with flatmath for my SugarCube project. Which means that someone has to handle clamping, as a gain of 10 at stat value 95 will set the value above 100.
The frequent code for handling that is during change:
<<set $stat to Math.clamp($stat + 5, 0, 100)>>
which, in this example, increases variable $stat by 5 and makes sure the result is not smaller than 0 and not greater than 100: clamping.
My problem with it is how much code repetition is there and how incredibly copy paste error prone this is. You will no doubt be copy pasting this code all over your game files and will need to make sure you are replacing the variable name twice each time, lest one variable will end up with the value of another in an oversight that is way too easy to miss. Ideally we want to specify not only the name of the variable, but also our bounds (0 and 100 respectively) only once.
There are two answers to this problem: widgets and JavaScript. A widget for this is one and done, but it is more fuss to integrate it into code, I found. In the JS solution you would need to figure out a function that works for your variable storage schema.
Let's cover the widget solution first:
<<widget "modify">>     <<print '<<set ' + $args[0] + ' to Math.clamp(' + $args[0] + ' + ' + $args[1] + ', 0, 100)>>'>> <</widget>>
Not only will the above check that each resulting value is within the [0; 100] range, it accepts the variable name as a parameter, meaning it will work for any stat (though you would need to pass the variable name as a String) and for subtraction too:
<<modify "$stat" -18>>
Now to problems. For my links between passages in the format for Twine I use, SugarCube, I strongly prefer the structure of setters:
[[Link text|NextPassageName][stat modifications]]
Calling a widget is not possible inside a setter link though. You would either need to do that in the next passage, which is inconvenient if you do not need that passage for anything else, or to marry two syntaxes in this unholy matrimony:
<<link [[Link text|NextPassageName]]>>   <<set $otherstat to "wowza">>   <<modify "$stat" -18>>   <</link>>
And this is just one link/option.
Now, for the price of extra JS code you can avoid all this. Depending on how you store your game variables, flat or in objects, you can employ tricks to save you time and code lines.
window.modifyStatA = function(value) {     State.variables.StatA = Math.clamp(State.variables.StatA + value, 0, 100); }
This anywhere in your custom JS file for the game will allow to do the following:
[[Link text|NextPassageName][modifyStatA(-18), $otherstat to "wowza"]]
and will change the value of $StatA by subtracting 18 upon clicking that link/option.
You can also do the following:
window.modifyStat = function(statName, value) {     State.variables[statName] = Math.clamp(State.variables[statName] + value, 0, 100); }
which creates a more generic function:
[[Link text|NextPassageName][modifyStat("StatA", -18), $otherstat to "wowza"]]
As you can see, this is suitable for flat stat storage (which I personally do not do). I suppose for the nested stats you could specify the object names as inputs in their order of hierarchy and access them so for a generic function, but I am not sure yet how to do that for a variable number of levels, e.g. Parent.StatGroup.statA vs Parent.statB
I believe this is geared to the very specific way I personally structure my passages and links, so I am ready to be proven wrong 😅
Cheers!
22 notes · View notes
webpin0-27 · 9 months ago
Text
Design a User-Friendly Website:
Essential Principles You Need to Know
A user-friendly website is crucial for engaging visitors and retaining their interest. Prioritizing user experience (UX) in your website design not only improves navigation but also boosts conversion rates and enhances your brand’s credibility. This post will explore foundational principles for creating a user-centered design, including responsive website features and effective website layout strategies. Implementing these best practices will ensure that your website attracts visitors, encourages exploration, and drives action.
Creating a Seamless Online Experience: Key Principles for Designing UX design plays a pivotal role in effective web development. Whether you are building a new site or revamping an old one, a user-friendly interface is essential for retaining visitors, enhancing engagement, and increasing conversions. Below, we outline critical principles for creating a website that is intuitive, clean, and easy to navigate.
The Cornerstones of a User-Friendly Website
Prioritize Simplicity and Clarity Your website’s primary goal is to convey information quickly and effectively. A cluttered website layout can overwhelm visitors and detract from their experience. Focus on a minimalist approach with clear navigation menus and easily recognizable call-to-action (CTA) buttons.
Optimize for Mobile Responsiveness In an era where mobile browsing is prevalent, a responsive website design is essential. Ensure that your site functions seamlessly across all devices, with fast load times and a mobile-friendly layout. This optimization enhances both user experience and site speed.
Focus on Intuitive Navigation Visitors should be able to find what they’re looking for without confusion. Group similar content together, use logical categories, and incorporate a search bar. Avoid hidden menus or hard-to-find links that disrupt the user’s flow.
Maintain Consistent Design Elements Consistency in font styles, colors, and layout fosters familiarity and trust. Choose a color scheme that reflects your brand identity and apply it across all pages. Consistent design elements aid in easier site navigation and improve overall user experience.
Enhance Site Speed and Performance A fast-loading website is crucial for user satisfaction and search engine ranking. Optimize images, enable browser caching, and minimize JavaScript to improve site speed. A slow website frustrates visitors and leads to higher bounce rates.
Employ Visual Hierarchy Users scan web pages in a predictable manner. Use larger fonts for headings, bold colors for CTAs, and ample white space to highlight important elements. A well-structured website layout guides users to your content naturally.
Advanced Tips for Improving User Interaction
Include Engaging Visuals and Multimedia Balance text with images, infographics, or videos to create a visually appealing experience. High-quality visuals attract attention and can help clarify complex information. However, avoid overloading your pages with media that might slow down site speed.
Use Accessibility Best Practices A truly user-friendly website is inclusive of all users, including those with disabilities. Utilize alt text for images, ensure your site is navigable via keyboard, and choose contrasting color schemes to improve readability. Accessibility is key to a comprehensive UX design.
Implement Clear Call-to-Actions (CTAs) Guide users towards the actions you want them to take by using effective CTAs. Whether it’s making a purchase, signing up for a newsletter, or scheduling a consultation, place these prompts where they are visible and ensure they stand out.
2 notes · View notes
repguardians · 1 year ago
Text
Mastering On-Page SEO: A Complete Breakdown of Essential Techniques
Tumblr media
In the competitive landscape of digital marketing, mastering on-page SEO (Search Engine Optimization) is essential for achieving higher search engine rankings and driving organic traffic to your website. On-page SEO refers to the optimization efforts made directly on the web pages to improve their visibility and relevance to search engines like Google. By implementing effective on-page SEO techniques, you can enhance your website's chances of ranking well for relevant keywords and ultimately attract more qualified visitors. Here’s a comprehensive breakdown of essential on-page SEO techniques to help you optimize your web pages effectively:
Keyword Research and Optimization
Keyword research forms the foundation of on-page SEO. Start by identifying relevant keywords and phrases that your target audience is likely to use when searching for content related to your business or industry. Use tools like Google Keyword Planner, SEMrush, or Ahrefs to discover high-volume keywords with manageable competition.
Keyword Placement: Once you've identified your target keywords, strategically place them in crucial on-page elements such as:
Title Tag: Include your primary keyword near the beginning of the title tag to improve relevancy.
Meta Description: Craft a compelling meta description that includes relevant keywords to increase click-through rates.
Heading Tags (H1, H2, etc.): Use heading tags to structure your content logically and incorporate keywords naturally.
URL Structure: Optimize your URLs by including relevant keywords, keeping them concise and readable.
Optimizing Content Quality and Relevance
Content remains king in SEO. Create high-quality, informative, and engaging content that satisfies user intent. Google prioritizes content that provides value to users, so focus on:
Content-Length: Aim for comprehensive content that thoroughly covers the topic. Longer content tends to perform better in search engine rankings.
Keyword Density: Avoid keyword stuffing and ensure keywords are used naturally throughout the content.
Use of Multimedia: Enhance user experience with images, videos, infographics, and other multimedia elements. Optimize these elements with descriptive filenames and alt text.
Mobile-Friendliness and Page Speed
With the majority of internet users accessing websites via mobile devices, ensuring your website is mobile-friendly is crucial for SEO success. Google considers mobile-friendliness as a ranking factor, so:
Responsive Design: Ensure your website design adapts seamlessly to various screen sizes and devices.
Page Speed: Improve loading times by optimizing images, leveraging browser caching, and minimizing CSS and JavaScript files. Use tools like Google PageSpeed Insights to identify and resolve speed issues.
Internal Linking and Navigation
Internal linking helps distribute link equity throughout your website and enhances user navigation. Create a logical hierarchy of internal links to guide users and search engines through your content. Key practices include:
Anchor Text: Use descriptive anchor text that includes relevant keywords for internal links.
Site Structure: Organize your website into categories and subcategories to facilitate easy navigation and indexation by search engines.
Technical SEO Considerations
Technical SEO ensures that search engines can crawl and index your website effectively. Pay attention to:
XML Sitemap: Create and submit an XML sitemap to help search engines discover and index your web pages.
Robots.txt: Use a robots.txt file to instruct search engines on which pages to crawl and which to avoid.
Canonical Tags: Implement canonical tags to prevent duplicate content issues and consolidate link equity.
User Experience (UX) Optimization
User experience directly impacts SEO rankings. Prioritize user-friendly design and functionality by:
Clear Call-to-Actions (CTAs): Guide users towards desired actions (e.g., sign-ups, purchases) with prominent CTAs.
Readable Typography: Use legible fonts and appropriate font sizes to enhance readability.
Secure Website: Ensure your website has an SSL certificate (HTTPS) to provide a secure browsing experience.
Regular Monitoring and Optimization
SEO is an ongoing process. Monitor your website’s performance using analytics tools like Google Analytics and Search Console. Regularly review:
Keyword Rankings: Track keyword positions and adjust your strategy based on performance.
Traffic and Engagement Metrics: Monitor organic traffic, bounce rates, and time-on-page to gauge user engagement.
Algorithm Updates: Stay informed about Google’s algorithm updates and adjust your SEO strategy accordingly.
Conclusion
Mastering on-page SEO requires a combination of technical expertise, strategic planning, and continuous optimization efforts. By implementing these essential techniques and staying abreast of industry trends, you can enhance your website’s visibility, attract more organic traffic, and ultimately achieve your business objectives. Remember, SEO is not just about ranking higher on search engines but also about delivering valuable content and a seamless user experience.
By prioritizing on-page SEO, you can establish a strong foundation for your digital marketing efforts and drive sustainable growth for your online presence.
4 notes · View notes