Search Unity

Assets Alensia - An open source, programmer friendly RPG framework in a very very early stage

Discussion in 'Works In Progress - Archive' started by mysticfall, Apr 11, 2017.

  1. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    NOTE: Development is on hold indefinitely, becasue I decided to start over with a new platform.

    Thanks, and please check out my new project, Alley Cat, if you are still interested.

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------

    Actually, there's not much to see currently and I'm going to write a wall of text to justify my opening a thread at this stage. So, TL;DR; first: :p

    What is it?

    Alensia is (or rather, 'will be') an open source project which intends to a programmer friendly framework to build RPG style games.

    Current Status?

    I just made my first commit some 10 days ago. So, at this time it's nothing more than a simple character/camera control demo (it doesn't even work, as I could not commit animation files which I cannot distribute under Apache License).

    For now, only camera related APIs are more or less complete and all other parts are just placeholders.

    In a word, it could be the most over engineered and unnecessarily complex character & camera control script that ever published, which hardly provides better functionalities than the sample script which Unity provides.

    So, here's a link to the project home page:

    So... What the heck?

    Ok, I'll explain my intentions now, so please put down your pitchfork or any weapon of troll destruction and read ahead. :cool:

    I think my project, even at this stage, could be interesting to some developers since it features two not so commonly used aspects in developing games with Unity, namely use of a dependency injection(DI) and unit testing framework.

    I'm very new to Unity but have been writing softwares in Java/Scala for quite a long time, so while I'm familiar with the dependency injection principle and writing unit tests, I'm not entirely convinced about 'The Unity Way(TM)' of doing things.

    To be specific, I'm trying to write as much part of my project as possible, as a coherent hierarchy of POCOs, rather than as a bunch of individual MonoBehavior scripts, as often assumed to be 'the right way' by many people.

    I decided to keep the way I'm accustomed to for now, and see how far I can go with my approach. So, if I can go very far, than my code might be an useful example for other developers who want to try a different approach in designing their games. And if not, I hope to get feedbacks early, at least, so I can switch to more tried and true approach before it's too late.

    And there's another reason why I wanted to create a thread at this early stage of my project. I'm pretty much determined to create my own MMORPG game someday (please, don't laugh! ;)) and I'm expecting to reach the goal (or die trying) in next 10 years or so.

    So, I just want to have a single thread in which I can record my progress from the very beginning of the project. Of course, I'll try to be discrete so I won't be bumping this thread per every commit I make. But I want to use this thread to report any major progress I make, and as a tool to collect feedbacks from more experienced people to improve my codebase.

    Initially, I opened a thread in the scripting section and requested a code review, but it turned out it wasn't the right place for an ongoing discussion.

    And finally, even it will most likely take many years until I can build any real game with this 'framework', I expect it to evolve into at least somewhat useful template to use in much shorter time period. Since my project is under an open source license, it will probably be as useful as some of the free items in the Asset Store in next few months or so.

    So... What is the plan?

    My immediate plan is to concentrate on designing locomotion and input/control part of the project. The current implementation is just a placeholder, so even though it works, the API doesn't really make much sense for now.

    When I'm done with the locomotion and input part, I'll probably make the first release on the Asset Store as a free entry, as well.

    Last words...

    As I mentioned earlier, I intend this thread as a method to get advices and feedbacks from the earliest stage of development. So, if you have anything to say (that is, other than "Go to hell, and come back when you actually have something to show") please feel free to share.

    Thanks! :)
     
    Last edited: Jan 14, 2018
    GarBenjamin likes this.
  2. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    Sounds great and I definitely can understand wanting to rely on POCOs instead of monobehaviors. It is the same thing I was doing until very recently except I also ditched all modern stuff along with the Unity Way. lol

    Good luck!! Awesome to see another open source project and an RPG at that! :)
     
    mysticfall likes this.
  3. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    Now it also has input (UniRx based), locomotion, ground detection and basic control API as well. It's still at a proof of concept stage though, so not really usable for anything yet.

    It'll probably need another couple of months before really shaping up. Wish I could only work on this project full time...

    Most of the APIs I've written so far are in WIP status, but maybe I'll start working on character customization feature first, as I feel bored looking at the same grey man (Ethan) for long :cool:
     
    Last edited: May 7, 2017
  4. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    Not really a demo video (there's not much to see yet actually :p), but it shows current status of the project which include camera control, locomotion, and basic UMA integration features.



    By the way, as the whole point of the project is to create a programmer friendly framework, you might get a better picture by looking at its source code, if you are interested.
     
    Last edited: May 21, 2017
    Teila likes this.
  5. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    A quick status update. I made a prototype GUI layer which wraps around the IMGUI API. My intention was to provide a higher level stateful API for building UI, like Java Swing(I know it sucks in implementation level :cool:), for example.

    With the new API, you can build a UI with a code like this:
    Code (CSharp):
    1. public class MainMenu : Box
    2. {
    3.     protected readonly CompositeDisposable Observers;
    4.  
    5.     public MainMenu(IUIManager manager) : base(
    6.         new BoxLayout(BoxLayout.BoxOrientation.Vertical), manager)
    7.     {
    8.         Observers = new CompositeDisposable();
    9.     }
    10.  
    11.     protected override void Initialize()
    12.     {
    13.         base.Initialize();
    14.  
    15.         Text = "Main Menu";
    16.  
    17.         var btnQuit = new Button(Manager)
    18.         {
    19.             Text = "Quit to Desktop",
    20.             Padding = new RectOffset(30, 30, 10, 10),
    21.             Color = UnityEngine.Color.red
    22.         };
    23.  
    24.         var btnDismiss = new Button(Manager)
    25.         {
    26.             Text = "Return to Game",
    27.             Padding = new RectOffset(30, 30, 10, 10)
    28.         };
    29.  
    30.         Add(btnQuit);
    31.         Add(btnDismiss);
    32.  
    33.         this.Pack();
    34.         this.CenterOnScreen();
    35.  
    36.         btnQuit.Clicked
    37.             .Subscribe(_ => OnQuit())
    38.             .AddTo(Observers);
    39.  
    40.         btnDismiss.Clicked
    41.             .Subscribe(_ => OnDismiss())
    42.             .AddTo(Observers);
    43.     }
    44.  
    45.     protected virtual void OnQuit()
    46.     {
    47.         Dispose();
    48.  
    49.         Application.Quit();
    50.     }
    51.  
    52.     protected virtual void OnDismiss() => Dispose();
    53.  
    54.     private void Dispose()
    55.     {
    56.         Manager.Remove(this);
    57.  
    58.         Observers.Dispose();
    59.     }
    60. }
    But I'm not too sure at this moment whether or not I should pursue this course further, because I have a suspicion that IMGUI is sort of a technological deadend.

    I posted my question here to see how other people think about the subject, and another one about an issue with the current implementation which I haven't been able to sort out.

    So I'd appreciate if you could share your opinion about the issue, even though I'm aware that there aren't too many of people who might be interested in taking such kind of a code centric approach when it comes to building UIs.

    Anyway, now I have all I need to begin writing API for creating and customizing characters using UMA. And as I expect it to be quite a big task, it will probably take some time before I'll be able to write another status update.

    But I'll try to split my commits in smaller unit of tasks and push to the repository frequently, so if (in an unlikely chance that) there's anyone who might be interested in the progress, you can visit the project page at Github.

    It's moving quite slow now, as I can only work a day or two per week. But it already has grown to a 100+ classes system with a few interesting features, so I'm pretty confident that it will become something more useful in next few years or so :)
     
  6. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    I don't have much to show visually at this moment, but as it's been over a month since the last update, I'll mention a few things that have been added or changed so far.

    First of all, I abandoned the idea of extending the IMGUI and replaced it with a new prototype based on uGUI. The reason is that it is not recommended to build in-game UIs with IMGUI anymore, and it's not likely that it will support all the new features like integration with TextMesh Pro, for instance.

    The new prototype is quite minimal in features, but it already supports cursor theme and localization. I'll be adding new components and extending new features as needed, while I'm creating the character creation UI based on it.

    To talk about localization, I also added a simple I18N API, and a default implementation which is based on JSON resources.

    And there have been many other changes to make the control API somewhat more sensible, or to make UniRx a 'first class citizen' of the framework, and so on.

    I know that talking about APIs instead of showing a video or screenshots won't make it look very interesting to other people, especially when considering the demo is still a half broken clone of what Unity provides as a tutorial for beginners.

    But I'm pretty confident that, at this stage, it's moving in the right direction. So, please stay tuned for future updates ;)
     
  7. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    The new UI system is slowly taking shape, so now I can get back to work on the UMA (and potentially other character systems too) integration feature.

    Again, it's still a prototype and not really usable yet. But I'm going to add more components and necessary features as I try to implement character creation UI with it.

    Here's a short video demonstrating the new UI system in its current status (please turn on the subtitles):

     
    LNMRae likes this.
  8. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    Last time, I showed how localization works in runtime. Now, you can even switch locales in editor and see how messages are translated without entering play mode.

    But more importantly, major changes have been made on UI API since last month and now I'm almost ready to start implementing demo scene for the character customization API.

    Now, you can create a UI style to determine the overall look and feel of the components. And just like localization, you can switch between styles or even edit style items and see the changes immediately in editor, which you can see from the following demonstration:

    Unlike 'transition' in uGUI, it does not currently support animations, but it allows you to define different font, font style, text color, etc for each control states which is not currently possible with uGUI.

    It still has many rough edges, and it only supports minimum set of components. But I think it's good enough to get me started on character API demo, which was the original short term milestone for the project, before I decided to roll out my own UI system.

    Anyway, that's all for now. Thanks for reading this, and until next time! :)
     
    landon912 likes this.
  9. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    UMA integration demo shows progress, as the new UI system approaches semi-usable status.

    Here's a video showing the latest features of the character customization demo scene, where you can see how new UI components like header, toggle, slider, image button, and etc adapting to locale and style changes at runtime:

    As to the demo itself, now I need to find out how to support changing of hairstyles, or skin tones in a generalized manner, so that will be the short term goal for the project.
     
    GarBenjamin likes this.
  10. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    Initially, I was about to finish the character customization demo but I realize I can't add controls for changing the character's skin or hair color because there was no color chooser component yet.

    And as I set out to create one, it soon came to my notice that the framework also lacks input field and window components. So, these things are what I've been working on for the past two weekends:


    It went quite well as you can see from the video, but I have also found a small problem in the process though. We only have translation resources for demo contents but now the color chooser belongs to the framework itself and it also has some labels that needs to be translated.

    So, I better find out some method to support multiple translation resources and merge them in a hierarchical manner.

    If that goes well, then probably I'll be able to add color changing controls to the character customization demo next weekend, as I originally planned.
     
    Last edited: Sep 24, 2017
  11. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    Now the color chooser is fully integrated into the character customization demo as shown in the below video:



    I realize that I better finish item & inventory API before continuing with hairs, because I'm thinking about building a Second Life like game with it.

    So, I decided to leave the character customization demo as it is and start working on other areas, like interacting with objects and etc. I've spent too much time with UI stuffs already, so I feel like I need to see my character walking around again to keep my motivation high.

    By the way, it's been exactly 6 months since I began this project on April, so I ran statistics of the project:
    • 264 C# source files
    • 18,222 lines of code
    • 378 commits
    I guess it's a solid start for a hobby project, but I know that it means nothing since it's still a quite long way until I can start building actual content with it.

    Oh, nevermind, I just needed patting myself in the back kind of a post to keep me motivated.

    So, until next time... :)
     
  12. UnityFan18

    UnityFan18

    Joined:
    Jul 4, 2016
    Posts:
    62
    I had meant to ask you what had inspired you to make this open source as opposed to selling it on the asset store?
     
  13. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    I've been working on various open source projects as a hobby for some time, even though this is the only one that I'm actively developing at this moment.

    Aside from being a hobby of mine, there are several reasons why I chose to make this an open source project.

    First of all, it allows me a much long term planning and room for experiments. If it was a commercial project, I'd probably be pressured by investors, or managers to rely on readily available assets to build what other people might want to play.

    I'm not saying that making popular games with existing assets is something meaningless or essentially boring. But it's just not something I want to spend my free time for, because I just want to create something that exactly reflects my preferences, in a way that exactly matches the preferred approach I'm familiar with.

    And I cannot really afford to quit my daily job and start my own game company to hire other programmers or artists, to create a game that might not appeal to a wider audience.

    But if I make it an open source project, I suppose there's at least some hope that I might get help from other people for free, if I ever become successful in making it look promising to them.

    And lastly, I can't make it a commercial project since I don't think anyone would even pay a dollar for it in its current state :p

    Anyway, thanks for your comment! It helps me keep motivated to know that there are at least some people who find this project interesting, even at this early stage.
     
    GarBenjamin and UnityFan18 like this.
  14. UnityFan18

    UnityFan18

    Joined:
    Jul 4, 2016
    Posts:
    62
    Hello,

    I am a hobbyist myself, and I am very inspired by open source Unity assets/projects. I think that commercial assets are absolutely are a essential part of the Unity ecosystem. However, I really enjoy finding and using open source projects/assets for Unity. I love the idea behind open source and think that it is invaluable for the Unity community and especially for other developers. Thank you for doing this, and I will definitely be keeping my eyes on this! Whenever I play a rpg, I am obsessed with stealth classes and stealth games. Do you think that this framework could be used for stealth classes in a rpg or even a stealth game?

    I too have a day job that I financially depend on. Thus, I am working on a small non-commercial project that I have been using free assets from the store from as a hobby since March 2017. Thank you for working on this open source project :) I love to see open source become more prevalent in Unity :)
     
    mysticfall likes this.
  15. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    For now, I'm thinking about creating a game that is not really combat oriented. So, probably combat or stealth elements won't be on my priority list, though I'll at least try to design it in a way that it can be extended to cover such cases.

    But please understand that it's really in a very early stage of development, so it'll probably take a few years until someone other than myself can seriously consider about using it to build a game with the framework.

    Status Update

    I don't know if there's anyone who's watching the repository, but in case there is, you might have noticed there has been not much activity lately, compared to the past. But you can be assured that the development hasn't slowed down at all, since I was doing researches and experiments in the meantime, which include making my first attempt at creating an animation using Blender:


    Unfortunately, it ended up as something quite unusable as shown on the video. But at least I learned how to do that technically in the process, so I'll try it again later and create a full strafe set if I can.

    At the end of the video, you can see the prototype labeling feature which I created today. When it's done and when I'll be more proficient at creating animations, probably I'll try to create a demo scene where the character can pick up objects or sit on a chair, and etc. So, that'll be the next goal for the project.

    Thanks, and until next time! :)
     
    Martin_H and manpower13 like this.
  16. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    A short status report since the last update: I almost finished a new version of the walking animation, which I think to be a bit better than the first one, but I haven't had enough time to see it working in Unity yet.

    Other than that, I started a proof-of-concept project to create a Scala/Akka/Gdx based multiplayer server for the framework, in the meantime. I know it's a crazy idea, but I'll never know how much it is so, unless I actually try.

    The source code is in the 'server' branch, although there's not much to see at this stage. I just want people to know the project isn't dead or anything, even if I won't be able to do much work on the master branch for quite a while.
     
  17. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    For the past few weekends, I've been trying to learn how to create animations using Blender and make locomotion sets for both genders.

    So far, I've managed to create an idle, walk forward, walk backward, walk left, walk right, run(jog) forward animations for the female character, as you can see from the following video:


    I'm not entirely satisfied with the result though, especially the running animation and I still don't know how to handle transition between animations properly.

    But as it's an open source project, I'd appreciate if anyone can improve and use them for their own project, as long as they follow the license terms (Apache License) and don't forget to contribute the result back to the project. (You can find the Blender source here.)

    Anyway, I'll try to continue working on the animations myself. But as I'm still an absolute beginner in animations and it's taking too much time to create them, I found that it's affecting my motivation for the project in a bad way.

    So I'll probably go back to writing codes next weekend, possibly doing some preliminary works on items or attributes handling parts.

    Until next time then! :)
     
    Last edited: Nov 19, 2017
  18. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    Sorry, I decided to put the development for this project on hold indefinitely, since I recently made a decision to move to Godot engine and start over.

    You can read my motivation behind the decision from here, or visit my new project Alley Cat, which is based on the new platform, if you are interested.

    There won't be any more status update here after this post, so I'll leave this thread with saying thanks for everyone who has shown interest in this project.

    Thanks, and hopefully, see you around! :)