Creating an application for CiudaneOS Part I

Ciudane is an upcoming 3D low-poly metaverse with realistic gameplay interactions. It features a working smartphone with a modular system capable of running isolated “applications” that work totally agnostic from Unity (no MonoBehaviours!) in C#.

The smartphone and the notifications app doing its job.

This is a little tricky to understand but actually it’s quite simple and designed to be so.

Let’s take a look at the most simple application. It doesn’t even display any UI on the screen.

When the app is opened, the flashlight gets toggled.

There are a few interesting points to look into:

  1. All applications implement an abstract class Application that provides us with a Smartphone class and a Metadata struct.
  2. The apps work event-driven. Simple logic is written and then thrown to smartphone events. In this case, a hardware change is invoked.
  3. The apps are instantiated on the fly, so you can consider adding “background threading” in the constructor. We’ll see that in the notifications app.

With that in mind, you might have an idea how the Camera App works:

Not only it invokes a hardware change for the camera but also a “software draw” with a camera image widget.

Now there is some simple UI using widgets. Widgets are contained self-sufficient, independent components used to build a larger view.

In this case a CameraImageWidget is sent to the smartphone to be drawn. This one is created with a Front CameraType to tell the widget what to display exactly.

We’ll look into widgets in another post. For now let’s focus in application behavior.

Right now we know that applications are capable of:

  1. Controlling their behavior when they’re opened and closed.
  2. Sending hardware events to tell the smartphone to start, toggle or disable funcionalities like a flashlight or a camera.
  3. Sending software events to tell the smartphone to control a view (SoftwareIntent.Open) or close it (the Application’s Close base method already does it for you)
  4. Sending software events to draw widgets. These widgets can be built before being sent.

But what about building complex views with nested widgets, dynamic information, refreshing, background threads and listening to touch events?

It’s all possible. And we’ll see it in the next chapter! Thank you for reading.

--

--

An indie game dev from Argentina. We build and develop our games with passion.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store