Posts

Showing posts from December, 2022

Chatgpt Makes a game engine... and a game(now with touch support)

Image
I recently decided to use GPT to create a game engine based on an entity component system. The first attempt didn't go as well as I had hoped, and I ended up starting from scratch. This time around, I was able to get a mostly working game engine right away. However, I did run into a small issue with the handling of dt (delta time) for movement. GPT was treating it as if it were in seconds instead of milliseconds. I spent a few evenings tinkering with different components and getting them to work properly. During this time, I had GPT create a sample game that required some assets. One of these assets was the player character and present you see below, which was generated by GPT as an SVG file and then converted to a PNG. The game was a bit bare-bones, so I asked GPT to add a gradient background and create a particle system to create a "snow" effect. GPT was able to create a functional particle system, but it was unable to properly integrate it with the entity c...

ChatGPT Makes a Fluid simulator

To Quote Chat GPT This code appears to simulate a fluid using the Navier-Stokes equations, a set of differential equations that describe the motion of fluids. The fluid properties (density, velocity, and pressure) are stored in 2D arrays with dimensions gridSize x gridSize, and these properties are updated over time in the updateFluid function. The Navier-Stokes equations are solved using the Euler method, a numerical integration technique that approximates the solution to a differential equation by dividing the time interval into discrete steps and using the values of the variables at each step to calculate their values at the next step. The renderFluid function is responsible for visualizing the fluid, and it does so by drawing a particle for each grid point, with the radius and color of the particle depending on the density and pressure at that point. The applyForce function allows the user to apply an external force to the fluid by adding the force vector to the veloci...

ChatGPT writes and illustrates a childrens story

  This is a story Written and Illurstrated by ChatGPT ChatGPT gennerated the graphics using prompts from the story prefixed by the instruction "write svg that draws". Often, multiple retries were need to get useable results. I then asked chatgpt to make me a carousel which mostly worked. I had to disable the easing because it was sending the divs with the code off screen. This is the live stream if you are bored enough to watch . I hope you enjoy. Maria and the White Horse Story and art by ChatGPT Edited by Joel Cook Once upon a time, in a small village nestled in the rolling hills of the countryside, there lived a young girl named Maria. She was known throughout the village for her kind heart and her love of animals, ...