Lost at C - Devember 2019 Challenge

This year’s devember I will be ticking an item off my bucket list by creating a videogame.

This game, inspired by TIS-100, is a assembly programming game, where the player writes code to repair damaged subsystems. In this devlog I will document my progress during Devember, but I may obscure some details, to avoid too many spoilers for the finished game.

Devember usually stipulates an open source Repo for the project. However given the nature of the project I will be keeping my Repo closed this year. I may opt to open source the game once it’s complete but I am not ready to make that decision yet.

11 Likes

Please be encouraged to post gifs and snippets of code though.

Looking forward to your project.

Gifts?

lol sorry, .gif's

1 Like

Are you going to explore the conspiracy aspect of it? Really wish that game had dived deeper into that. It drives me crazy every time I play it because there are so many unknowns.

It has its own self contained story.

1 Like

Badass :+1:

Day 1 (Ugrhh is it December already edition):

Ugrhh!? Is it December already?

I’ll be honest I had more motivation and excitement for this last month. I spent like 3 hours yesterday sorting the admin for the central Devember Thread, and now some of that excitement has leached out.

As I write this I am waiting for the rust toolchain to install on my server. I learnt last time around that to be successful at this you need to be able to develop easily, So only having access to the source on my desktop isn’t going to cut it. Of course it occurs to me that my server doesn’t have a GPU, and trying to link an OpenGL application on a headless machine could be a pain in the ass.

False starts: 1

I am now updating the toolchain on my laptop and copying the source across. Trivia while I wait for it to copy: This is the 6th time I have tried to start this project. Once I even tried to build it in Unreal.

One copy and two compiles later, and boom:

Hmm I swear I made more progress than this last time I was working on this? Whoops… Wrong Repo…

False starts: 2

Ahh that’s better, I remember that error. I was building a font handling package.

I spent the next two hours trying to fix that bug. I Don’t like the freetype bindings.

That concludes day 1. I am already pretty burnt out.

5 Likes

How’s day 3 looking?

1 Like

Knock knock…(door creaks open)
“Time to get up and get cracking”…

2 Likes

Yea I am burnt out. Never got past day 1.

Will try again at the weekend

2 Likes

Hang in there! Drop by drop the bucket gets full!

Hey it’s not an easy language I can honestly say I spent hours when I was learning it. It’s been I think a good few days trying to get a double linked list to work. :joy:. It sounds hilarious but that’s just the reality of this language so hang in there. Not to mention you decided to create a video game in C. So my hats off to you that’s a task :slight_smile:

So what I’m finding is if I break it out into steps and I look at those steps and I put them on each day the whole ordeal becomes more manageable and it doesn’t have to stop because December stops.

if you’re successful I definitely will put my hat in saying that you definitely won the challenge … this seems like the hardest task yet

1 Like

Day holy sh*t it’s the 19th already:

Mate

I am tapping this post into a tablet, while sat in bed at half three in the morning. While i think its cute to call it being “a night owl”, my nocturnal insomnia has been steadily worsening since August. But that’s not why I am awake at 03:31 on a Friday morning. Instead i put good odds on my inability to sleep on the bottle of Mate tea i opened at 21:00 this evening.

For those of you who have never frequented a European influenced hackerspace, Mate is a highly caffeinated lightly carbonated tee like beverage, with a slightly bitter taste and a low sugar content. I equate the effect of drinking a bottle of the stuff over the course of an evening to swallowing a battery, but less unpleasant.

While culturally noted as being pure hacker fuel, the epic hacking endeavor that came from this isn’t going to make for an exciting Devember post. Because instead I spent the next three hours thrashing out half a dozen pages for my bachelor’s thesis.

This left me with the three hours of insomnia that followed to consider the roles of motivation and time planning in how I run my life.

My life as a FOSS project

As mentioned I am an Engineering undergrad student. That comes with a lot of project work. Largely I run my Uni projects the same way I run my FOSS projects. I work on them when i feel engaged with them. I have usually found that work gets done, and the lack of arbitrary deadlines keep stress low.

So why SEGFAULT are you working on your thesis 9 - 12 pm, and consuming copious amounts of caffeine to do so?

Well truth be told the relaxed model for work hasn’t been working. Somewhere around early November I burnt out. I stopped wanting to work on anything since. Timelines have slipped and now I am facing much less arbitrary deadlines due in early January.

Devember has previously been the task I had to force myself to commit to. That being part of the challenge made it fun. However this year I find myself struggling to force myself to work on my real projects, to meet real deadlines. What chance did Devember have?

Time is a currency

I here people claiming that they never have the time to do something, quite regularly. I imagine most people do. Time is a currency we can never make more of.

But those of us privileged to live in the developed world are rarely confronted with how we spend our time. I feel it is more fair to say we make time than find it. Time is not some rare commodity we are gifted, but instead is a monotones stream, taken for granted. Often wasted, thoughtlessly. There’s always time tomorrow.

Half a month in summary

SEGFAULT, so if you avoided doing your Uni work, and you didn’t commit to Devember, how did you spend your time?

Well I certainly wasn’t idle. I:

  • Built a new computer, and blogged about it too much.
  • Founded a Rust working group for doing pointless things with old computers.
  • Missed my girlfriend a lot and spent way too much time texting her.
  • Watched an unhealthy amount of youtube.

These are obviously not things i am proud of, but it aptly makes my point that the time to do my assignments and do Devember was there. Apparently the motivation wasn’t; I can only blame myself for that.

The horse or the door?

As we’re counting, this article has taken 50 minutes to write so far.

I have to decide if its worth trying to salvage my Devember. Writing a whole game is a mammoth and frankly thankless task. Maybe i can get the front end going tho. If i can force myself over that peak, I can fill in the simulation when my motivation returns.

Tomorrow is my last uni day before Christmas. So back on the horse. I am gonna try to pull one out of the hat here.

SEGFAULT.

4 Likes

I can relate to the no get up and go. You might be depressed.

you’re not alone on this one, sis!

also netflix… I love wasting time…

1 Like

Day 21 (Back on the horse edition):

OK here we go.

When we last left this challenge the libfreetype bindings were being a bitch.

I put a full hour into trying to decode the labyrinth of type and trait declarations that the ft2 crate was using to define strings inside itself. Amazingly this wasn’t even constant between functions in the library. :woman_shrugging:

I called upon the Rust Matrix Chat (whom patiently helped me while I cursed bitterly about those who write shit libraries). They were also stumped at the type-foo that ft2 pulled. Instead they pointed me to a new library, rusttype. This font library is written purely in rust and is maintained by the RedoxOS team (Redox is an OS written in pure rust) apparently it is better.

I spent another hour poking through the documentation deciding best how to interface it with OpenGL. That is no trivial task, but I will figure something out. But I will leave drawing the font to the screen for tomorrow.

For now, good night.

2 Likes

I think it would be interesting to try and do functional stuff in a language like C. I bet its possible but just have to think about C in a different way. You can accomplish type like stuff with structs and types.

It would be interesting how to approach pointers. Do you consider them an effect? Should they be wrapped in a Monad?

Day 22 (Cancelled edition):

A recurring theme of this Devember is fonts. I spent another couple of hours today trying to get font rendering working today. I actually switched font backend twice, and attempted to use the debug text backend built into my graphics library. Eventually I relented and asked the Rust chat again.

The following are cancelled:

  • Piston Game Engine
  • Freetype
  • Rusttype

The following almost were cancelled:

  • Rust
  • Videogames
  • My faith in technology

The following probably should be cancelled but probably never will be:

  • Gamedev as a field.
  • Computers in general

Attempt “I have lost count”: I am now using a library called ggez (no seriously) to write the game. It is supposed to be a somewhat more mature gamedev library.

I was actually able to download and build one of the example games for this library, so I have more hopes for this than my previous attempts.

image

4 Likes

Day 23 (SEGFAULT finally writes an editor edition):

image

Didn’t have much time to spend of this today, but got some good progress.

I ripped out all the code that makes astro blasto work, so I am left with the raw bones of a game. This being a game about coding the logical first UI element to implement is a text editor.

Not much to look at yet, but the text in the screenshot is being rendered out of the text editor’s rendering logic.

How does the old joke go, “You’re not a programmer until you’ve written a text editor” ?

EDIT:

I spent some more time on it tonight. I have implemented the ability to render an arbitrary number of lines of text and can input text, providing it consists of the letters A,B,C,D,E

Can’t move the cursor yet tho.

image

5 Likes