Friday, September 24, 2021

GameMaker Studio 2 Linux IDE (Ubuntu)

 



Wow. Gamemaker Studio 2 has an Ubuntu IDE and i have missed the party.

Yoyogames states that the Ubuntu IDE is at beta state and not suitable for production machine

Using the Ubuntu IDE beta

Note that this IDE is not suitable for a production environment at this time. Please continue to use a Windows/Mac as your main development machine and give feedback on the Ubuntu IDE if you wish to try it.

This early beta IDE is specifically for Ubuntu 20.04 LTS versions and no other distro is offered any support - it may work if you can install the .deb, but we will not answer tickets about other distros or customised kernels, etc., as we are only interested in Ubuntu feedback.
You must have Mono 6 installed first (it does come with Ubuntu 20.04 LTS, so you should have it already). Beyond that, GMS2 will try to install any required components during the installer process, so ensure you are connected to the internet first.
A separate physical Windows PC is still required for targeting Windows, UWP, and any consoles - see the target's own section below for specifics.
A separate physical Mac is still required for targeting macOS, iOS/iPadOS, and tvOS - see the target's own section below for specifics.
When targeting the other machine, we would highly recommend both machines are connected to your network using Ethernet, rather than WiFi, as this can result in issues when building large projects for YYC.

GMS2 2.3.0 or above: supports Ubuntu 20.04 LTS 64bit and Ubuntu 18.04 LTS 64bit.
In GMS2 2.3.1+, you also have the option of building ARMv7 packages by simply targeting an ARMv7 device when you do your build.
Ubuntu 18.04 LTS 64bit is the last version supported by 2.2.5 or older, so please update your GMS2.
For simply playing GMS2 games: Ubuntu 16 or later is required. Other distros can usually run the games GMS2 generates with no issues, but we only state support for Ubuntu, so if you have issues playing games on these other platforms you will need to investigate this yourself. All games are 64bit-only.

ARMv7 architecture support is available for games built with GMS2 2.3.1 or newer if the developer built the package using an ARMv7 device.

Another useful links :
1. GMS 2 Required SDKs

2. Setting Up For Ubuntu.
Yoyogames do not recommend trying newer versions of Ubuntu than they claim support for.

You will need to install the development libraries/tools required during builds.

sudo apt-get install <packagename>

where you replace <packagename> with each of the following individually and keep running apt until you have installed all of them:

build-essential
openssh-server
clang
libssl-dev
libxrandr-dev
libxxf86vm-dev
libopenal-dev
libgl1-mesa-dev
libglu1-mesa-dev
zlib1g-dev
libcurl4-openssl-dev

Please note that GMS2 2.2.3 and above also require the "nproc" package to be installed. This is installed by default in Ubuntu 18, but might not be there if you have customised your install (or may not be installed by default in other distros), so be aware you might need to install this manually also.

Similarly, if you had selected "3rd Party Components" when prompted during installing Ubuntu itself, you may already have the OpenAL libraries installed.

3. Ubuntu: Compiling Your App

The highlight from the link above is:
It is important to note that - depending on the version of Ubuntu that the user has - additional dependencies may need to be installed to permit them to play the game and this should be mentioned when distributing your compiled projects. The dependencies are:

libcurl4
libopenal1

Users should install these packages on their machine otherwise the games won't run. Note that it is possible to create *.sh scripts to automate this process and include that with your final package.

4. Forum Yoyogames: Official Anouncement

the direct link download (date: Sept 13, 2021):
 
edit:
New version avaliable.

Lets install Gamemaker Studio 2!

Download the .deb file and install it. 
$ sudo dpkg -i <filename>.deb














The dpkg will complain about some unmet dependencies. We can fix it with apt.
$ sudo apt-get --fix-broken install

473 MB needs to be downloaded >.<"


















Now lets run Gamemaker Studio 2. Search and click the icon.










The Gamemaker Studio 2 running for the first time















The IDE will try to download and installing runtime. It will take a while








...and here it is. Happy Gamemaking!















p.s. dont forget to install the rest of package requirement.
It need to download another 659MB >.<"















Wednesday, April 29, 2020

Discord on Linux Mint Debian Edition (LMDE 4)

What is discord? As the website says:
Discord is the easiest way to communicate over voice,video, and text, wether you're part of a school club, a nightly gaming group, a worldwide art community, or just a handful of friends that want to hang out.

To install Discord on Linux Mint Debian Edition a.k.a LMDE 4 Debbie, open the Software Manager apps, go to search, insert the keyword Discord and click install button. And thats it.. ...wait what?

Please take a look at the list of change below. 722.2 MB will be downloaded in total. 2.5 GB more disk space will be used.  O_o"

Unfortunately, Discord only available from flatpak packages and not in the repositories as apt-cache policy returns nothing.

So the Software Manager wants to install Flatpak first before it can install other packages.

Maybe, Flatpak has some benefical as it said it allow the packages to be distro independent and more secure than installing unofficial packages. But hey, i will choose unofficial path for now :)

And yes, the Discord websites provide "unofficial" packages to be downloaded.

Save it to the hard disk.



2.2 MB will be downloaded in total. 179.1 MB more disk space will be used.

Install it and enjoy more free GB's for another use :D

Friday, January 24, 2020

GameMaker Studio 2 - Build-In Functions

4. BUILD-IN FUNCTIONS

Last post we have learn how to draw a rectangle using draw_rectangle () function. This function is a build-in functions that available within the GameMaker Studio 2 Language (GML). For all the list of available functions along with the required arguments and examples of code to show how thy can be used, we can look it at the documentations from yoyogames here.

Aside from the web documentations, middle click at the function within the editor will open a documentation tab to find some brief explanations and examples.








Now lets "move-along" with the lesson from sheepolution.com. 😀

Just like the post before, we start by drawing another rectangle in the draw event :

//Draw a rectangle
draw_rectangle(100,50,200,150,true);


When we look at the documentations, the numbers are x and y position of the left corner rectangle against the GameMaker room, as of (0,0) is located at the top left of the screen or at the top left of the GameMaker room.










draw_rectangle(100,50,200,150,true);

100 = The x coordinate of the top left corner of the rectangle.
50   = The y coordinate of the top left corner of the rectangle.
200 = The x coordinate of the bottom right corner of the rectangle.
150 = The y coordinate of the bottom right corner of the rectangle.
true = Whether the rectangle is drawn filled (false) or as a one pixel wide outline (true).




















And now, how to make the rectangle move? 
When the rectangle move, means the coordinates is being altered either by adding some amount of value or by subtract some amount of value.

In LÖVE framework (as written at sheepolution.com tutorials), we do this by using code :

function love.load() x = 100 end
function love.update() x = x + 5 end
function love.draw() love.graphics.rectangle("line", x, 50, 200, 150) end


Lets add a Create event :
x = 100;

And add a Step event :
x = x + 1;













And modified the draw event :
draw_rectangle(x,50,200,150,true);


and things become very weird :
Why is that?

Lets take a look at the function that we write in the draw event :

draw_rectangle(x1,y1,x2,y2,true);
draw_rectangle(x,50,200,150,true);

We only alter the value of x1 but not x2, thats why. The x1 is moving along 1 pixel at a time at x axis, but the x2 is not moving because the value is fix at (200,150) coordinates.

Now lets fix the code :

draw_rectangle(x,50,x+100,150,true);

why is x+100, not x+200 ?
Well, we have create a variable in the Create event :

x = 100

so x+100 equal to 100+100 = 200.

If we run the game now, the rectangle now should move normally.

GameMaker Studio 2 - LÖVE

3. LÖVE

LÖVE is a framework, a tool that makes programming games easier.
.....wait, what ? 😁

I was browsing through some game engines that run on linux and i found this sheepolution.com, a beautiful web contain tutorials for LÖVE game engine. Its written there, that LÖVE calls 3 functions :




- love.load()
- love.update()
- love.draw()

To draw a rectangle using LÖVE, we do the following :

function love.draw() love.graphics.rectangle("fill", 100, 200, 50, 80) end

What about GMS2 ?
Lets create a GameMaker Language Project, double click on the room0 and set it to 640 width and 480 height in room properties.











Lets create an object by pressing Alt + O.  An Object Window will appear alongside with event window.

There are lots of event listed there, but as far as i know, following LÖVE main functions, the three main event is create event, step event, and draw event.

To draw a rectangle using GMS 2, we do the following :

Add a draw --> draw event. Another window will pop up where we can write our code.
We add functions :

//Draw a rectangle
draw_rectangle(100,200,50,80,false);

Now, go to room tab, and drag the object from the right panel into room0.











Run the game by pressing F5, and voila, there's the rectangle 😊

Thursday, January 23, 2020

GameMaker Studio 2 - Variables and Functions

2. VARIABLES AND FUNCTIONS

Lets take a look from GMS2 documentations :

Just like any other programming language, GML uses variables as the basic unit for most programming operations.

A variable is something that we use to store a value for use in one or more operations o functions.

Lets do some math.
1 + 2 = 3.

okay, now lets add
a + b = ..... ?

it is hard to answer.
how about
a = 1
b = 2
a + b = 3

A variable could be anything. lets take another look from the documentations, the example of variables :

potions = 12;
life = 100;
name = "Jock MacSweeney";
strength = 5.5
armour = -2;

Now, In many programming languages you need to "declare" a variable before you can use it. This basically means that you tell the computer the name you wish to use so that it can assign a place in memory to store whatever value you decide to hold in that variable. With GML, that is not always necessary as it depends on the scope of the variable.

Now, what about functions?

A function is a block of organized, reusable code that is used to perform a single, related action. Functions provide better modularity for your application and a high degree of code reusing.

As in GameMaker Studio 2, GameMaker language gives you many built-in functions like move_towards_point( x, y, sp );, etc. but you can also create your own functions. These functions in GameMaker Studio 2 are called scripts.

Again, lets take a look at the documentations :

A function has an input and an output, and the output is related somehow to the input.
In GameMaker Studio 2 you use functions as part of the code structure to make things happen in your game and there are a great number of GML functions available to you, all of which are explained in the Language Reference section of the manual.

In GML a function has the form of a function name, followed by the input arguments between brackets and separated by commas (if the function has no input arguments then just brackets are used). Here is an outline of the structure of a function:

<function>(<arg0>, <arg1> ,... <arg15>);

As for the example above, the <function> is move_towards_point and the <args> are x, y and sp;



Learn How To Program With GameMaker Studio 2

It is a beautiful title isn't it? 😁

INTRODUCTION

Long time absence from game development world (as a hobbyist) make me forget how to create even just a simple games that i stumbled upon my old post of this platformer gif picture and wondering, did i made those movement engine?

The need to redo tutorials that i might find on the internet to refresh the knowledge of how to program is coming on urge to my brain. and this time i think i will "share" the journey in my blog to keep me remembering those tutorials. The list will be "growing" over time, and might stop anytime depend on the availability of my spare time.

Of course this walk together of learn to program will be using GameMaker Studio 2, a game engine to create 2D games that said is beginner friendly enough for a newbie. This engine is something that i wish had a linux ide for long time. Wish is a wish, and business has to carry on 😁

DISCLAIMER
I am not a programmer evangelist nor a game development specialist. Just common hobbyist who love to write a blog. There will always be a better way or other way to do things and achieving the same result rather than using content from this blog. One way or another, here is the planned list of contents. 😉

TABLE OF CONTENTS

2. Variables and Functions
3. GameMaker Studio 2 - LÖVE
4. To be added soon..