Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - hpg678

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 »
Tips, Tutorials, Examples / Using Joystick Functions in your game
« on: December 06, 2018, 07:24:16 am »
When developing your game/project, adding control for your gamepad can greatly enhance the fun playing. After all you may not want to use your keyboard all the least for me anyways.

The gamepad functions don't work, you'll have to use the joystick functions. I did a short example using an Xbox One Classic controller which was modded for USB. My usual PS2 controller wasn't working well so i had to opt for this one. However a few days later, a friend brought one for me, so I now have two to use.

having written the code I did realize is that the Dpad and  Analog Sticks functions are very much the same for both controllers. The buttons assignment are different however. Bear that in mind when you assign buttons for either controller. You can create an options screen to do this.

To write the code, i used a program called 'jstest' on Linux a joystick/Gamepad diagnostic tool, which showed me the assignments for the buttons and analog sticks. From there I was able to match up what was what in the functions list and have it working.

the main segment of the code, i placed in the Draw event, as I wanted text to be written when I applied an action. Since then I had added graphics tp provide a better and more pleasant appearance. The code looks like this

Code: [Select]

if (joystick_exists(0))
var name;
name = joystick_name(0); //gets the name of the controller
// show_message(name + " is connected.");
draw_text(64, 32, name + " is connected.")
draw_text(65,33, name + " is connected.");

if !(joystick_exists(0))
  show_message("Joystick is not connected");
  //draw_text(64, 32, "Joystick is not connected")
// ///////////////////////////////////////////////////////////////////////////////

if (joystick_check_button(0, 0))
   //draw_text(448, 96, " 'A' button is pressed")
   draw_sprite(spr_highlight,0, 330, 200)
   draw_sprite( spr_highlight2,0, 462, 90)

if (joystick_check_button(0, 1))
   //draw_text(448, 128, " 'B' button is pressed")
   draw_sprite( spr_highlight,0, 360, 169)
   draw_sprite( spr_highlight2,0, 462, 129)

if (joystick_check_button(0, 2))
   //draw_text(448, 128, " 'Black ' button is pressed")
   draw_sprite( spr_highlight,0, 364, 229)
   draw_sprite( spr_highlight2,0, 462, 363)

if (joystick_check_button(0, 3))
   //draw_text(448, 128, " 'X' button is pressed")
   draw_sprite( spr_highlight,0, 299, 170)
   draw_sprite( spr_highlight2,0, 462, 168)

if (joystick_check_button(0, 4))
   //draw_text(448, 128, " 'Y' button is pressed")
   draw_sprite( spr_highlight,0, 330, 139)
   draw_sprite( spr_highlight2,0, 462, 207)

if (joystick_check_button(0, 5))
   //draw_text(64, 128, " 'White' button is pressed")
   draw_sprite( spr_highlight,0, 334, 252)
   draw_sprite( spr_highlight2,0, 462, 324)

if (joystick_check_button(0, 6))
   //draw_text(64, 128, " 'Back' button is pressed")
   draw_sprite( spr_highlight,0, 64, 213)
   draw_sprite( spr_highlight2,0, 462, 285)

if (joystick_check_button(0, 7))
   //draw_text(64, 128, " 'Start' button is pressed")
   draw_sprite( spr_highlight,0, 84, 239)
   draw_sprite( spr_highlight2,0, 462, 246)

Remember this was originally written using an Xbox One controller which has 8-Axis and 10 button assignments. My PS2 clone gamepad (DragonRise Inc. Generic USB  joystick) has 7-Axis and 12 buttons.

if you want you can use the code as a starting point. Feel free to improve it and use it as you want. hope it has been a little helpful to you.

Off-Topic / Re: Greetings, everyone!
« on: December 04, 2018, 03:23:44 am »
Greetings and welcome to the Forums. Took a peek at your Youtube channel and I must say, its very cool....especially the GemHunt series. Happy to have a fellow youtuber doing vids on creating games with ENIGMA. :)

[Not trying to be 2 critical but you should record in a higher resolution.]

I also have starting doing a series using Enigma which is geared towards beginners.........check it out here.

LGM/Enigma is being re-designed at the moment as RGM (read the Announcements for more info), so further work has been put on hold for the moment. However you can still work with LGM to do your projects. A lot of the past issues have been fixed through the tireless and amazing work of the developers. Kudos to them.  (Y) (Y)

You can check out the Discord channel to talk directly with the devs, chat on various subjects as well as get help on matters. I am mostly here but I also go there to chat with everyone else.

Issues Help Desk / Re: LateralGM external code editor does not work
« on: November 17, 2018, 02:53:00 am »
in the wiki, there is a method for using Notepad++ on Windows systems. You can try that method. However, there is no known way to replace it on Linux least not yet.

Suffice to say, I have not tried the Windows method, as I use Linux.

Off-Topic / Customizing your Terminal
« on: November 14, 2018, 07:05:04 am »
Here's a handy little tip  to customize the Terminal prompt.
This online app allows you code your bash prompt from its standard to a more colorful as well as place anything you want on a newline. It has a Drag and Drop interface so you can see the results as you place the elements. the code generated can thus be copied and paste to your './basrc" , a hidden file in the top level of your <username> directory.
e.g /home/<username>
I recommend using your File Manager. select 'Show Hidden Files' to then edit .bashrc file. I also recommend pasting the code at the very end.
the link to the app is

Issues Help Desk / Re: RGM crashes on startup
« on: November 11, 2018, 01:45:22 pm »
Hi there. RGM is still in the not ready for use. It will crash and fail. The versions you see were released as more of a 'Sneak Preview", so it may work, for some and others, it may not.

However, one of the developers, Robert Colton, did recommend moving it to the ENIGMA-DEV folder, then build emake with CLI_ENABLE_SERVER=TRUE.

In the meantime, please continue using LGM until the Announcement is given......(which may be in December)

Off-Topic / Re: A warm hello
« on: November 06, 2018, 04:17:58 am »
Thanks Wendigo! I got caught up in other matters and forgot to tell you about the other Themes. I have personally tried them out. Personally, I prefer the 'Synthetica'for my Landscape monitor.

Issues Help Desk / Re: Win32 Enigma missing ffi.h
« on: November 06, 2018, 04:07:34 am »
In my opinion, as far as exports go, unless Game development software has a competent method to do port to LINUX, it is going to hurt itself. Basically it has to do with users  wanting more games for LINUX or wanting a port for LINUX.  Of course, there is Wine and Proton, but it is not the same as running the game natively.

Off-Topic / Re: A warm hello
« on: November 06, 2018, 03:32:18 am »
Hello and welcome. As a former GM user myself, my focus is to do more games for Linux, which interested me to LGM.  There is no additional modules needed, expansion packs nor additional setups, just install to the OS you use and compile your game. Simple and easy.

In my opinion Enigma has the potential to beat the likes of UNITY and Gamemaker itself, two of the most common IDE for developing games, i have read people use. ENIGMA is faster, easier to setup/use, and best of all, compatible with most GM files. Of course the developers can give you a better detail on the technical aspects of the IDE.

Further development on LGM has been put on hold for the moment as it is going through a total overall of the in the creation of a new IDE, aka RGM. However, you can still use LGM to produce games. You can read the Announcements section and get all the information on it.

So again, welcome and I hope you enjoy making games with LGM/ENIGMA. You can join the Discord channel to talk with the dev, ask questions and get help with any problems, you may encounter. I'm also here most of the time. Also, consider supporting by joining the Paetron page.

Off-Topic / Customizing your Terminal prompt
« on: November 04, 2018, 06:53:12 pm »
Here's a tip i'd like to  share with you on customizing your terminal prompt if you get bored of the plain version you use. On my MX17 machine the prompt looks like this

However I couldn't remember how I did it nor where i got the tip from. My desire was to do the same thing on my Manjaro laptop. thankfully the guy over on the Discord channel helped me out a lot. Thanks Rusky and gfundies! (Y) (Y)

After pointing me to the correct file to edit, I used some code generated from this website named which uses a Drag and Drop interface. To use it is very simple. Drop some buttons over and you'll immediately see the results and code generated.They also instruct you where to place the code which can be found in your home directory named ".bshrc" . remember though you must be root and it is a hidden file so it is probably best to use your File Manager as Administrator/root and make sure the "show hidden Files" box is checked in the View Menu.

General ENIGMA / A New Arch Setup
« on: November 03, 2018, 08:16:49 am »
With the many changes Enigma has been through, Linux users of Arch and its derivatives like Manjaro may find it difficult to keep up to date with those changes. Therefore i've looked into the matter and I'm happy to say that results  were successful.

First, let me lay down some ground work. My initial machine is an Acer Aspire 15" laptop with 4gb of DDR3-6400 memory; a 2.14Ghz AMD Dual Core CPU and 150Gb SATA hard drive.

My second testing  machine is a Desktop PC with 6 GB DDR3-6400 memory, with a embedded 2.4 AMD Dual Core CPU, and 320Gb SATA hard drive. The OS is Manjaro Linux with Gnome 3 as the desktop environment for both.

The installation setup is similar to the one in the wiki for Linux setup with changes made for Arch dependencies. Everything else is the same.  Additionally,  I've also made instructions to use Samuel Venable Tiny File Dialogs widget. For some reason the 'Zenity' segment will not display with the newest version of Zenity 3 installed. With KDialog installed, it works and displays just fine. However if you prefer to use Zenity, just follow the instructions written.

I also created 2 videos. one showing LGM installed and running a test program to display Dialogs with either Zenity or KDialog chosen. The second one shows ENIGMA setup using the setup script on the Desktop PC using an external USB camera. however, the quality is crappy.....really crappy, so I'll have to do it over on my Laptop. (that camera highest resolution is 640x480 at 30fps...its a really OLD camera, but hey it still works........)

If you come into any problems or need more help, you can post it here, on the Forums, or on the Discord channel as I am either here or there, regularly.

The link for the Arch setup script is here

The link to setup Zenity and KDialog on Manjaro Arch is here.

Instructions have also been added to the Wiki, where you can access it from here

Off-Topic / Re: absolutely important announcement
« on: October 22, 2018, 04:24:14 pm »
 (Y) (Y) :) :) (Y) (Y)

Tips, Tutorials, Examples / Debugging Your Project: Finding Memory Leaks
« on: October 22, 2018, 06:40:35 am »
i was having some memory leaks problems with a project of mine. One of the developers (gfundies) mentioned using "Test Harness' to find them. It not only solved my problem but also pointed out other errors/inconsistencies within my code. Which is why i thought it'd be a great tip on Debugging for you guys.
The Test Harness segment can be found in Game Settings-> Compiler.What i did is run my project, then copy/compare the results.

I have used this method on my Linux machine. I haven't tried it on Windows or Mac, but it should work fine.

I'm not sure if this method is the most efficient way but , it works for me now at least. Who know, maybe the guys will construct something more efficient like an automated process writing to a file or something else........who knows........... :)

Works in Progress / Re: Witch Blast
« on: October 21, 2018, 07:08:25 pm »
It works great now! I like it........ (Y) (Y) .

if i may make a suggestion though, i would also include keyboard controls for the right,left, up and down arrows keys........just in case left-persons are testing your game.

I love the graphics, game play is very smooth. it looks like its going to be a popular and fun project. i would like to promote this in another one of my Showcase videos featuring games created by ENIGMA. you can check out my first one here.

Works in Progress / Re: Witch Blast
« on: October 21, 2018, 07:28:55 am »
did check Run as Executable. What library are you referring to?

Works in Progress / Re: Witch Blast
« on: October 20, 2018, 11:31:56 pm »
Great hearing from you.
i tried to run your game but it didn't work. I'm running on Linux Mint 19 64bit.

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 »