Artificial Intelligence in Hyperpad
-
Perhaps you want to know why I still poke around with Hyperpad (or with any game engine for that matter). A while ago I had a great idea for a game engine. There were a few principles that guided it's ideological design. During the course of my blueprinting of that ideal game engine I came up with an artificial intelligence system.
https://www.gamedev.net/blog/1796/entry-2259145-programming-the-5-senses-entry/
This, along with fuzzy logic would allow one to create a realistic AI system using physics. I've been testing these principles along with others in various game engines and am wondering if I could implement it in Hyperpad. I just saw the
Get Music Settings
behavior which would really be useful.I've been finding several bugs lately that really scare me away from making anything too serious with Hyperpad though. But tell me what you think. Is it possible? I will be testing more soon.
-
@TutorialDoctor Now that I think about it, it has mostly been the particle systems in game engines that prevent most of this.
-
Creating AI in hyperPad is definitely possible. Aidan Oxley created a pacman game with decent enemy AI, and there are a few users working on pathfinding systems for tower defence type games. With the latest additions of arrays and attributes this is actually even easier then it used be.
AI is generally just a series of states, and navigating the tree based on whether certain conditions are met. Of course it gets a lot more complicated based on what you want to do.
When creating an AI system (fora game) you need to look at the engine and it's limitations, and also build it around your goals.
In hyperPad, your sense of sight, smell, and even hearing can be done with collisions. Various collisions can check whether or not something has happened. Touch would use a small collision shape, the size of your object, sight would use a larger one, and hearing would be even larger.
It's just a matter of triggering the collisions based on events.Since we don't exactly have a "3D" audio system (yet) where volume of sounds are based on distance, you need to fake this with collisions (this is an example of working around limitations).
But in general, I feel this isn't the right way to design AI for a game. Since you're not really taking into account any gameplay, and it would be very difficult to design this to be generic enough to work in most situations. Typically, an AI system (for games) is designed with strict rules, and possibilities. So knowing the rules of the game, you can design the various states you need for the AI to check and decide upon.
Any way, AI is definitely possible to do in hyperPad, The hyperPad behavior system is essentially a programming languages (It's a visual event based programming language) so the behaviours shouldn't really be holding you back. The game engine on the other hand is where you need to work around (by using collisions for audio for example)
Also, you mention there are serious bugs holding you back from a serious project. Please post them!!! Without users telling us about the bugs, we can't fix them. You guys are using hyperPad more than we are, and are doing things we didn't know were possible. So when you come across a bug, it's unlikely we already know about it.
As of 1.18, there are no serious bugs we're aware of that will hold back development. If that's not the case. Please tell us. -
This sounds like a great idea, and can fit in perfectly with this huge mega-collaboration I just tagged you in. Let me know if you're interested!
-
I plan on researching more about "Decision Trees" and "Finite State Machines". Coroutines. Wondering if this can be set up in Hyperpad also (seems like it should be easy enough seeing as hyperpad behaviors for a sort of tree structure already. Neural Networks too perhaps.
-
Played around a bit with arrays and they work nicely. Saving arrays to files and retrieving them is pretty simple. That is a huge plus! I don't know how to create an inventory system because we can't store images? Perhaps we have to use some type of binary stuff? I don't know.
-
@Murtaza what kind of pathfinding would you do in Hyperpad? Would it work or would it lag?
-
@iTap-Development A-Star pathfinding is probably doable. I tried implementing it a while ago in a project but the game was already laggy before I started and that just made it unplayable. You might be able to get it working alright on a project that isn't laggy already though. For efficiency, you can use binary heaps as described at http://www.policyalmanac.org/games/binaryHeaps.htm and yo could probably use a better heuristic (I used sqrt(x^2+y^2)). I can't guarantee it'll run well in hyperPad though...
-
@Jack8680 thanks, I'll look into that!
-
Why am I just learning there are more than 5 senses?
https://en.wikipedia.org/wiki/Sense
I should also understand Perception:
https://en.wikipedia.org/wiki/Perception -
@TutorialDoctor I would say that perception isn't a sense, more just how our brain interprets the info from our senses.
-
@Jack8680 Exactly. If I am to make senses, I have to for a perception of that data somehow, if I want to make it really realistic.