Wallpaper

12/08/2024 11:51

Random art

Just did this in Krita, feel free to use it. Resolution is 1080p

1

0

Write a reply (0/3500)

Replies

No replies yet

Comment formatting in VSCode

12/05/2024 11:54

Comment syntax highlight

Recently I've enjoyed having underlined and white text as my comments in code syntax formatting.
For me, it makes it clear that something new will happen here, and it makes my code more like reading a book of chapters, rather than a puzzle to decipher.
It helps with clarity of mind.

How to

Here is how to enforce this in any theme in VSCode
Open your user settings with CTRL + Shift + P and search for User Settings JSON

and then you have nice, clear comments.

How is that?

Do you like it? How do you like your comments to look?
Do share your thoughts below.

0

0

Write a reply (0/3500)

Replies

No replies yet

Testing o1-preview

11/20/2024 15:00

Testing o1-preview

I got access to o1-preview today.
Recently in my videogame, I made it so users can generate images from text.
Specifically I made so they can generate vector icons with transparent backgrounds.

Prompt: Pets, dogs, care
Output image:

I found that feature very useful, and I wanted to make a website with just that.

Let's go

Since I don't have a premium ChatGPT account, I cannot use o1-preview directly on their webisite.
However, I do have an API key with money on it. So I decided to make a quick nodejs project to communicate with o1-preview.

Then I added a script to package.json to run o1-preview

I created the script, plan.mjs

This takes a prompt as input and generates a file, plan.md, which is the response from o1-preview

I feed it with this massive prompt, describing the entire application:

and it gave me this long, beautiful output:

Opening plan.md

To open plan.md and view it with proper formatting, I used the Markdown Preview Enhanced extension.

...though I found out now that VSCode actually has really good Markdown support out of the box, and you can just press CTRL + Shift + V to toggle preview, but whatever.

Following the plan

So o1-preview seemingly made me a plan, that would take me from nowhere to a finished project.
That would be the case, until I hit my first bottleneck

The environment variables wasn't picked up by NestJS.
I had to manually patch it in, so my developer skills became useful.

Then I also had to patch the API calls.
The input type wasn't specified properly, so when generating the backend to use with the front-end, the input wouldn't get specified correctly.
Luckily also an easy patch, as I just had to add two lines of type specification.

The generated API was also missing a way to associate an endpoint with it - it seemingly tried to request http://localhost/ but my back-end was running on port 3000 and not 80.
I had to manually patch it as well - was very easy to do.

The auth was also broken.
Despite the plan including an Auth guard which is seemingly integrated into the NestJS constroller, I was met by an error I was too lazy to resolve.
Have I had a little more determination, I would have resolved this too, but decided as per the example just to remove auth.
I wasn't going to deploy this anyways.

And so it kept going, for a long time, until I eventually had something running:

It actually managed to generate an image with Together AI, upload it to Wasabi and create a Node in the Neo4j database!
That is just incredible... but it wasn't exactly according to the prompt

What it missed

Stripe integration
I was hoping to get a skeleton for payment integration, as I used a lot of the prompt to describe it.

User page implementation
It only got the very basics right, and seemingly forgot about the ability to fuel and see your profile page.

Authentication flow
There is a stub for the login, but it isn't implemented. I expected the model to deliver a more complete plan.

IP Restriction
I asked the model to restrict the anonymous user after generating 5 images, but it forgot about this completely

Reality check

While I think o1-preview is an amazing model that has strong capabilities, it still misses the input from the developer to really deliver anything.
And while I know that isn't the point of the model, but more to plan out your project, I think it serves as a proof of concept of what probably is to come.
One thing is for sure, and that is the future of this is exciting.

The goods

The way the plan created the NestJS services was very clean and modular.
I like how it created an S3 service, a Together AI service, and then used the two of those in an Image service.
It's a better approach than cluttering it all in one Image service, as you are able to re-use the S3 service and the Together service across multiple services.

I think as of now, this model feels like an extension of ChatGPT that is able to reason in a broader sense than the previous, but doesn't work perfectly well without human intervention.
It's still really good!

0

1

Write a reply (0/3500)

Replies

1

(1/0) 11/21/2024 10:08, anonymous user wrote

Claude sonnet

Playstation 1 Development Tutorial | Setting up on Windows

10/29/2024 21:17

How to Make Playstation 1 Games

Setting up the environment on Windows

Installing the tools

You will first need a few tools. Click below to download the tools.

Extract the .zip file, then run Install.ps1.
Once you ran the install script, you are all set.

Installing an emulator

To test the games we make, we need to make our PCs able to run Playstation 1 games.
To do that, we will to install a Playstation 1 emulator.
Playstation 1 emulators such as PCSX-Redux can run Playstation 1 games on a PC.

Here are three good emulators you can use, each with their own strengths and weaknesses;

About the emulators

PCSX-Redux is an emulator and the most modern debugger, where you can also debug your games. This means you can print to console, see variables and use features such as breakpoints in Visual Studio Code. It's not always 100% accurate, and I have ran into issues where its accuracy just didn't cut it, but it's still my main emulator when testing games due to its modern nature. I use PCSX-Redux as my main emulator, and switch to no$psx when it doesn't suffice in accuracy. It's anyways nice to test your games with another emulator, to ensure that your game works, before eventually burning it to a CD and testing it on the real console.

no$psx is also an emulator and debugger. Only incredibly 1034 kb, made by Martin. His philosophy towards software, and life for that matter, is interesting, and you can read about it in the link I put in the previous sentence. no$psx is incredibly accurate, and also supports most of the things PCSX-Redux supports. However, it doesn't have features that links together debugging with the IDE, hence is why this is my fallback option. Still an incredible piece of code, and Martin remains a legendary Playstation 1 programmer and reverse engineer.

Duckstation is an emulator. It doesn't have debugging, which makes it suitable for gaming. It can make games look prettier, and upscale them to 1080p, 4k, or whichever preference you would like. It can also do other cool things, such as fixing the wobbly polygons. Excellent emulator for when you just want to have a good time and play some games.

Finished

Now you have set up everything, here is a game that I made you can try on the emulators.
I wonder what game it could be... but I'm sure you know of it.

0

0

Write a reply (0/3500)

Replies

No replies yet

Playstation 1 Development Tutorial | Setting up on Ubuntu/Debian

10/29/2024 14:12

How to Make Playstation 1 Games

Setting up the environment on Ubuntu, Debian or distributions based on those

Installing the compiler

Start by installing the compiler. Here we use gcc-mipsel or g++-mipsel, depending on if we want to use C or C++. It compiles to MIPS architecture with little endian, which is the architecture of the Playstation 1 CPU. You can install it like so:

sudo apt install gcc-mipsel-linux-gnu g++-mipsel-linux-gnu binutils-mipsel-linux-gnu

Installing mkpsxiso

We need mkpsxiso, a tool that allows you to make ISO images specifically designed for Playstation 1.
Using mkpsxiso, we can create a CD image, that is ready to be burned to disc and played on an actual Playstation 1.
You can find a .deb file you can install in the releases section of mkpsxiso's Github page.

After downloading the .deb file, you can install it using apt like so:
sudo apt install ./mkpsxiso-2.10-Linux.deb

Emulation

When testing your games locally, you will need to download a Playstation emulator or debugger.

I recommend that you use the beautiful PCSX-Redux. I just use the AppImage on Ubuntu.

To run the AppImage, simply download it from the Github page.

Then you need to make it executable.
chmod +x PCSX-Redux.AppImage

After that, you can run it
./PCSX-Redux.AppImage

It is really nice, and works well in most scenarios.

Sometimes it is not entirely accurate. If you get stuck on something specific, then it can sometimes be helpful to use a secondary emulator, to compare the results. For that, I recommend no$psx. It works very well through wine.
You can also even verify that the result is the same on Duckstation as well.

If your game runs well on all 3 of those emulators, there is a good chance it works well on real hardware too.

Finished

Now you have set up everything, here is a game that I made you can try on the emulators.
I wonder what game it could be... but I'm sure you know of it.

0

0

Write a reply (0/3500)

Replies

No replies yet

Playstation 1 Development Tutorial | Setting up on Arch Linux

10/25/2024 14:01

How to Make Playstation 1 Games

Setting up the environment on Arch Linux

What we will set up

You will need to add 2 dependencies to your PATH.

mipsel-none-elf  For compiling your game.

mkpsxiso  For bunding everything to an ISO file, so you can burn your game to a CD and play it on an actual Playstation 1.

Let's get to it!

Setting up mipsel-none-elf

You can install mipsel-none-elf by running this script below.
It will set up everything you need, and makes mipsel-none-elf work just out of the box.

Setting up mkpsxiso

mkpsxiso is available on AUR as mkpsxiso-git.
You can also install it from Github.
I use yay to install it

yay -S mkpsxiso-git

Rounding up

Once both mipsel-none-elf and mkpsxiso is installed, you're good to go.

Emulation

When testing your games locally, you will need to download a Playstation emulator or debugger.
I recommend that you use the beautiful PCSX-Redux. I just use the AppImage on Arch. It is really nice, and works well in most scenarios.
Sometimes PCSX-Redux is not entirely accurate.
If you get stuck on something specific, it can be helpful to test on another emulator.

For accurate emulation, I recommend no$psx. It works very well through wine.
You can download it on the website.

I recommend sticking with PCSX-Redux, since it has modern features such as gdb support,
and switching to no$psx when it doesn't suffice, or you just want to double-check your things work.

You can also even verify that the result is the same on Duckstation as well.
Duckstation is available on flatpak, and also in the Arch user repository.

If your game runs well on all 3 of those emulators, there is a good chance it works well on real hardware too.

Finished

Now you have set up everything, here is a game that I made you can try on the emulators.
I wonder what game it could be... but I'm sure you know of it.

Continuing the journey

More than learning from a guide, I prefer tearing apart a good example and making it my own learning experience.
Luckily, there is a beautiful repository ready for you.

git clone https://github.com/ABelliqueux/nolibgs_hello_worlds

To make the examples, you can run

make all

That will build all the individual examples, that you can then explore in an emulator, while looking at the source code.
The examples range from Hello World to lit and textured 3d.

I wish you best of luck!

1

0

Write a reply (0/3500)

Replies

No replies yet

Drill happenings

08/29/2024 08:54

Drill notes
I'm currently drilling to the overworld border in Minecraft, here is a list of everything the machine stopped, and what happened


-2291714:

Another piglin stopped the machine

At this point I have stopped trying new fixes,

and rely on this machine + checkpoints.

It should be good enough to finish.

We're anyways starting to get close.


-2285635:

Piglins stopped machine

Made a checkpoint base

Crazy: The nether portal spawned

inside a mob spawner room

We march on <3


-2132602:

Made a checkpoint base.


~-2200000:

Shot by Piglin (super unlucky)

200k setback

So many mobs recently

But we continue


-2113408:

Accidentally turned off my PC

First time in 20 days :D (also did it on day 2)



-1981875:

Made a checkpoint base! 50% secured!

We march on.


-1955344:

Machine got stopped by Pigman.

I also realized I cannot stop the machine unless

it is stopped by a mob. So we will just make the checkpoint

base whenever the next mob stops the machine.

Just hoping it won't kill me this time, as that would be

a 500k setback roughly...


-1840842 (ty Zenon):

Killed by Dropbear.

I got lazy and allowed myself to respawn at the drill this once.

We march on.


-1619633:

Skeleton blocked the tunnel.

I have moved the machine to dig next to the

old tunnel to reduce risk of mobs spawning in front.


-1764789:

Shot by piglin again! :(

Lost about 170k blocks (about 1-2 days of drilling).

I have tried to upgrade the machine once again

We march on.



-1764789:
Shot by piglin again! :(
Lost about 170k blocks (about 1-2 days of drilling).
I have tried to upgrade the machine once again
We march on.

-1695411:

Piglin stopped machine - we also have some nice guests

following us from behind (yellow dots are mobs)


-1624068:

Ran out of disk space


-1616860:

Dropbear (Alex's mobs) killed me.

Not a big setback luckily - I have surrounded

the player character with saws now, so nothing can

attack other than projectiles.

I also made a checkpoint base near here

We march on! Almost halfways!! :D


-1608405:

Wither skeleton blocked the way

I killed it and restarted the machine


-1576293:

Plot twist: It wasn't once in a lifetime :D

Twisting vines blocking the way again.

Removed them and now we're up again.


1461036:

Machine stopped due to twisting vines suddenly

obstructing the slot it was supposed to build on.

This has to be a once in a lifetime.


-1444644:

Pigman got in the way - made a checkpoint bed and

manually removed him


-1389596:

My internet somehow went offline - it's online again


-745950:

Made a checkpoint bed at around 6m overworld


-440215:

Game crashed - have started it again


-372378 (ty Zenon & Hola):

After rebuilding the machine at the

temporary base at -200k,

I forgot to glue the deployers onto

the machine, and the drills just drilled through them :S

Which resulted in liquid breaking the machine once again...

I have mounted 6 new deployers properly now.

Hopefully we will recover from the piglin death soon! :D

We march on!

(hopefully many hundred thousand blocks this time)


-481572:

Shot by Piglin! RIP

lost 300k blocks

fix: just put the seat further away

from the potential dangerous mobs spot

but OMG.... 2 days of progress gone

we will catch up soon :D


-304523:

The machine somehow didn't fill a hole - I'm not sure why.I just started it again manually.
2 interventions in a day, new record.

-302801:
A piglin got stuck and stopped the machine.
I had to remove it manually - if it happens again
we will have to have something that gets rids of mobs.
We march on

-249538:
Small hiccup - machine ran out of
netherack for bridge building and almost
fell down! Now it can place any block it picks up,
not just netherrack - in case of holes or need
for a bridge. Should be good!
Also made a checkpoint bed here, just in case.

-140551:
Machine seems really stable!
Hopefully it will last for a long time now.
stream went down, because I by instinct turned
off my PC. RIP
I have put tape on the switch now :D
Also woo, 100k *confetti*
Next goal is 500k

-69426:

The machine got stopped by liquid.

I simply forgot to filter one of the deployers.

Nice number to break at though ;)




1

4

Write a reply (0/3500)

Replies

0

(0/0) 10/28/2024 22:49, Wituz wrote

And for those stumbling upon this post, we did actually make it to the world border! It took 49 days. It was really satisfying to arrive. While I at the same time am glad it's over, I also kind of miss drilling the tunnel. Maybe it's not the last time, I do something like this

0

(0/0) 09/30/2024 08:42, Wituz wrote

Wow that's really appreciated <3 For sure it will. I will start it again soon

1

(1/0) 09/25/2024 20:45, anonymous user wrote

I just found this project through dougdoug's git hub repo because im trying to figure out the twitch integration stuff and this is so cool! Genuinely I hope to be here at the end!

0

(0/0) 08/29/2024 14:29, anonymous user wrote

e

Expo-AV not playing audio after a while, and how to fix it

08/28/2024 08:36

Recently, I was working on my game AI Against Humanity, where I encountered a bug in Expo-AV.
Namely, I was trying to play sounds.
And while it at first worked fine, after playing sounds for a few minutes, eventually I would run into this issue:

This was due to a memory leak in my application.
When you load sounds with await Audio.Sound.createAsync(source), it doesn't automatically unload it.

So I just wrote a custom hook, useSoundEffect, that you can use out of the box in your Expo app as well.
Here it is:

It's supposed to be used like this:

That's about it for now, I'll see you soon
With love from wituz

0

0

Write a reply (0/3500)

Replies

No replies yet

Screenshot

08/04/2024 19:52

0

0

Write a reply (0/3500)

Replies

No replies yet

Wonderful first stream

06/14/2024 21:57

Wonderful first stream tonight

I had a really good first stream on Twitch tonight.
We were porting my childhood games from before 2008 to HTML5.
Managed to port 2 games. Was a successful night and learned a lot.
The games will of course be posted on this site in a new Games section soon!

There are many more games to port.
If it sounds interesting for you, do follow twitch.tv/wituz.


The stream will also automatically show up on the front page when I'm live,
so if you are here then there is a chance you'll catch me at some point

3

2

Write a reply (0/3500)

Replies

1

(1/0) 06/14/2024 22:25, Wituz wrote

❤️

1

(1/0) 06/14/2024 22:04, anonymous user wrote

was fun, see you soon at part 2 😎