Interested in contributing

Discuss anything in general about the IceBlink Engine + Toolset project (or anything else) here.
hotmustard
Posts: 15
Joined: Tue Feb 02, 2021 5:32 pm

Interested in contributing

Post by hotmustard »

Hello, I'm interested in contributing to a thriving game engine community where I can add value. 10+ years of basic c# experience. Looking for opportunities to pitch in and help - do you have a bug/requested feature list somewhere?

I'm having a little trouble with the IB2Engine GH build around SharpDX - please let me know if it is broken. Cannot convert SharpDX.Matrix to SharpDX.Mathematics.Interop.RawMatrix3x2 and SharpDX.Rectangle to SharpDX.RectangleF. Maybe I am using the wrong SharpDX version - are you using the latest?

Thanks much!
User avatar
slowdive
Site Admin
Posts: 485
Joined: Wed Jan 15, 2020 4:37 am

Re: Interested in contributing

Post by slowdive »

Welcome to the IB forums! Karl mostly has been working on IB and I have been working on IBbasic. IB is just for PC (although I have tried to bring it to iOS and Android with xamarin, but it has some issues) and IBbasic is for PC, iOS, and Android. IB has a separate Toolset app and IBbasic has a built-in Toolset.

The newer versions of SharpDX have changed a number of classes so we have been using an older version (SharpDX 2.6.3.0). Use the DLLs that are included in the IB v197 folder and reference/point to them from inside VS.

viewtopic.php?f=1&t=6&start=110#p286

We don't really have a requested features list so anything is fine that you think is needed. We usually add features and then set some type of flag if possible to use them or not so that builders can choose to allow them or not in their module. I think something we have needed is better and more varied AI for creatures in combat if that is something that interests you. Right now we just have BasicAttacker and GeneralCaster. Also, I started adding things like two-weapon fighting, threat range, and critical multiplier to IBbasic, but they haven't been added to IB. Any additional combat mechanics are much needed to keep them interesting.

IBbasic, the new version, is found here (IBbasicJr for iOS/Android and SolentarrEngine for PC):
https://github.com/slowdive-fan?tab=repositories
hotmustard
Posts: 15
Joined: Tue Feb 02, 2021 5:32 pm

Re: Interested in contributing

Post by hotmustard »

Fantastic. AI sounds great. I'm no expert on it, though. I have worked with / am working with the DungeonCraft AI system (http://ua.reonis.com/) and from that work, I strongly recommend that you incorporate a scripting language to control AI. Since you are already into JSON, I will float Jint (https://github.com/sebastienros/jint) - it has a lighter footprint than V8 and is currently active and I have had success embedding it into Unity. Unless you object, I will make use of that for a first cut.

I will also suggest i18n work if you haven't done it yet. We are doing it right now in DungeonCraft and that community is finding that there is a lot of interest from other parts of the globe. As a westerner in my western bubble, I was surprised.

Generally speaking, I prefer to work on things that are high-impact and have a large return, whether they be easy or hard. So if you have something that would benefit a large number of designers and/or players, feel free to toss it my way because that is what motivates me.

For any development, shall I do a pull request and then you review and do a merge?

Thanks for getting back to me!
User avatar
slowdive
Site Admin
Posts: 485
Joined: Wed Jan 15, 2020 4:37 am

Re: Interested in contributing

Post by slowdive »

We are very much self taught coders so you will quickly find that our code is messy and may not have the best structure. We used to use C# as the scripting language back in the early days, but out of concern that anyone could create malicious code that could be executed within IB (not fully sandboxed), we abandoned that (you can look at early versions of IB on GitHub to see how we used C# and all the hooks to call for scripts in combat and elsewhere... see IceBlinkEngine/scripts on the GitHub page). We now use a built-in scripting language for IB (see IBScriptEngine.cs and some script examples in the "default/NewModule/ibscript" folder), but it is clumsy at best. It is really an interpretive language (doesn't compile), I think that is what it is called. Replacing our IB scripts with a true scripting language that is fully sandboxed and with appropriate hooks would be a great benefit to builders. As a transition, we can add the hooks for the new scripting and leave the old ibscripts hooks (so have both in parallel) so builders can slowly transition their modules over to the new system as they go (unless there is a better way of course).

As far as GitHub goes, we really haven't fully understood how it works and we have been a little scared to use the pull and merge functions. Karl has mostly just been working on IB and making pushes as he goes. If you are familiar with how it works (pulls and merges) and can do it safely, maybe you could teach us that. Karl and I did this years ago, but it seemed to be buggy for us so we tried to avoid stepping on each others feet. We haven't really tried to learn how to use the full push/pull/merge features because we have been working on seperate versions of IB and IBbasic so it hasn't been needed.
hotmustard
Posts: 15
Joined: Tue Feb 02, 2021 5:32 pm

Re: Interested in contributing

Post by hotmustard »

Alright, let me take a crack at some AI and integrating Jint and we shall see how it goes. I am looking into utility-based AIs but not finding any great frameworks to steal. I'll keep trying - I hate rolling my own.

For GitHub, the last SO answer here is a very nice tldr along with a link for more details:
https://stackoverflow.com/questions/174 ... -on-github

When you get my pull request, if there are conflicts, we straighten them out at that time. I'll help you out with it if/when you decide that you want to merge my stuff in.
User avatar
slowdive
Site Admin
Posts: 485
Joined: Wed Jan 15, 2020 4:37 am

Re: Interested in contributing

Post by slowdive »

Sounds like a plan, keep us posted on any progress and questions along the way.
hotmustard
Posts: 15
Joined: Tue Feb 02, 2021 5:32 pm

Re: Interested in contributing

Post by hotmustard »

So here are two things off the top of my head that I think I notice/see from the code that you maybe want to change a little (always leaving the option to use the default behavior alone, of course):

- Creatures are either ranged or melee and can't switch between them, even when they suffer an attack penalty - allow them to switch when it is "smart"
- Creatures will target the closest pc in the party regardless of their health and in order of the party order (always attacking the 1st person within range in the party) - they should probably choose a character that is the most threatening? Or most vulnerable? Or make that behavior configurable (would anyone really bother using that, though)? Possibly introduce some configurable level of randomness to target selection if people think that would be useful.

How about I start there? If I am wrong about the behaviors above, please let me know. Casters will be a whole other story, and I haven't dived into how those are working yet, but I will try to modularize it so that the same framework can be used for them in time.

I have been working in the IB2Engine project/repo, btw, and all comments are in regards to that.
User avatar
Dorateen
Posts: 262
Joined: Thu Jan 16, 2020 3:03 pm

Re: Interested in contributing

Post by Dorateen »

hotmustard, what you described is true of the default AI behavior. However, Karl added some AI settings to the PC build if IceBlink that allowed the AI for a creature to be modified as a BloodHunter (go after character with lowest hit point) or MindHunter (target character with highest spell points) or Soft TargetHunter (target character with weakest armor class).

These are setting under the cr_Ai tab that brings up a drop down menu on the creature blueprint. But it would definitely be nice to have a more reactive AI in place. So perhaps this is a start.
hotmustard
Posts: 15
Joined: Tue Feb 02, 2021 5:32 pm

Re: Interested in contributing

Post by hotmustard »

Yep I see them in there. Didn't know if people were using them, though. If there's a dropdown, I'm sure people are, though! Thanks! I will be sure not to disturb that logic.
hotmustard
Posts: 15
Joined: Tue Feb 02, 2021 5:32 pm

Re: Interested in contributing

Post by hotmustard »

I started by refactoring a little to suit the different kind of AI models. Preserved all existing code for the BasicAttacker & GeneralCaster, but moved them into a Factory pattern and added a ScriptedAttacker type. Integrated Jint and put some wrapping around it in an new Scripting namespace. Nothing should be disturbed from the existing logic:

https://github.com/grannypron/IB2Engine ... 6f3b52b46a

Next I'll write the actual AI scripts and tweak the UI so that designers can choose the ScriptedAttacker type. I just wanted to share this earlier than later in case there are questions/objections to the refactoring.

I didn't include the Jint binaries, but just add the latest stable NuGet Jint version and you should be fine.
Post Reply