Jump to content


Photo

♥ ♥ ♥ Rengar ♥ ♥ ♥ cute kitty


  • Please log in to reply
123 replies to this topic

#121 Dopple

Dopple

    Ice cream supreme

  • Pink
  • 4347 posts
  • Gender:Male
  • Location:Heimdallr


Posted 17 September 2017 - 09:57 PM

Following the tried and true tradition of neglecting homework, I made Discord slots with emotes. The first version had a 1/241743123 chance to win anything because every cell is independently generated. I put a lot of gory work into biasing it to have a better than 1/241743123 win rate! Comes in 3x3, 5x5, and MapleStory flavours. (There's also a 7x7 version that I think probably shouldn't exist.)

 

KM00hEE.jpg

 

But this other command I made seems to be much more popular for some reason

 

SF6xaCX.jpg


Dopple loves you. Yes, you.

f_by_nepharus-d7fbwoh.png

 




Please support our sponsors and mapletip. Don't block ads if you want mapletip to survive! If you do not want to have ads, simply Subscribe to mapletip today!

#122 Dopple

Dopple

    Ice cream supreme

  • Pink
  • 4347 posts
  • Gender:Male
  • Location:Heimdallr


Posted 09 October 2017 - 05:21 PM

Coding is quite a lot like other kinds of writing. Functions are like sentences, and classes are like paragraphs. Take this bit of wisdom:

 

Functions should do one thing. They should do it well. They should do it only.

 

Sounds like advice on how to structure a sentence, to me!

 

 

As for this month's features:

 

Scratch card, a simple luck-based game where you match 3 of the same tiles.

 

5IwbhBX.jpg

 

 

Hammerpot (which is really Final Fantasy XIV's Cactpot). You reveal some tiles, then do some mild sudoku to guess the highest paying line of numbers.

 

p0q4glu.jpg

 

Wait, this MONTH's features? A lot of stuff I've done isn't especially visible. I can even attribute a couple of days' work to troublemaking friends trying to break my input handler. "It's a duty," they say. "Never trust the user." Bah! (Plus I changed the algorithm for slots, but it's not super interesting, is it?)

 

Box drawing was some hardball ASCII etch-a-sketch. The plus side is that I can generate grids of any size now. That opens the possibility for Battleships, Omok, and other kinds of board games. I'm excited, even if nobody else is. :'D


Dopple loves you. Yes, you.

f_by_nepharus-d7fbwoh.png

 


#123 Dopple

Dopple

    Ice cream supreme

  • Pink
  • 4347 posts
  • Gender:Male
  • Location:Heimdallr


Posted 17 October 2017 - 01:21 PM

I spent the week recreating Blackjack for Discord. It's the biggest pile of spaghetti yet (as far as Rollbot features go). I started to feel the weight of technical debt when I was attaching the player join system... Well, combing it is a burden for another day. I have a midterm and somehow I don't care. D:

 

rncmZYl.png

 

Easy to add hundreds of lines of crap, not so easy to optimize them.

 

Blackjack is a mechanically simple game, but then you Google the rules and get literal essays on how to play it. Translate those rules into code, and now you have the code equivalent of an essay barfing itself out, where you catch the overflow in as many classes as you can. My poor BlackjackExecutor...

 

Not really related, but someone asked me how to get into drawing the other day. I'm a fan of this picture:

 

urAfrNx.jpg

 

You can even cut out the circles part--I hate starting with circles too. Draw an owl. Then draw another owl. Then draw 100 owls. If you're somewhat critical while doing this, you can trust that mistakes will eventually correct themselves. For this reason, I don't get worried or upset about learning how to code. Sometimes it's a frustrating process, but that's just part of it. My comp sci friends can give up on me all they like!


Dopple loves you. Yes, you.

f_by_nepharus-d7fbwoh.png

 


#124 Dopple

Dopple

    Ice cream supreme

  • Pink
  • 4347 posts
  • Gender:Male
  • Location:Heimdallr


Posted 11 November 2017 - 07:39 PM

Can I take a moment to rant about long, convoluted* sentences? Nothing makes me exit a story faster than seeing sentences that can't control themselves.
 
A foreword: they say the first rule of writing is that there are no rules. But with any craft, I like to think there are principles. Principles that explain, for example, why I can't use eye-blistering mosaic filters in my graphics. Or why I can't write a function called myFunction() that accepts five arguments and performs fifteen operations. Or, why I can't draw characters with faces that are three-quarters forehead, while claiming it's my style.
 
Why can't I write a sentence detailing the mental state of every character in the room?
 
Long, convoluted sentences often are a product of not knowing what's important--and probably, thinking that everything is important. Now the latter is technically true: you should consider every word in a sentence. But not all word classes are born equal, and not all parts of a sentence carry equal weight. 
 
- The most important words are the verbs and nouns**. Most others are glue. A sentence with weak verbs and nouns is like a trip between a used sandwich wrapper and a wet noodle. Slathering on more glue, or tossing in a banana peel isn't the solution. 
 
- The most important information should be placed at the beginning and the end, ie. applying the serial-position effect. For a sentence, usually the choice is an aforementioned verb or noun. That said, the problem with ending in a preposition isn't because it's grammatically incorrect (who cares?), but because it's weak.
 
- Commas, em-dashes, etc. can break sentences into portions that are easier to parse. Punctuation is like magic when it comes to readability: not enough people believe in it.
 
Some deadly devices in convoluted sentences:
 
- Good old comma splice, I do it all the time.
 
- Conjunctions. If combining two concepts 'A and B', they better be related. You can tell I'm serious, because I clicked italics and bold. Similarly, "while," "but," and the like--they better be legitimate comparisons or contrasts. And if they are related and legitimate, they better not be doing the job of a properly formatted paragraph.
 
Every so often, I see "and" tacked on a sentence, so it can plough on about something barely related, if at all. No, no, stop!
 
- Concurrent events. Check this bad boy out:
 
Frederick swallowed and his gaze flickers to Chrom as he sits frozen, stiff with his stomach clenched as it tried to squirm itself free inside him.
 
 Gaze flickering -> sitting frozen -> stomach clenching -> stomach squirming
 
Holy moly! Two pairs of concurrent actions in a sentence. Even one can be too many. Let's painstakingly lay this out: a sentence is a series of words. A series is linear. For the most part, readers parse sentences linearly, ie. one event after another. Concurrent actions will then fail to be concurrent when parsed. You can imagine why it's fake news to claim that four things are happening at the same time.
 
Can you tell who the latter "he/his/him" are referring to? Because I can't. Also, what the heck is this person's stomach even doing? There are so many things wrong with this sentence... Makes me want to add more advice, like say what you mean.
 
-
 
*Long: more than 20-25 words. Convoluted: more than one idea. Mix 'em up for maximum disaster. Did I say something before about long sentences and Blizzard finalists? That story was about insanity. You may have insane punctuation if your story is insane.
 
**Verb and noun selection is an entire rant of its own. Maybe another time.

Dopple loves you. Yes, you.

f_by_nepharus-d7fbwoh.png

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users