2DManiac's Forum Posts

  • Thanks so much! I wasn't aware of this, it works perfectly!

  • How do I access project files through an HTML Element Object?

    I'm trying to create some icons in an HTML Element for a rich text editor that I'm integrating on my project. However I'm having trouble knowing how to access those files through html, or by getting the files URI.

    - Using the actions "Create sprite image element" and "Position object at element" is no good because the images don't look good when imported this way, and the user is able to drag the images around if they click them, which doesn't look very normal for what it's intended.

    Tagged:

  • Very cool, congrats! :)

  • Very cool Prince of Persia vibes.

    Still feels a bit clunky, but it's still fun.

    A few suggestions:

    - Maybe make the movement somewhat tile based, so it can be a bit more predictable. Like the Prince of Persia games. I couldn't grab to one of the ledges for a while because I wasn't pixel perfect aligned.

    - The smoke time-out doesn't feel very intuitive. It should only be safe to cross when the smoke is gone completely. Maybe adjust the timing there.

    Cool project though, keep it up!

  • Like this:

    I also made some adjustments to the demo which include this, and made some tweaks to some values, such as the pathfinding refresh rate. It was at every 0.02 seconds, but that appears to be pretty memory heavy so I changed it to 0.05.

    It also seems to work better with 4 directional movement.

    drive.google.com/file/d/1nDI-BU8huVVyZSzPvkEFd0nZLw6xFY-e/view

  • Adding this should help you achieve the effect:

    Also consider increasing the rotation speed so the characters quickly snap into the correct angle.

    As for the animations, all you need to do is check the angle of the Player/Enemy Controllers and apply the animation to the characters based on that.

    - For example, if Enemy_Controller angle is between 315 and 45, set Enemy animation to "Right".

    You can use the condition "Pick Children" to access the Graphic object belonging to the controller.

    - For example: Condition1 -> Enemy_Controller -> Pick Children -> Enemy.

    Condition2 -> Enemy_Controller angle is between 315 and 45

    Action: Enemy -> Set Animation to "Right"

    Since you used the Condition 1 to specifically pick the child of the Enemy_Controller, it will only change the animation if it's its own child.

    Same applies to the Player.

  • Do you need only the graphics to turn in 4 directions, or do you want to restrict the movement to only Up, Left, Right and Down?

  • I made a small improvement to fix an issue where they would still get stuck in the wall sometimes. Use this version instead:

    drive.google.com/file/d/1nDI-BU8huVVyZSzPvkEFd0nZLw6xFY-e/view

  • Here's an example I made using the pathfinding behavior.

    It has some extra stuff to add a bit of polishing that you may find useful.

    The code is fully commented to great detail, so it should be easy to understand.

    drive.google.com/file/d/1nDI-BU8huVVyZSzPvkEFd0nZLw6xFY-e/view

  • Hm, interestingly enough I thought I had tried it already, and it turns out I didn't. The 3D shapes indeed do not have this issue. Thanks for the suggestion. So far it seems like it only happens with the 3D Object, and also sprites using Rotate 3D Behavior.

    I'm gonna report this to the creator of the plugin, to see if it's possible to get a fix.

  • Thank you so much! Appreciate you leaving a comment!

    Yes I tried that as I also thought that might be causing the problem, however it doesn't seem to be. The far distance is currently sitting at 10 million haha, and the near distance is at the minimum, 1. It may be that if the near distance was allowed to be lower than one, that might affect the result, but unfortunately I am not able to test that.

    What makes it most odd is that the work around I got (barely a work around) was to just set the Z value of the layer where the object with effects is, to 1. Higher than that makes it problematic again, lower than that also problematic.

    Here's a video of the object getting cut off:

    Subscribe to Construct videos now

    I set the layer Z Elevation back to 0 and made the the glow objects invisible to make it easier to see the issue. As you can see, the object gets cropped at the bottom. With different sized objects, it would also get cut at the top. I wonder what could be causing it

  • DEVLOG 1

    Introduction

    This is the first public showcase of the project. It started as a proof-of-concept to explore the feasibility of creating a Space 4X using Contruct 3. With the aim of pushing the boundaries of this engine and take advantage of the streamlined eventing system and ease of use to creating the game logic.

    As I started the first tests, the results showed promise right away, as I was able to get pretty good results very quickly, with much better visual quality than I was initially anticipating.

    The engine also seems to allow much a higher triangle count for 3D objects than I was expecting, which is great plus for graphical fidelity.

    Overview

    Everything you see in the video is generated during runtime. In this version I implemented a procedurally generated Galaxy, Star systems with Stars and Planets.

    - How the Galaxy Generation works

    • I start by creating a galaxy Sprite object that contains some basic variables for the galaxy creation

    • Next a Galaxy Map array is created that serves to plan out where the star systems will be created on the layout. Each cell will be assigned a value to determine whether that location can spawn a star system or not.

    Cells with the value "0" are valid spots to spawn star systems; cells with the value "2" are invalid and can't spawn star systems; and cells with the value "1" are cells that have been chosen to spawn star systems.

    • I make a first pass that turns all cells into 0, then I make a second pass where every other cell is set to 2. This makes sure that the star systems won't be spawned perfectly aligned.

    • Next I will do a Second pass which will determine the shape of the galaxy. For this I start by creating a Drawing Canvas which will be used to check a heightmap.

    • I create a Sprite object with the Heightmap, this is a sprite that contains a black&white image of a galaxy shape like so:

    • I paste this sprite into the Drawing Canvas and take a snapshot, in order to evaluate each pixel color of the image.

    • I run a for loop for the positions corresponding to each of the cells of the Galaxy Map Array on the Drawing Canvas, and compare the Red value on each position. If the red value is low (for example <20), that cell is invalid to create a star system. This makes sure that no star systems will be created in the dark areas of the heightmap, and lots will be created on the light areas.

    • Finally I run a for loop for each of the Galaxy Map Array cells and spawn star systems on a random amount of cells with the value 0. (I have some parameters that make this more controlled, such as a density variable that is also affected by the brightness of the heightmap)

    The great side of this system is that it allows me to easily create pretty much any shape of galaxy I want by making a quick doodle on photoshop. The way I have it set up, is each galaxy type is a different animation of the sprite object, and I can easily determine which type of galaxy shape I want by simply changing the animation before pasting it into the drawing canvas. Pretty cool!

    Then as soon as a star system is created, it automatically populates it with a star and planets. Currently there isn't much into it, but on a future version I will create arrays that house all of the star systems, planets etc, including info related to each one, in order to easily track them.

    Problems Encountered

    1. As expected, before doing any optimization, I encountered problems with frame rate, which were being caused by there being so many 3DObjects on scene. I solved this issue rather easily, by simply making any 3DObjects that are far away, invisible. Considering the nature of this game, where each star system is very far away from each other, this works extremely well, as usually no more than 2 or 3 stars are close to the camera at one given point. So, as soon as they're a bit farther away, it's completely unnoticeable, as I can turn them off and simply display the white aura around them. The images used for the Star System ring graphic and star glow are also pretty big, so I introduced different LODs (Levels of Detail), having lower resolution images be displayed for farther away objects.

    This worked like a charm and put the frame rate at top performance.

    You may notice on the video that frame rate drops sometimes, this is because I haven't implemented this into the planets yet, as they were a last-minute addition, but once I do add some optimization, it should be back at max frame rate.

    2. A pretty bad problem that I did come across however, is that the Drawing Canvas paste object function doesn't always work unfortunately. It's very finicky, and I had to go through a lot of different experiments to get it to work consistently, as it would just decide to not work every now and then, sometimes it would simply not work. The only way I could get it to work was if I called the generation function from the "Start of Layout" condition. Otherwise it would not paste the image. (Yes the function is asynchronous and I have "Wait for previous action" after this action).

    I ended up brute-forcing it in order to getting it to work consistently. Which would consist in destroying the existing heightmap object, creating a new one and paste that one. It repeats until it works basically. This seems to be a problem of the Drawing Canvas Object, that should be addressed Ashley

    3. Effects very touchy with 3D shapes / 3D objects. They look great and and achieve amazing results, but there's an issue where the object gets sliced at the top or bottom with certain camera angles. Often the more the camera angle is closer to the 0-Z value, the worse it gets. The object I have that uses the most effects and requires those effects is the Star Object, somehow I was able to find just about the perfect values to make not show this issue I'm mentioning, the main solution being placing the the Star object in a layer that has a Z elevation of 1. Yeah lol.

    However, with other objects, I seem to not be able to circumvent this, and am often forced to give up adding an effect, and finding a different way to achieve the look I wanted. I would be great if this could be solved, although I don't know if it's a fault of Construct 3 or the 3DObject plugin. I found that this only happens if the effect is on the object itself instead of the layer, but it often is the only way where the results are worth it to keep the effect.

    4. Working around the drawing priority (where 3D objects disappear behind of semitransparent pixels) will be admittedly a pain in the ass. But I hope that that with a lot of tests I'll get there.

    Graphical Enhancements

    I worked a fair bit on the look of the stars, but still need to do a lot with them, such as improving the texture and mesh. I'm also going to create different LODs for each of the 3DObjects, to further improve performance.

    Overall it works for now.

    Conclusion

    If you managed to read through all of this, you're insane. But I hope it was informative, and not too boring.

    This is probably the longest Devlog I will ever write, as I wanted to cover the main topics of what I did with this project. There's a lot of stuff that I didn't cover.

    If there's anything you saw in the video that you're particularly curious about, feel free to ask.

    Overall it's been a lot of fun working on this project, sometimes I get stuck with something for a couple days, but overall I've been able to overcome it one way or another.

    Feels like I'm pushing boundaries, and making the most out of this Engine, which is a great feeling.

    I'm looking forward to see where I'm able to get the graphical quality here.

    Video of this version:

    Subscribe to Construct videos now

    Future Features to Implement

    - Generate background stars and nebula, including a skybox

    - Create arrays that track planets and star systems (and assist on their creation)

    - Different types of planets

    - Create a Twin Star system when 2 star systems overlap

    - More Optimization

  • NOVA IMPERIUM - DEVLOG

    Most recent showcase video:

    Subscribe to Construct videos now

    Major Features Implementated in the latest version:

    - Galaxy Generation

    - Star Systems

    - Stars

    - Planets (last-minute implementation)

    - 3D Camera Control

    - Some Optimization

    OVERVIEW

    First of all I would like to thank Mikal and his/her team for opening up the Construct 3 Engine to new horizons and making something like this possible.

    This Thread will be a sort of Devlog type thing where I will occasionally update this post with the most recent version. The individual devlog Entries will be in the comments.

    Please feel free to leave a comment on what you think or any questions, I really don't want to feel like I'm talking into the void here haha. Any feedback is encouraged and very much appreciated!

    In case you're wondering why I don't have a Construct 3 License badge, it's because I have my construct 3 License tied to my company account, and I prefer posting with my personal account.

  • I completely agree, I have no such extensive experience in coding, but I've used Construct since its first iteration, and it's pretty much the best engine I've ever used.

    The selling-point of this engine is 100% its eventing system. There is nothing like it in my opinion. Even GDevelop, which is heavily "inspired" by Construct, doesn't manage to get it. And node systems like Game Maker and Unreal, make the process unnecessarily complicated. That's why I don't mind paying a bit more for this engine at the end of the day.

    Construct is almost like writing pseudo-code, that actually works.

    You just need to think of the underlying logic of your systems and it usually works out as you expect.

    I'm in the process of creating some interesting projects, one of them 3D, and while Construct 3 isn't really made with 3D in mind, the eventing system is just too precious. I would take 100x longer to make this on Unity on Unreal, so who cares if the graphics aren't as good. And to be honest, they're not bad at all actually.

    Honestly I think that if more investment was put into giving Construct a truly capable 3D engine, it would easily become one of the most popular engines out there, on par with the big 3.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • As you know, sometimes Scirra releases official addons on certain updates that are not included in the engine and must be downloaded by the user (such as the Steamworks and Epic Games ones released recently).

    This makes sense to avoid drowning users with plugins they may not want to use, but generates an issue in which some useful official addon has been released, and users may easily miss it, or just don't remember its name when they decide to download it.

    For this reason, it would be great if on the Addon page of the website, there was an option to show official addons only (not counting with built-in ones) so that these are easy to find.

    Thank you.

    Tagged: