top of page

World Engine Development: Unity Port - Day 1

Updated: Jul 2

After developing a prototype of our project in C++ using the OLC Pixel Engine, we now feel it is time to take the next step and start porting our code to Unity.

Although Unity uses C#, Unity's Muse and other LLM tools, such as ChatGPT, were able to easily convert our script, explaining piece by piece how our code can be adapted to Unity's framework.

Prior to today, I had already implemented the Text Engine for our project to load information from text files. Eventually, I would like to load embedded information within PNG files so users can share their games in an aesthetically pleasing and fun format.

Our first step was to port our Command Engine and the universal portions of our World Engine. The Command Engine prompt was straightforward, and we are now able to input universal objects to check our object database and create things with text commands.

Next, we implemented the most basic and fundamental parts of a universe. We started with time. A universe needs a beginning. It is a simple axiom that needs to be created first. Yes, we created units of time such as seconds, minutes, hours, days, weeks, seasons, years, and so on, but time is actually really simple. It can be narrowed down to one concept: a single number that increases forever with each moment from the start of the universe until the final moment when the universe no longer needs time.

Game engines have time built-in with Update functions, so converting that to the units of time we use is really simple. Then, the next thing we implemented for the World Engine is, surprisingly, not space. Useful space, at the very least, requires two dimensions.

There is a simpler universal object that is just as important: light. It is a single variable that decides whether the world is in absolute darkness or whether we can see what is in the world. So, before space, we implemented light. With light and time, we can create and simulate the passage of an Earth day, with darkness giving way to light, and light returning to darkness.




Light is crucial for visibility and can set the mood and environment. Although typically space or the spatial environment would be considered a more foundational element than light, it would actually require more programming, as it involves establishing the surface with different terrain types for a 2D game or, even more challenging, 3D terrain in a 3D world. Implementing a basic spatial framework is critical, but light is ultimately much easier and more feasible on the first day of porting our program. Focusing on light first provides quick and immediate visual feedback and a sense of progression in the creation of a world.

Thus ends our development for our first day: the implementation of time and light.

10 views0 comments

댓글


bottom of page