HN user

city41

10,114 karma

Software developer in the Ann Arbor, MI area. Professionally I have mostly done JavaScript and TypeScript. Personally I'm interested in old video game systems, reverse engineering, and coding them in C and assembly.

matt.e.greer@gmail.com

https://mattgreer.dev

https://github.com/city41

https://bsky.app/profile/mattgreer.dev

Posts27
Comments2,832
View on HN
antfu.me 4y ago

Reimagine Atomic CSS

city41
52pts44
mattgreer.dev 5y ago

I built this static site with Next.js

city41
2pts0
github.com 5y ago

Hacking Vim into Godot's Editor

city41
2pts0
www.mattgreer.org 6y ago

Creating GIFs from emulator graphic data

city41
1pts0
www.mattgreer.org 6y ago

Extracting Neo Geo Emulator Graphics Data to Create Animated GIFs

city41
2pts0
www.mattgreer.org 7y ago

Squeezing the Arduboy for every byte

city41
2pts0
city41.github.io 10y ago

An in browser sandbox for Knex.js

city41
5pts0
www.mattgreer.org 10y ago

The Sega Saturn and Transparency

city41
173pts38
www.mattgreer.org 11y ago

ClojureScript Internals – Vectors

city41
1pts0
www.mattgreer.org 11y ago

A detailed review of Super Mario World

city41
6pts1
mattgreer.org 12y ago

JavaScript Promises in Wicked Detail

city41
13pts1
news.ycombinator.com 13y ago

Ask HN: What are your day to day pain points while coding?

city41
9pts11
dresdencodak.tumblr.com 13y ago

The Legend of Zelda, where Zelda is the hero (concept)

city41
1pts0
city41.github.com 13y ago

Breakouts -- applying the TodoMVC approach to game engines

city41
3pts0
familab.org 13y ago

Raspberry Pi based SNES machine, plays real carts

city41
4pts0
buildnewgames.com 13y ago

Particle Systems From the Ground Up

city41
1pts0
www.mattgreer.org 13y ago

Dynamic lighting and shadows in a 2D game

city41
5pts0
www.mattgreer.org 13y ago

Still waking up at 5am to code?

city41
53pts28
ideas.time.com 13y ago

Why the 'Open' Office is a Hotbed of Stress

city41
4pts1
blog.cityfortyone.com 14y ago

Forget it I'm only supporting Chrome

city41
3pts0
www.mattgreer.org 14y ago

Waking up at 5am to code

city41
594pts198
www.lovetopixel.com 14y ago

Show HN: Love To Pixel, a pixel editor written in JS

city41
4pts0
www.mattgreer.org 15y ago

Show HN: Google Charts done in Canvas, side project

city41
143pts28
www.livestream.com 15y ago

Crockford talks on JavaScript at Etsy (1+ hour video)

city41
1pts0
www.engadget.com 15y ago

TomTom user data sold to Dutch police

city41
10pts0
news.ycombinator.com 15y ago

Ask HN: If you're a programmer, how do you find artists, and vice versa?

city41
3pts3
gaming.mozillalabs.com 15y ago

Mozilla Labs Game On 2010: open web game development competition

city41
3pts0

I dismissed it as too technical for that blog post. I expected this post to be read by a wide variety of people, so I tried to keep technical stuff to a minimum. I did say it's simple and that it's what I'd probably use if I kept going with the project.

It is written in Lua and the source code is available (just extract it from the PC version). It's using Lua's number type for all numbers, which is a double precision float.

Thanks for the clarification (I'm the blog author). If one were to really make this game, how the cards would ultimately be rendered is hard to say. Sprites are nice because you can overlay them and form many card variations from just a few sprites. Tiles rendering into a background doesn't account for transparent pixels, so building up tiles into a single background is not possible.

One way to handle that is to provide all the possible tile variations, but that would take up so much space. So you'd have a set of tiles for a regular Ace of Spades, and an entirely different group of tiles for a Lucky Ace of Spades for example.

The GBA has 4 backgrounds, so it would be doable to grab three of them and use them to render cards. That would only leave 1 background left for, well, the background :)

Another option would be to use a memory buffer and implement tile rendering yourself that accounts for transparent pixels. That would be the best of backgrounds and sprites combined into one. That would solve many problems, at the cost of the implementation would probably take up a lot of space. My hunch is this would be the best approach.

This right here might be why I find this platform so interesting. It's very limited, and the limitations usually bump into each other and you often steel from Peter to pay Paul.

Oh and the post didn't mention debuffed cards (they have a red X drawn over them). That'd be yet another card layer to throw into this mix.

But that's basically what fixed point is, no? Half pixels is fixed point with a single bit for decimals. Quarter pixels is two bits, and so on. I think the disadvantage is you now have to think in a strange unit that isn't intuitive. For my game I tend to think in screen sizes for things. Thinking in screen size*factor would be harder I think. Fixed point is basically just doing that for me and hiding the details really.

To be fair, rereading the post I realize I did make it sound like you would only need this for positioning sprites. I'll see about rewording it.

Or maybe we're both talking about the same thing and you're taking a different approach. That is fair too.

I'm the author of the blog post. I just used sprite positioning as a simple example. Things like collision detection and physics can't be done with half pixels.

I almost never say "you're wrong", no matter how confident I am. Because I can be, and often am, wrong myself. If there is a disagreement, a miscommunication, etc, why not instead work with the person to find where you two differ and look for common ground? If the other person really is wrong, it's almost always naturally revealed that way.

utility classes won’t let you deviate because they’re limited

Tailwind's just in time feature does negate this a bit. I'm a huge fan of Tailwind but I've largely avoided JIT for fear of losing the structure finite classes give me.

Edit: the down votes are interesting as this is literally what Tailwind JIT allows. Their post on it even says "We’ll likely add some form of “strict mode” in the future for power-hungry team leads who don’t trust their colleagues to use this feature responsibly."

Yeah, for sure. This post and these comments just made me google caffeine for a bit.

If I don't get my morning cup I almost always get quite the headache, so I'm not surprised.

Both viewers annoyingly fill your browser history every time you move around or change zoom levels

To be fair that's not limited to map viewers. A lot of web apps do that. I think finding the right balance is a bit of an art.

A bad EM can do so much more damage than a bad IC. I don't think that's talked about enough. In my now very long career I've had 1 great manager, a few good/decent ones, and a lot of lousy ones. The lousy ones just make the job so much harder and sometimes outright miserable. A bad EM coupled with junior ICs can be particularly bad combo. At least as I got older I came to realize I can work with bad managers and help move things towards a better place, or bail if I feel it's hopeless.

How Quora died 2 years ago

Quora really captured lightning in a bottle around that time. I used to get a weekly (daily? Can't remember) email from Quora and I would read just about every question in it. I came to look forward to the emails. I've never had that experience with any other other newsletter.