Activity

Alex Lu

Shipped this project!

Hours: 12.59
Cookies: 🍪 94
Multiplier: 7.46 cookies/hr

I built a portfolio site! It’s not quite where I had initially planned, but it’s got some flair and now I have place to post my projects!

Alex Lu

Oops. Sometimes with long hours of work, you’re getting carried away in the zone. Other times, it’s not so productive. These 15 hours were a bit of both (just kidding, 100% the latter), while I tried to figure out sockets and networking.
As a noob to networking protocols and asynchronous threads (especially in Python), keeping track of execution points was a big source of frustration for me. For just about 8 hours, I was rerunning the client and server programs over and over to try to understand why sockets were disconnecting preemptively. This led me to a couple findings about the code and the process of fixing code.
Before starting, mock up just 2-10 lines of rules about data typing, which thread is in charge of what, and when to clean up. This will save one from tons of confusion later on.
Secondly, debugging sucks when everything depends on the implementation of everything else. While, not exactly a direct solution, I found that just thinking without the code can reduce the overhead to solutions if you do get stuck in a hole like this.

Next, real-time games process drawing and events independently of input. I needed to figure out how to use my existing input system with threading in order to get info from the server without waiting for input. Attempting to start a thread with just a getch call will fail with no actual inputs, as it is a thread-safe, blocking call.
The obvious idea was to just use a library tracking the actual keyboard, however this was not ideal. I wanted to limit dependencies, and capturing keys wasn’t quite the solution I wanted.
I eventually, went back to the documentation and… immediately found the function I needed.

Taking on unfamiliar tasks can be difficult, result in great frustrations, and a severe lack of sleep, but these experiences are integral to growing, and it feels darn good to overcome a big hurdle. ; 1

Attachment
0
Alex Lu

Hihi. I wanted to learn about multiplayer games and tcp connections so I decided to recreate a classic game in multiplayer!

This first session was in procrastination of important homework and job hunting so ermm…

  • Set up a project
  • Figured out basic connections with Python’s socket library
  • Created some classes for creating snake body parts and stuff
  • Imported tGame modules, an old project of mine for input buffers, drawing, and more for the terminal
  • Figured out pyproject.toml w/ hatchling
  • Basic movement w/ threaded input
Attachment
0
Alex Lu

Hii, continuing with my rather slow progress, today I created component for displaying slideshows that automatically scroll and bounce back when it reaches the end. You can also manually scroll it if you needed to with the arrows.

I’m really proud of how it turned out because the bouncing back and forth is really satisfying to watch.

My biggest struggle was figuring out how to correctly size the cards, especially across differently sized devices. Initially, I had the slideshow as a flex box, as well as the individual cards. The idea for this was to have dynamically sized cards that could have long descriptions. However, neither of these worked. Firstly, the cards would look strange with long descriptions, so I decided to have a set aspect ratio to prevent big empty spaces and/or super long cards that extend the slideshow to an awkward height. Secondly, the slideshow being a flexbox meant that I couldn’t easily cut off the excess to create a scrolling effect, as each card would just become smaller to fit or wrap to the next line.
The solution that ended up working was to have each card as an inline block with a fixed aspect ratio, and cut off super long descriptions (these should be quick summaries anyways) with ellipses. Additionally “whitespace: no-wrap + overflow: scroll” was what I was looking for in terms of keeping cards in a single line.
I learned that there are often many ways there are to approach a problem, and sometimes the solution is in a completely different ballpark, so you just have to keep looking.

1

Comments

developergirishgiri

nice plz give me vote also and follow me

Alex Lu

Ayy, made some animations and started writing the about me section. I know it’s all just looks so far but this is really cool and what makes web dev so fun imo.

Another thing I did was just fix a bunch of the tailwind classes. While it is so easy to make components with Tailwind, it can get kind of annoying to rewrite entire class names (avoiding use of @apply as much as I can).

Lastly, I started working on a slideshow and blog style posts for my projects, but I only have templates right now so there’s not much of a visual…

Attachment
0
Alex Lu

Made a footer with contact/“find me” info! I spent way to long deciding on how it should look lol.

Attachment
0
Alex Lu

Hi just started with setting up the Astro project! Got a minimal homepage and navbar that I think look cool, but there’s no content yet :)

Attachment
0
Alex Lu

Shipped this project!

Hours: 2.81
Cookies: 🍪 21
Multiplier: 7.56 cookies/hr

You can mine ore, upgrade pickaxe, and win!

To play, just start clicking the ore in the center of the screen, you’ll be able to upgrade when you have enough by using the anvil in the bottom right. This gives you better ore. Achieve diamond level to win!

Very basic UI and gameplay, but pretty good for 2 hours imo…

Alex Lu

We were kind of on a time crunch, so this will be the only devlog. All the art was made by my friend (https://grcubes.itch.io/) and I did the coding. Started by creating a simple game window with squares that you can click. Then, this was hooked up to some JavaScript to count how much of each resource you had, so it can be used in the shop. Afterwards, we implemented a shop (forging station) to finish the game.

Attachment
Attachment
0
Alex Lu

I’m working on my first project! This is so exciting. I can’t wait to share more updates as I build.

Attachment
0