Greetings from Maryland USA

Hello everyone, I am very new to online game development, but not to computer programming. I retired after 30 years from the IT field, so I have a good handle on writing code. Unfortunately, I never had a chance to learn or use web languages (Javascript, Python, HTML5), but I do have a decent understanding of HTML and some CSS.
The company that publishes my five strategy board games also produces puzzles based on mathematically similar shapes (e.g. pentominoes). A number of years ago, a worker (who is no longer with the company) created an on-line ā€œpuzzle parlorā€ using Flash (you can see where this is going, right?). Since I have time on my hands, I was asked to recreate these puzzles without the need for Flash. I looked at a number of products and I chose Gdevelop for its simplicity and the fact that I do not need the capabilities of 3D animation (as provided by Godot, Blender, Unity, and Unreal).
So far, my biggest hurdles are:

  • working in a Beta version of a product - are the issues Iā€™m having mine or the software?
  • product documentation - hopefully, once I get comfortable with GD, I can assist with this issue
  • missing constructs that I had in other platforms such as IF/Else, Case, Relative object referencing or pointers, subroutines, functions just to name a few.
  • I see references to an OR condition in Events, but I canā€™t seem to find how to create one (version 5 beta-68). Maybe someone can tell me if this is a beta issue or I need new glasses.

My development platform of choice is Mac.

Other notes about me:
Hobbies: reading (science fiction/fantasy), photography, motorcycle riding (Burgman 650), board game development (5 so far) and collecting fountain pens.

Hi. Welcome on the forum, hope you going to enjoy it.

The core engine of GDevelop is pretty solid with no bugs and the compiler is also doing a pretty good job 99% of the times. This is one of the things that I like about GD the most because most of the time I can be sure the problem I have is mine and not the compiler or anything. However, I can speak for the core engine only that being developed by 4ian the lead developer and Victor been one of the main contributors to the core engine. I havenā€™t tested the new features and tools added in V5 beta by other contributors and also I never used a Mac.

Yes, many people complaining about the docs either because of lack of content or poor language or both but in case you are a programmer with 30 years of experience and also developed some board games in flash, Iā€™m sure you can find your way around, after all it is designed with no coders and kids in mind. You also welcome to ask any questions you have.

Yes, often mentioned by people coming from different engines, however you can easily create a switch using a variable and work around the absence of Else and Case. IF is also often mentioned but the fact is, every single event block works exactly as an IF statement, conditions are the statements and action is the body of the statement. Sub-events also works the same as a nested IF statement, sub-event are being tested and executed only if the statement of the parent was true also. There is also external events that you can call from any scene, anywhere.

You can reference objects by name and you can also use object variables and there is also events to create a logical link between objects.
linked

A new feature is also in development that is going to allow you to create your own behaviors using events that you can attach to any objects giving you the ability for object oriented development:

You can create your own functions in the project manager, currently the option is at the button:
functions

You can find it under the advanced category.

advanced

Good luck.

1 Like

Thanks, ddabrahim - totally missed the OR under Advanced.

Regarding relative object referencing - Iā€™m not sure that linking two objects is what I want. Iā€™m developing Events to rotate and flip a piece in the game. Since every piece can be manipulated in the same way, I would like to be able to use this block of code for any piece the user clicks on by ā€œvariablizingā€ the object name and feeding it to the code block. So far, I donā€™t see a way to do this within the constraints of Gdevelop 5 (without resorting to some complex code in Javascript - which is what I hoped to avoid by using Gdevelop).

One clarification - I didnā€™t develop the Flash games - someone else did and Iā€™m trying to replicate their work in Gdevelop. My games are strategy board games (laser cut into real wood). If you (or anyone else) is interested, I can send you the URL for the site - I donā€™t want to advertise here.

There is a few options you can try.

In game development it is common to use things like ā€œgame controllerā€ objects that is usually invisible to the player, can not interact with, the only purpose of this object is to store information and control certain aspects of the game. In GDevelop, you can literally add an object to the scene, call it ā€œobject controllerā€, make it invisible if you want to or just make it look like a generic scene asset, nothing special and then whenever the user clicks a piece that you want to manipulate, you can Link that piece to the ā€œobject controllerā€ object. And then check if the object controller has any other object linked to it, take in to account the Linked objects and execute your instructions on those objects. When you are done with the manipulation, you can drop the link. In case we are talking about different objects with different names, what you can do is add the objects to an object group and then reference the group instead of the object and your instructions automatically going to apply to all members of the group that meet the condition.
So you can add the instruction for example to Link the group to the object controller if the group is clicked, and then take in to account all groups linked to the controller and then manipulate the group, it is going to apply to all and only to those objects inside the group that is meet the condition.

This is one way to use object linking for example and object groups.

An other way to go about this is to use object variable to flag an object as selected when clicked and then you can simply check if an objectā€™s variable ā€œselectedā€ = 1, then execute your instructions on that object. Again, in case we are talking about different objects with different names, you can add the objects to a group and reference the group in your instructions instead of the object.

As an alternative to groups, in case certain items in my games doesnā€™t have multiple animation frames but a single frame only to display the item, I often group items in to a single object as animations of that object. The benefit of doing it this way is that animations can be referenced by either name or number so you can more easily target items that you want by checking what animation the item displaying. Is it a ā€œknifeā€ or a ā€œshieldā€ for example.

GDevelop might doesnā€™t have all features packed in to an easy and ready to use option, but very flexible and capable there is very little that can not be done in GDevelop using events. You need JavaScript mostly if you want to implement a 3rd party library or a feature in your game and you need to tap in to the core engine (GD.js), but you donā€™t want to deal with the source of GDevelop. Everything else can be done using events and expressions.

Ah, I see. You are free to add your site to your profile then anyone can visit your site by clicking your profile. I would be interested, I like hand made items. Also, all members welcome to advertise anything in a discreet manner as long it is not malicious, racist, illegal or adult content.

I will have to try that concept of using Linking to make the actions (which I got working last night) generic for all 10 pieces - thanks ddabrahim.
BTW - I added my publisherā€™s website to my profile, but I am also going to add it here:

http://www.gamepuzzles.com

Hey folks - sorry Iā€™ve been away for so long, but life happened (fortunately not COVID-19 related). Before things decided to get strange, I did manage to complete my first poly form puzzle (Ten-Yen) and I learned a lot (mostly by experimentation) in the process. Since Ten-Yen is based on polyominos (think Tetris type pieces), the logic for moving and snapping the pieces to an invisible grid were fairly easy. Now that I need a distraction (as stuff has calmed down), I am going to try a more difficult puzzle where the ā€˜trayā€™ area is octagonal and the pieces include 45 degree angles.

The company that asked me to try to convert the Flash version of the puzzles also produces and sells the puzzles made from laser cut acrylic. This is why there is a ā€œpurchase this puzzleā€ button below the puzzle on the puzzle launch page.

If you would like to try it out, the temporary location is: Puzzle Parlor

In creating this game, I developed a number of functions which I am willing to give to the community if someone can tell me how and where to send them. These functions include:

  • setting the clicked on shape to selected
  • calculating the offset between the Origin point (center) and the location where the cursor was when the shape was clicked
  • rotate shape 90 degrees in the specified direction (2 buttons - rotate left, rotate right)
  • flip shape taking into account the rotation so that the Gdevelop function works properly
  • snap to tray grid only if the shape is fully inside the tray
  • drag shape and keep it within the bounds of the scene (had to write my own drag function because the ā€œdraggableā€ property didnā€™t work with my grid snapping logic).
  • handle collisions with the tray border so that the border turns red if a shape overlaps it
  • handle collisions between one or more shapes (each shape has 4 ā€œanimationā€ sets - normal, selected, overlap, overlap & selected)

Take care all and stay safe and healthy.
Art.

2 Likes

Congrat for finishing your game!

To share your functions, I think it would be best if you could pack them in to an extension then you can export and submit the extension on GitHub. You can find how to share extensions here:
http://wiki.compilgames.net/doku.php/gdevelop5/extensions/share

Thanks. :+1:

1 Like