Setting up... _ _ _ ____ __ __ | | __ _| |_ ___ _ __ __ _| |/ ___| \/ | _ | | / _` | __/ _ \ '__/ _` | | | _| |\/| | _| |_ | |__| (_| | || __/ | | (_| | | |_| | | | | |_ _| |_____\__,_|\__\___|_| \__,_|_|\____|_| |_| |_| _____ _ _ ___ ____ __ __ _ | ____| \ | |_ _/ ___| \/ | / \ | _| | \| || | | _| |\/| | / _ \ | |___| |\ || | |_| | | | |/ ___ \ |_____|_| \_|___\____|_| |_/_/ \_\ ...via the VirtualBox and an SD card By TheOuterLinux https://theouterlinux.gitlab.io Last updated: 2021/11/15 Discussion URL (Reddit): https://www.reddit.com/r/TheOuterLinux/comments/qt4v26/setting_up_lateralgm_enigma_via_virtualbox_and_an/.compact Are you a fan of the program 'Game Maker' by Mark Overmars? If you are not familiar, it is a game engine, most of which its versions have only been made available to W98 and newer, for easily creating 2D and somewhat "3D" games. It is a drag-and-drop lovers paradise with no coding experience necessary. However, as a GNU/Linux user, unless you want to brave the waters of WINE (used to run Windows applications on non-Windows systems) and then also expect your game users to do the same, your only current option for Game Maker is to run an actual Windows operating system and then use the Ubuntu exporting capabilities from the Game Maker Studio version, to which you need a doctorate to get working, especially for macOS export, though 'GM4Mac' used to be available for Mac OS X users, a Game Maker 7 compatible version. But there is hope within the wonderful combination between a graphical interface called "LateralGM" and a development environment called "ENIGMA." The interface LateralGM provides is highly comparable to that of Game Maker version 8, while also supporting older project versons, while the ENIGMA stuff does the heavy lifting when it comes to testing/compiling your game. Though, there is just one problem, a problem I have noticed getting worse over the last few years in regards to free and open-source software and that is "developer requirement hell." If you are like me, then you enjoy using stable GNU/Linux distributions; unfortunately, many developers out there these days do not and therefore compiling source-code maintained by these people often fails on a "stable" system. This is a serious problem that can only be fixed by either "giving in" to the temptations of systmed on one's main machine, unless for some reason you have more computers than sense to dedicate specific tasks to, or one can just simply use VirtualBox to run a QCOW file with one of the latest Puppy Linux distributions residing on an SD card. QCOW is the best choice since both VirtualBox and QEMU support it and can be easily convert by QEMU to other formats like a raw IMG or for VDMK for VMWare. If it helps, think of QCOW as like an ODT document made by LibreOffice while IMG is plain-text, metaphorically speaking. Supplies: --------- 1. A 64-bit computer with at least 8GB of RAM and maybe 1024MB of VRAM and an SD card slot with a stable GNU/Linux system installed. I know that for some of you, needing more than 4GB of RAM to run a Puppy Linux system in VirtualBox seems ridiculous, and it is, but you will need to give the VB machine as much RAM as possible; when using 'git clone' in a future step, 4096MB is not enough. 2. A 16GB or more, Class 10 or better SD card; however, you may want a 32GB SD card so that you can create tar.gz backups just in case you "bork" things as you could then just easily unpack it on top of everything and all is right with the world again. Grabbing a Puppy Linux ISO: --------------------------- At the time of this writing, I highly recommend, though I am not a fan of Ubuntu or systemd, grabbing a copy of FossaPup64 from https://distro.ibiblio.org/puppylinux/puppy-fossa/fossapup64-9.5.iso. Selecting this distribution gives you the best fighting chance of getting everything to work properly and most of the developers on the ENIGMA side of things appear to be more familiar with Ubuntu than Slackware, though Puppy Linux versions of things are a bit different. You may be tempted to grab a non-Puppy Linux distribution, but do not do that. Since we are trying to install and load from a QCOW file on an SD card, things get very slow when running systems that do not primarily operate within RAM. For example, trying to do this with PCLinuxOS took several hours to install and I did not have the patience to wait on it to boot as it would have also probably taken an hour or more based on how slowly the progress bar moved. Formatting the SD card: ----------------------- Use a program called 'gparted' on a GNU/Linux operating system, to which most include, to format the SD card as an EXT4. A FAT32 formatted SD card will not work as FAT32 only allows single files to be 4GB or less in size, where as EXT4 has a 16TB maximum file-size limit. It is possible to format an SD card on Windows as an EXT4 with extra software installed, but you may want to use exFAT instead. Newer GNU/Linux systems have better support for this, but only those with kernel 5.x and newer seem to use it correctly, which is why I recommend EXT4 for now. Setting up a VirtualBox instance: --------------------------------- 1. Create a new machine by using "Machine --> New..." 2. Name it whatever you want (example: FossaPup64) 3. Within the "Machine Folder" part, navigate to your SD card. 4. Type: Linux 5. Version: Ubuntu (64-bit) 6. Select "Create a virtual hard disk now" 7. Click "Create" 8. A "Create Virtual Hard Disk" window will appear. Pick the QCOW option and size it to be 32GB and dynamically allocated. This means the file grows as needed with a maximum of 32GB in size. You may be able to get away with less than this, but 32GB is what I recommend, especially if you plan on doing most of the sprite and audio work in the VirtualBox machine since you will then need to install more software. 9. The Settings should be as follows: General Advanced Shared Clipboard: Bidirectional Drag'n'Drop: Bidirectional System Motherboard Base Memory: 5126MB Processor Processors: 2 Display Screen Video Memory: 128MB Storage Storage Devices Controller IDE Disc: fossapup64-9.5.iso Audio Host Audio Driver: ALSA Audio Driver Audio Controller: ICH AC97 You should be able to leave everything else as default, which is initially determined by the selected Type and Version selected during the New Machine setup. If you need USB support and are using GNU/Linux, you may have to do the following in a terminal to at least get the USB 1.1 option working: sudo usermod -a -G vboxusers $USER ...This puts the current logged-in user in the vboxusers group, which will allow VirtualBox USB access; however, this also gives it access to other USB-related things besides just storage and may be necessary if wanting to add joystick support to your game, unless you are just that confident it will work. Either way, you will probably need to do this to get your game off of FossaPup64 and onto your main system. DO NOT FORGET to logout and then log back in on your main system for this take affect. Also, when the machine is active, whatever USB storage you selected will not be available to your main system until you unmount it and then toggle it off from within the machine settings; there is also a shortcut USB icon to do this (right-click it) at the bottom of the machine window. And, even if VirtualBox detects multiple USB storage devices as "generic" or the same labeling, you still have to add each one of them. I would also like to note that there are other extensions, including those for USB 2&3 support, for VirtualBox, but they are not licensed under the GPL. Installing FossaPup64: ---------------------- Since I have already installed FossaPup64 to a VirtualBox machine and have no interest in doing so again, I found a YouTube video for you to watch instead. However, I did not create a swap partition like in the video; you will also not need a 44GB partition to install FossaPup64 as that is a bit overkill; maybe 16GB and even then, that will still give you plenty of wiggle room. https://m.youtube.com/watch?v=CKrtSBKmtN4 Ignore everything after the 03:15 minute mark; there is no need to edit the menu.lst file. Besides, since we are using the "dynamically allocated" option, you techincally could set as high as 1TB and it would only grow as needed, even when you create a partition from within the virtual machine. Installing packages: -------------------- Open "quickpet," which should be located on the default desktop environment of FossaPup64. From there, install "32-bit compatibility sfs", "devx", and "java-8u251-x64"; BE VERY PATIENT as Puppy Linux is not always the best at notifying you of what is going on when it comes to installing. However, worse-case, you could technically keep an eye-out on the created QCOW file for size increase to know if it is still installing things. When asked after installing devx, there is no need to start CMake, Glade, etc. When asked about running JAVA, select yes and just click the ok button when a JAVA settings window shows up. Next, open the Puppy Package Manager (ppm) and install the following, assuming that devx was installed and is loaded. Make sure to check the "dev" box: default-jre default-jdk java-wrappers jarwrapper libprotobuf-dev libprotobuf-java (may not be necessary) protobuf-compiler libglm-dev libopenal-dev libfluidsynth-dev libalure-dev libbox2d-dev libdumb1-dev libsdl2-dev rapidjson-dev libyaml-cpp-dev libboost-dev libboost-filesystem-dev libboost-system-dev libboost-program-options-dev libpugixml-dev zenity kdialog protobuf-compiler-grpc libgrpc-dev libgrpc++-dev nano As you select packages, they will be added to a list at the bottom of the Puppy Package Manager. Click the "Do it!" button to install them all. These are the packages needed to make LateralGM happy, while the devx sfs package takes care of the rest as far of the ENIGMA part goes. Think of the sfs packages like mini file-systems (Squashed File System) that behave similarly to that of AppImages. Things to run in a terminal: ---------------------------- cd ~ git clone git://github.com/enigma-dev/enigma-dev.git cd enigma-dev wget https://pastebin.com/raw/aBAU4j3C -O start.sh sed -i -e 's/\r$//' start.sh./star chmod +x start.sh chmod +x install.sh ./install.sh make clean make Creating a programs menu item: ------------------------------ Not everyone likes the terminal. So, here is what we need to do to add a programs menu item: 1. Open a plain-text editor 2. Type the following: [Desktop Entry] Name=LateralGM Exec=/root/enigma-dev/start.sh Comment=Game Maker Clone Icon=/root/enigma-dev/Resources/logo.png Terminal=false Type=Application Categories=Development;Game; 3. Save the file to "/root/.local/share/applications/LateralGM.desktop" 4. Run the "Fixmenus" item in the programs menu, just above the "Help" "Exit" items. You should now have a LateralGM menu item within the Fun category. This would also be in the "Development" or "Games" categories if you manage to get the XFCE desktop environment installed and working. If you need more help on creating a .desktop file for adding program menu items, take a look at https://specifications.freedesktop.org/ for more details on the matter. Setting up LateralGM: --------------------- Do not bother trying to setup LateralGM's external editors on FossaPup64. For whatever reason, they do not work, even if you try changing the "%s" to "%f" and so forth. As far as any other setup goes, you should not have to touch anything. However, if you are planning to make heavy use of d3d functions, especailly d3d_set_fog, recommend "Build --> Settings" and then "ENIGMA --> API" and set the Graphics to OpenGL 3.3 as none of the developers appear to place a high priority for OpenGL 1.1 these days, even though DirectX on Windows, or at least from what I have seen screenshot-wise, has no issues with d3d_set_fog at all and OpenGL 1.1 has been around forever, to which I find very odd for a free and open-source project. I guess no one cares about older hardware. But to be fair, the LaterGM+ENIGMA combo is mostly meant for 2D games. Recommended extra things to do: ------------------------------- If for some reason the bidirectional functionality of VirtualBox does not work, meaning you cannot copy/paste files between it and your main operating system, you may want to install a few things. You can also try getting the USB thumbdrive capability working, but it can get a bit annoying going back and forth. So... 1. GIMP - You will need an image editor for backgrounds but you could also use it for sprites, but I would enable the grid for it. 2. LMMS - Create electronic music, but do not set as an external editor. 3. MuseScore - If you know how to write scores and want to have a more "classical" vibe with your game's music. 4. Pencil2D - Easily create 2D cartoon animations 5. LibreSprite - A sprite editor with animation support. https://github.com/LibreSprite/LibreSprite/releases 6. Blender - Create 3D animations; however, there is an exporter that you can use to put 3D models in your game, though you will also need to be familiar with GML's (Game Maker Language) d3d functions. This link may help: https://martincrownover.com/blender-addon-gm3d/, but I am not sure as the addon I have is "io_export_gamemakerd3d_1_0_1.py" and I typically still use Blender 2.79b as I do not like the 2.8x interface at all. 7. jstest-gtk - Use to calibrate and test a joystick/controller. 8. libimage-exiftool-perl - used to write/edit/wipe metadata from images 9. python3-pip - for whatever reason, FossaPup64 includes some Python things but not pip. 10. Birdfont - easy way to create your own fonts 11. Bleachbit - a cache/junk cleaner 12. Catfish - for searching for files, though if you are comfortable with the command-line, you can use 'locate' but will need to run 'sudo updatedb' after installing first. I also recommend getting the XFCE desktop environment working and visiting https://theouterlinux.gitlab.io for several recommended software lists. Shutting down and saving changes: --------------------------------- If for whatever reason you are presented with an option to save when shutting-down FossaPup64, even though you "installed" it, just do it anyway and use all of the default options given to you except when asked about creating a swap file as you do not really need one. Things to note: --------------- When shutting down FossaPup64, the screen may blank. Do not close the window. FossaPup64 is saving things and you can verify this by looking at the QCOW file for size increase. When it can be shutdown correctly, it will. Forcing a close may "bork" things. And, the more software you install or files you add, the longer the shutdown process will take but not so much the next time. This is why you want a Class 10 or better SD card.