Two Days; One Post

Two Days; One Post

First of all, I just discovered this which is great for game devs if you ask me. That's a whole lot of CC0 goodness for all kinds of applications. Good shit, Smithsonian. I will take a shot at 3D printing something from this, probably sometime this month.

Today I will be working on my coursework for the DevOps and Django Rest Framework. I should be pretty close to done by the end of the day. I must say I do much prefer the streamlined approach to courses, as I have spent over a decade buried in theory and broad explanation.

Before I get started however, I have begun writing the new Pi4 Server's OS to it's SSD. I would like to use Arch but have decided on Ubuntu as it has more of a community and Rasbian also being debian based will make it easier to work with. Plus I have experience with my other Pi4 server running Ubuntu for the past year.

To do this I will of course have to upgrade this Pi's firmware and enable USB boot in order to use the more reliable SSD. You don't want to know how many MicroSD cards I have obliterated over the years working with various Pi projects. Those things are fickle. I also want to take a shot at Raid over USB.

So, as of writing... updating to the latest firmware and eeprom on the pi4 8gb model and trying to run the USB boot for anything aside from Pi OS would not go well. Ubuntu would break it's auth service so it would get to login prompt but no user could be authenticated. Manjaro was the closest and probably would have worked, had I not made a mistake typing the host name, I really was too tired to try again and just wanted to get the system online... I went through a lot of different things trying to get it working but in the end I just had to boot from SD and automount the SSD on boot with fstab.

I'll wait and see if there are any further developments with the USB boot for now and just keep it as is 'til then.

-- The next day.

I didn't post this yesterday as I was too busy trying to bang on the SSD boot in an attempt to get it working and by the time I had given up and set it up with the current configuration I had a bunch of other stuff to do and then I just went and collapsed. So today's post is going to be tacked on to yesterday's.

First up I am going to get a bit more done with the Django Rest API course, I didn't quite get to where I intended to yesterday and feel like I should catch up before I start working on the prototype. If my memory hasn't failed I only have 2 more features left from the initial list of things I wanted in it. One more pet and an aggressive enemy. The aggro enemy should be pretty simple, of course as I only have to add a trigger to the existing enemy setup and have it enabled if the aggro bool is set to true.

Also, I thought I might have a hard time with this course as it is listed as "Advanced" but surprisingly everything makes sense so far. I think I am at the end of the docker and CI stuff, wrote a custom user model which is actually quite different from how I normally do it... not sure which way is better really, though I do prefer EXTENDING the existing one versus completely overwriting it like we do in this course. There are a good few extra steps involved in an overwrite like writing your own user manager and admin integration is kind of ugly:

class UserAdmin(BaseUserAdmin):
    ordering = ['id']
    list_display = ['email', 'name']  # Only show email and name in list.
    fieldsets = (
        (None, {'fields': ('email', 'password')}),
        (_('Personal Info'), {'fields': ('name',)}),  # need the , after 'name'
                'fields': ('is_active', 'is_staff', 'is_superuser')
        (_('Important dates'), {'fields': ('last_login',)})  # Likewise to ^
    # Oh boy, it's so ugly.

    add_fieldsets = (
        (None, {
            'classes': ('wide', ),
            'fields': ('email', 'password1', 'password2')

Okay, very ugly. In future I will probably just stick with my old method of extending the model rather than completely replacing it. (If it ain't broke...)

A lot of other things in this course have been quite useful. Getting postgres setup in a docker container proved quite a bit easier than I thought it would be, though there is of course the issue of making the main app wait for the DB to be fully booted up and initialized before trying to connect, though that's trivial to solve. It's almost like the people who made these tools had some idea what they were doing.

After I get caught up to where I intend to, all that will remain is the endpoints which are in my mind the meat of the course. The main reason I took it to begin with is to learn my way around Django Rest Framework, the devops tools are bonus as far as I am concerned. I have used docker before and some form of CI as well, for some Node.js projects but never really felt it was terribly necessary for the most part. I always felt like Docker was an extra layer of complexity and would cause more cycles to be added to every single operation, needlessly. This could still be true, but it has become clear to me that people prefer containers for setup as they can just run a single docker command and have the software up and running versus all the config and installs and dep management. While I may enjoy doing that... other people probably wont.

Well, back to it.

While my code works and I have locally tested it, I have run into an issue on Travis-CI

"ERROR: Service 'app' failed to build : toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: command "docker-compose run app sh -c "python test && flake8"" exited with 1."

I have made only the one pull in the last 6 hours so that's... interesting. I get the feeling someone is fucking around or there is a really stupid bug somewhere. I even have most of this stuff cached... so I shouldn't be pulling at all on my dev machine and on Travis-CI I should only be pulling 2 times per test. This was the first test of today so I should have all 100 pulls available.

Oh well, I got to where I intended to for today anyway, even if my test is failing due to some bullshit limiter, it's working locally and I will refire the build sometime later today and see if it's still being an asshat.

I should probably add that last pet, eh? To be honest I have not been feeling it with this project for a while. Actually from the start. I just needed something to get me started in Unity, a project with goals and clear systems to implement. As it draws closer and closer to the goal I have set I find myself less and less willing to work on it. I also can't stop feeling like Unity is somehow Janky and busted but I can't figure out why. It is likely just me not being used to it yet.

I guess the next prototype will have to be a simple 3D game. I'm not sure why, I just feel like that's where I need to go next. No method to this madness. So that's what I will probably try to do. Failing that I will try to implement all the animations for this sprite base I got on as states with mechanics and see where that takes me. There's a lot of animations... I could also convert the sprite to a 3D model via Voxels, I suppose and do it that way? So many things I could be doing... so many roads in front of me and I can never decide which one is most worth my time. Always leads to me chasing my tail like an idiot trying to find meaning in everything I do.

Anyway, I need to get to finishing this prototype... which I tried to load up in my office on the laptop but it just crashed Unity. I mean I am running unity on Arch, for one and on pretty old hardware... so I did expect as much. Looks like I am stuck out here with one monitor which has had a severe impact on productivity. If I didn't have a need for 3D in other things I am trying to do I would have stuck with Godot. It's great if you're just doing 2D and not trying to do anything nuts like adding a DB backend to it.

If I wasn't planning on moving into 3D so I could pick up 3D modelling for my 3D printing (also CAD) in order to fabricate things we need for the geckos and things I need for my robots and other hardware projects... I would probably have stayed with Godot and brute-forced my way through figuring out GDNative.

I don't feel like I could do shit in a game jam with Unity, though I would like to start trying my hand at some. Maybe after the next prototype, whatever that ends up being...

On the plus side I finally managed to get that build to pass. I wish I knew why it thought I used over 100 pulls but I guess that mystery will persist.

I for whatever reason feel very tired, exhausted even. I have for a few hours now, which has lead to my not yet even starting on adding the final pet to the prototype. I have to make the pet sprite, armor sprite and weapon attack. I might just call the prototype complete with that. I knew going in that this was going to be something I will not finish and will come back to sometime later if I even want to, once I have more experience with the engine.

Yeah, screw it. I have implemented all the features I intended to, all that remains is another pet to make 3. I'll just get it done and move on, release the prototype as is. Maybe clean it up a bit, see if anyone ever even plays it and look for feedback. That is the actual point here... learning and feedback. I can't generate my own feedback loop because it invariably turns into self loathing and existential dread.

The next prototype should be simpler. Maybe start doing stuff I can bang out in a week or two. Maybe I will just write a character controller for that sprite base and add in systems around it, it will give me a way to study the state machine system.

Anyway, better sprite that pet, eh?

Good enough for a prototype.

Slapdash but what do you expect for a 15 minute sprite?

And some very simple attack animations.

In an effort to get this fucker done tonight the armor is also quite the hackjob but hey, the odds of anyone even playing this are pretty low to begin with and if that's their main complaint I guess I did better than I thought.


With that, the third pet is added. The only thing I have to do is make them craftable and add sound effect changing for attack based on pet.

There, went and got it done. There are probably bugs I am unaware of, let's face it... there certainly are. But it's a working prototype of the systems.

I'll release the Windows and Linux builds of the prototype on Itch once I get them compiled and pop a link on the Prototypes page I am about to make.

Now I can focus on the coursework for tomorrow and Friday I guess will be the day I decide on the next prototype I want to build.

Gotta go make that page now.