Archerite's blog
Welcome to the personal blog of Archerite
Color
Background color
Background image
Font Type
Font Size
    Archerite Just had to see if I could compile Batterycheck for Raspberry Pi since it runs on Linux and has support for OpenGL now. So I downloaded a fresh Raspbian image and flashed it on a SD card to use on my Raspberry Pi 3 B+. After configuring and installing the required packages from the repositories I copied my source to the Raspberry Pi and typed: make linux

    It was not that simple ofcourse and had to run that command a few times to install all libraries I had forgotten but no fatal errors and I got an executable. So I tried to run it and...Segmentation fault! Took me a while to figure out this was caused by my resent addition of joystick input and not checking if there is actually one connected! Disabling the joystick input for now was faster than implementing the check..fix now, optimize later!!!...compile again...run...and...IT WORKS!!! :yay:

    So without hardly any change at all the Linux version "just works" on the Raspberry Pi and to my surprise it even runs very smooth like on my PC, Wii and 3DS. This means I just need to fix the joystick input and another small graphics related thing which is not that important. I expect to upload the preview with instructions in a few days to allow anyone that is interested to try this on their own Raspberry Pi 3 B+...I am not sure if it would work on older Rpi's yet as I have not tested this.

    Now does this deserve it's own thread somewhere or just this blog post??
    Archerite As far as I know the DHCP protocol has been around for at least 20 years and it's perfect to assign an IP address to a device. Nearly every device I know makes use of it but also offers the OPTION to set and address manually. When I look at every single NIntendo console out there and even the homebrew on them they all make use of DHCP to get an address. To be fair the PSP has this too but since the WiFI won't work anymore with WPA2 it's does not really count anymore on the network front.

    Now that I finally received the network adapter for my PlayStation 2 Phat and plugged it in I just wanted to see if it worked. The lights turn on and are flashing like a Christmas tree so it's probably alright. After booting it up with the latest version of FMCB and starting LaunchELF to test if it could acces the virtual host:/ drive I went into settings and configure the network adapter. First thing to notice is there is only an option to manually enter all the network addresses by hand, well oke than let's do that. You have to set each number with just two buttons for up and down!!! Why is there not just a numeric keypad thingy or whatever, or individual digits to move up or down! It goes from 0 to 255 and does not even wrap around!!! After patiently..yeah right...setting the numbers to their correct values I saved it to mc0. Save successful but now what? The host: drive is not working but I think a PC side app is required for that or it might only work with an iLink cable. I have a 50000-ish series PS2 so no iLink..but neither had my PC so that makes it even I guess...

    Then I went into SMS (Simple Media System) to see if that could see any network devices but had to enter the network stuff again and with the same crappy up-down scheme. Crashed on me twice while entering the numbers!!!! But it seems the SMB server that is configured is some configuration file or something and it does not work either. the SMS is from a card I made a few years ago on my PS2 Slim....but lost the AC adapter during a move so it's just a paperweight for now.
    It took some effort but I manged to generate enough traffic for my router to see the "new" network device with the manually assign IP address. Finally!!! So it works but it took me at least 45min to get this far while it should have been 45 seconds!

    So now I can take a look into how to setup a comparable tool as 3dslink and wiiload to upload new builds of my homebrew.
    Archerite I have just received my first ever PlayStation 2 Phat that I bought used just because I could no longer resist writing code for it. I know my homebrew game is getting a bit out of hand on the multi-platform front but that is actually what I like most about the whole project :D I have only got to the "hello world" stage so far but most of the things I need for my game engine are available in PS2DEV and when it finally compiled I could run it on the real hardware....and it worked!!!!:yayps3:

    So that makes the supported platforms:
    - Linux
    - GameCube
    - Wii
    - 3DS
    - PSP
    - PlayStation 2

    and that is not even the end of it!!! :lol:
    Archerite When I have added a new feature of fixed a bug in Batterycheck I can test for the Wii and Gamecube in an emulator using the real controllers through an adapter and Bluetooth. For the 3DS, PSP and Linux I just used my keyboard and had to remember the different key assignments which were not the exact same between them! Since I have recently bought a PlayStation Classic and the controllers it came with have an actual USB connector I thought it would be cool to use them on the PC in the Linux version.

    It took me only a couple of hours to add support for it and the best part is that if the orignal game is running side by side and I press jump...the action runs in both at the same time!! This will make it so much easier to see if I have implement certain features correctly, and I have already fixed the speed of the jumps and walking while working on it. The button mapping is currently fixed to the PlayStation Classic Controller but I do plan on adding this in a config file later. And thanks to the GLFW library I am using for creating a window and reading the joystick inputs this will eventually also work on MacOS and Windows...some day ;)
    Archerite A few months ago I was reading some documentation about the Gamecube that my interest in getting into homebrew was ignited again. I had tried before on the Sega Megedrive but did not get very far beyond a proof-of-concept demo for various reasons. This time I had gained some more experience and got the idea to finally start on recreate a fun puzzle platform game I enjoyed playing years ago called Batterycheck:

    Back in 1998 there was a campaign to promote recycling batteries in the Netherlands and part of that was a PC game on CD-ROM you could get if you brought 15 batteries in for recycling. It was based on the same engine as Jazz Jackrabbit 2 and therefore uses the same fileformats for the Tileset, Levels and Sprites. About 10 years ago the game was released as Freeware by the publisher but they removed it after a while. After some digging I found one of the companies that worked on the game and I contacted them. The game is licensed as Creative Commons but I need to ask them which specific version. I did get permission to share their download page where the game is listed but they warned about it getting removed in the future. I posted the link and instructions to download in my other thread (here)

    One of my main objectives is learning about games in general but also how various older gaming consoles work. To minimize early frustration caused by mistakes or memory leaks I started prototyping in Python on Linux and after a few weeks I had enough to load the level and scroll around. And after a month or two it was already looking like a game but because it was written in Python it was not exactly "mobile" or portable. The Gamecube and Wii for which I originally wanted to write the game looked very complicated and the NDS was more familiar to me like the MegaDrive.

    While the NDS version was working and I implemented most of the menu system on it the low resolution bothered me and other limitations forced me to move over to the 3DS. After a while I had re-implemented most of the Python code in a combination of C/C++ and working playable demo with collision detection was possible with a handcrafted testing level. (I used a few converter tools and the Tiled level editor actually) While it was working I had no real way to debug when something was crashing so I rewrote parts of it so it would run natively on Linux using OpenGL.

    Eventually this got so messy I restarted almost from scratch with a super simple demo, just some rotating squares in a circular pattern. Since the OpenGL code looked a lot like what I saw in the Wii and Gamecube demo's I decided to write a simple translation layer that would make the main code portable between the platforms. To keep a long story short...kind of ;)...this resulted into a game engine that can run on: Linux with OpenGL, Wii, Gamecube and 3DS. I have also started on a port to the PSP and planning on adding PS2 later. Eventually I want to bring the DS(i) back too for the challenge of getting it working.

    A few weeks ago I was asked by user @newo why I was "porting" and old game not creating a new one. I thought it was a good question so I took the opportunity to share my reasons and motivation:
    It has been asked before but not on this forum and I will try to give my reason for not creating a whole new video game. Since I was little games and computers fascinated me and as long as I can remember I wanted to learn how it was done. You will need artists to create graphics and animations, musicians to create an atmosphere and sound effects and level designers to create fun and challenging puzzles to solve. And before any of these creative people can start you will need a story and a theme for the game. And these are exactly the four things I am not good at to put it mildly. There is one aspect of video games that I am good at which is writing code and combining bit's and pieces to make things work. I can spend weeks researching a topic like "how does jumping work"...and I did just that actually...to learn how that should be implemented. This is what I can understand and what I can do but the creative part of animation and graphics design and music is not. It has taken me over 15 years to get skilled enough to even attempt to recreate a game like this and Batterycheck looked like a good challenge to see how far I could go with this. I started this project somewhere around June this year and I learned so many new things to get where I am now if I had to do the creative part as well I might have given up months ago. This way I have an example to follow and can see exactly how something needs to work.

    In technical terms this is also not a port although I can understand someone might see it that way. I do not have the original source code to work with and that is my definition of porting...you need the original source to do that and that's why I prefered to call it a remake instead. I do have plans for additional remake's of other platform games and reusing their graphics to work with my game engine but if at some point I get inspired to learn how to animate things I might create a new game after all.


    I have never really blogged before but I think this is the place to post small updates on the project that do not really belong on the various platform specific threads I have started so far. This became a very long first blog post but I have been told that's alright if you got a lot to say ;)