Fengist's Recent Forum Activity

  • [/img]

    You would make an own html/css/js website, with the functionality you need, load it into your game via iframe, then write some javascript to shovel data back and forth between your game and iframe? Sure it´s possible but... rather overcomplicated?

    In theory, I could possibly build this in Construct. The effort it would take would be... well I don't want to think about it. The easiest way would be to pass the data off to a website, have PHP build the HTML and then pass it back to the client via an Ajax request.

    In Delphi, which I mentioned above, assuming I had the data and images, 30 mins to an hour.

  • Well, that's pretty much what the iframe object can already do, but securely by default. Is there any particular reason that doesn't do what you need?

    Lots.

    One of the reasons I've been promoting the HTMLElement plugin is because it allows users to click on various HTML elements and pass those clicks to Construct functions. THAT alone is a HUGE step above a simple Iframe. HTML is a coding language in it's own right. It took me 2 days to get the code in Construct to work and display 2 layouts, make Ajax requests, parse Json results, etc. It took me over a week just to get the HTML for ONE GUI element working well enough that I was satisfied and, as you saw in the link above, I had to create that on codepen.io. Customization requires extensive knowledge of CSS and JS and even CSS is becoming a massive nightmare trying to keep up with all the browser specifics. If I want to display HTML, sure I'll use an Iframe. If I want to create a GUI, the Iframe is damn near useless.

    I have mentioned that I still program in an ancient language called Pascal. Delphi is the IDE I use to develop in. Delphi is called a RAD (Rapid Application Development) platform because you can quickly build an app with simple controls. I have literally 1,000 elements that I can drop on a form, everything from visible buttons and scroll boxes to encryption methods and pie charts. The publisher of Delphi only created a handful of these. The vast majority were created by the community. The reason there are so many of these plugin modules is because they too are created in the Delphi environment. Once you learn how to code in Delphi, you can create these plugins.

    I know how to code in Construct but I can't write a plugin. I took a brief look at how to write plugins for Construct and threw my hands up in disgust. Even a basic 'hello world' plugin was going to take a huge amount of effort just to learn JS beyond the basics.

    Delphi and Construct have one thing in common that attracts me to both. Rapid development. I didn't have to learn the intricacies of any language to begin building with Construct. I only had to rethink some syntax.

    My suggestion is something I understand you've already considered. Make creating plugins easy. Make it so that if I have a knowledge of how to use Construct that I can create my own. You give me that power without having to spend months learning JS and OOP and callbacks and not only will you see me creating GUI elements, you'll likely see the plugin collection expand massively.

    YOU do not have to reinvent the wheel here Ashley You only need to give your Construct users the ability to create their own wheels with a limited amount of facedesking and I'm fairly certain that the work that's being suggested here will be handled by your community.

    Here's the proof of the concept.

    wiki.delphi-jedi.org/wiki/JVCL_Component_Overview

    They currently have over 600 'components' for Delphi in their open source library. All of them created by the Delphi community.

  • This sounds like you tried to create a UI and got frustrated at your own bugs so now you want a UI template? You can probably find some premade files somewhere. I tend to avoid using html elements and use sprites, much easier to handle. Also you can't blame Construct 3 for your own bizarre approach to making an inventory UI. I made an inventory with a background image, a sprite for the slot to display an item, and an array.

    Let's see you create something like this with just sprites...

    objectlistview.sourceforge.net/images/fancy-screenshot.png

    I got a better challenge for your sprites. Create the editor.construct.net using editor.construct.net. Nevermind the underlying code, just duplicate the layout. Hell, I'd applaud you if you could just recreate the properties bar!

    You're going to find out REALLY quick just how difficult that is because of the lack of basic UI elements in construct like list views, and resizable panels.

    Here's the problem as I see it. The team at Scirra have a locked-in mindset that Construct should only create mostly mindless graphic oriented games like platformers. The problem is, Scirra has never deviated from that mindset. Look at how many platformers and similar genre games there are on the market now. Millions. Trying to create a platformer and make it successful in today's market is akin to facedesking. It's painful and you rarely accomplish anything.

    Now look at this game:

    scorzy.github.io/IdleAnt

    It's an old style text based strategy game. It starts out easy but as it progresses, you start to see the challenge. Trying to create a game like that in Construct would be nightmarish. I know, I'm attempting a game in a similar genre. Because of the lack of GUI elements, I'm having to create the entire GUI out of custom HTML and CSS. Let me give you an example:

    codepen.io/Fengist/pen/oOjgBw

    That's a skill tree I'm working on before 'importing' it into C3. And even there, it doesn't work half the way I want. And, I'm having to use plugins because something as simple as an HTML panel doesn't even exist in Construct.

    Construct has the ability to create so much more than just games. It has the power to create full blown web apps. Everything except the user interface that is...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Two short questions:

    1. I want to center text vertically in the HTMLElement text box. I played around with the 'Inline Style' property, but did not find a satisfying solution so far. Vertical alignment seems to be particularly difficult. Any ideas?

    2. Square roots in LaTex appear beautifully in Fengist's example (using the online MathJax inclusion), but not in el3um4s (using the offline MathJax inclusion). I don't understand why. I might understand the code once I get more used to JS, but I thought I might ask anyway.

    I can give you some help with the first one.

    CSS

    w3schools.com/howto/howto_css_center-vertical.asp

    The inject css will let you load your own style sheet and I can say without a doubt that anything inside the HTML element can be affected by it.

  • And, if you look in the project I wrote, there's one line of JS. If you add that to your project, you won't need a button to parse. It'll do it automatically.

  • Well, keep in mind I didn't spend a LOT of time on this and I know for a fact the logic has flaws. For example, I'm not iterating through every ant to see what it's status is or to give it instructions. Consider this to just be a very, very crude idea and a rough example of how to implement pheromones.

  • I'm not quite sure what's going on. When I first uploaded it, it crashed to a white screen. Ashely correctly diagnosed this and clearing the browser cache fixed it. On another run, the ants were all blinking.

    Since I don't own any apple products, I can't help you there.

  • Found this to be a fascinating subject. Apparently there's been a lot written on group behaviour and lots of code written to simulate ants, flocks of birds and schools of fish.

    So, I decided yesterday to play around with this a bit. Here's my half-assed attempt at ant AI

    twistedvoid.com/antz

    I'm only using a maximum of 300 ants so that it runs on my old laptop well. Since each ant is animated I didn't want to lag things out with gobs of ants.

    Ants exit the ant hill periodically and begin searching for food in a mostly random pattern. If food is located, it then uses the pathing behaviour to find it's way back home. As it travels back home it looks for a trail of 'pheromones' to see if another ant has found the food and went home. If so, it refreshes the trail. If not, it lays a new trail. The trail lasts 10 seconds if not refreshed.

    Rather than pathing, the trail is used to help ants find the food source (somewhat like real ants).

    Ants that step on the trail examine it to see which way the trail points and then, attempt to follow it's direction to the food source. Since they don't yet know if the food exists, they don't refresh the trail.

    Each food item has 100 points and each time an ant takes some it reduces those points by 100. If the food reaches 0, it despawns.

    When ants carrying food return to the ant hill, they despawn.

    If an ant has been wandering around for a while and steps on the ant hill, it despawns.

    You can download this very crude experiment here:

    twistedvoid.com/antz/Antz.c3p

  • When I ran it, UID2 was the obstacle.

  • Oh I see.

    UID2 is the obstacle. If it exists ANYWHERE you're telling the ant to not find a new path so it stops. You have the original one off to the side of your layout so ID2 does exist.

  • JSON: Has key "dayOfTheWeek"

  • I'm not sure what your object with UID2 is, but apparently it does exist so the ant stops because it has nothing to do.

    It found the last path, so failed to find a path is false so it doesn't execute that.

    It arrived at the destination but object ID 2 exists so that's false and it doesn't execute that.

    It has nothing left to do so, it stops.

    + Zombie1: On Pathfinding arrived

    + [DISABLED] System: [X] Object with UID 2 exists

    -> Zombie1: Set Pathfinding acceleration to random(60,150)

    -> Zombie1: Set Pathfinding speed to random(60,150)

    -> Zombie1: Set AntPosX to random(0, LayoutWidth)

    -> Zombie1: Set AntPosY to random(0, LayoutHeight)

    -> Zombie1: Find path to (random(0,LayoutHeight), random(0,LayoutWidth))

    -> System: Wait for previous actions to complete

    -> Zombie1: Move along path

Fengist's avatar

Fengist

Member since 6 Nov, 2015

Twitter
Fengist has 5 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies