User Tag List

Results 1 to 9 of 9

Thread: New user question about intigrating code (some programming experience).

  1. #1
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Jul 2017
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    New user question about intigrating code (some programming experience).

    I recently downloaded ClickTeam Fusion and finished the first tutorial. I am hoping to EVENTUALLY make a tactical RPG. I made a simple RPG combat system (back end only no user interface) for one of my class finals while working on my CS minor (which I went for because I have a lot of problems with computers). I can picture most of the code in C++ needed for the game I want except for the user interface.

    My question is, with ClickTeam fusion how easy is it to integrate code written in other programs, and what mechanisms would I use to do this?


    As an example, I can see how to have characters represented as objects with an array holding the locations. What I would like to do is have Fusion send inputs to my code, or call functions, and then have the reply from my code move the characters, update the characters stats, display status effects, and so on. Is this possible, or do I have the wrong Idea about how I can use Fusion 2.5?

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,124
    Mentioned
    76 Post(s)
    Tagged
    0 Thread(s)
    I'm not aware of anything like that, which would allow you to make a hybrid Fusion/C++ project (I think it supports LUA though). But pragmatically speaking, I don't believe such a square peg/round hole solution would be very desirable. You'd possibly end up with a workflow that had many of the disadvantages of both Fusion and C++ without many of the advantages of each. If you really want to use code, then maybe Unity is a better option (though I think that uses C# rather than C++...I don't know anything about 'real coding' so I don't know what overlap the two have).

    I can certainly appreciate the desire to go with what you already know (especially if it was initially difficult for you to learn and you're proud of how far you've come). But unless you're in love with C++ now, Try giving Fusion on its own a go. Fusion can certainly do everything you've described (it has arrays, for instance, and its fastloops can be used as pseudo-functions), and many of the programming logic skills you've learned with C++ will likely transfer.

    Fusion is a programming interface at its heart, but one that's free of syntax. Because of this, it can be quite fast to use, and very mentally efficient (your finite neurological resources aren't being 'wasted', eg. by needing to keep syntax and code architecture rules in your working memory).

  3. #3
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Jul 2017
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply. If I can't figure out how to integrate the code, I hope I will be able to do it in fusion.

    Part of the reason I am worried is that I heard that making an RPG or tactics game would be very difficult in clickteam fusion, whereas handling it in a standard programming language (minus the user interface which I have no idea how to do) seems fairly simple.

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,124
    Mentioned
    76 Post(s)
    Tagged
    0 Thread(s)
    I don't have any RPG making experience, but I would be surprised if it couldn't be done in Fusion. Hopefully someone here with RPG experience can give you some tips to help you find the right path.

  5. #5
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Phi's Avatar
    Join Date
    Jan 2010
    Location
    England
    Posts
    1,811
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    What TheNameOf7 is basically describing is extensions. Windows extensions are written in C++, and can do anything current Windows Fusion exts do (obviously).

    However, if you want control passed back and forth between Fusion and your C++, you're going to get things puzzled. An extension can run events every frame via Handle(), and it can generate events easily (think triggered events like "on mouse click"), but they don't really swap. Fusion just passes control to the ext and waits for it to be passed back so it can continue to the next extension.

    You could make an extension that handles all the RPG backend like arrays, weapon details, etc, but you'd then have to expose it to Fusion, which leads to the question: what will Fusion handle, and what will your extension handle?
    If it's just data storage a Ini++ object could do it. If it's simple math calculation, events would suffice. Complex drawing to display can be handled by Surface object.

    Basically, if an extension can handle it at a pace and with an interface you can work with, you should use that. No need to reinvent the wheel, and you don't get caught up copying new versions of your extension around, using debug instead of release, unicode instead of non-unicode...

    Ideally, you want all your code in one place. It makes it easier to determine where a problem lies. If you wanted to avoid making your own extension, there's pre-existing objects; you can run C# or VB code via the .NET Script Object, Lua via xLua object, Python via Python object... and I believe a couple of other scripting languages.

    If you're comfortable with C++ though, particularly if you have code there already, then there's no harm you starting work on your own extension. I have several examples of the various Windows SDKs in my extension repository (see my forum sig). You should use DarkEDIF SDK if you go that route. Support for ext development is quite lesser than Fusion native development, for obvious reasons, so if you want a fast response you'd be better off asking on Clickteam Discord than the forums.

  6. #6
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    Jul 2017
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I think that is just what I was looking for. With my computer science minor, we talked a lot about data structures, good coding practices, logic theory, and so on, but we didn't spend much time at all on API's or extensions, so I'm having to try and figue those out now.

    One example of a mechanic and its implementation (to give you an idea of what I was hoping to do and how I planned on doing it with pseudo code) was to have a spell that could turn a target to stone, (by changing a boolean representing status effects in the character object). The player could then use the stone person for cover (when a ranged attack is preformed against a target the program calculates which squairs are between the attacker and the target and checks if there are any cover providing objects in them, if so the attack fails, otherwise call the damage function). With a scripting language this seems like it would only require a simple equation and a couple of for loops.

    I was also planning on having the cplayer queue up commands for each character that would be completed at simultaneously at the end of the turn.

    How easy would those be to set up using Clickteam Fusion only?

  7. #7
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    New user question about intigrating code (some programming experience).

    It all seems relatively easy. You can do all of that with default extensions.

    Boolean are known as "flags" in active objects. You can find them under the alterable value submenu. Flags are either on or off and you can toggle them. So you can turn a flag on in your player which means that they've been turned to stone. Then you can compare the flag status to on and switch the animation to a stone animation. You can also test against the current animation to make bullets stop when it collides with them to use them as cover.

    As for checking the cover between the player and targets ranged attack, you can use a small 1 pixel object and stretch it using xscale to the distance between both characters. Then you can change its angle to the vector angle between both players. So a small line connects the players. If any obstacle overlaps this line, that means the ranged attack will fail. You can use qualifier groups to group all your obstacles together then test against that group one time. The line would be invisible by default. And you could do all the calculations in a fastloop so it would occur instantly. You can use internal alterable values in the players, such as one for their HP. If the ranged attack does hit, you can just subtract the damage from their HP value, it's pretty simple. You could do it all in 2 or 3 lines of code.

    RPG games are definitely possible in Fusion, but a lot of people become discouraged because they don't realize the amount of work it takes to actually complete it. Usually these are people new to the program. Working on smaller projects to help you understand the ins and outs of the program will help a lot in the long run. However since you already have a good understanding of the programming from another background, maybe it'll be easier for you. You just need to learn how to translate that knowledge into fusions methods with the different extensions.

    For the most part everything can probably be done with default extensions.

    Sent from my iPhone using Tapatalk

  8. #8
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,124
    Mentioned
    76 Post(s)
    Tagged
    0 Thread(s)
    Sumo's right: Regardless of whether Fusion can handle your RPG (it very likely can) you won't finish it anyway Sorry, but you just won't. I purposely chose one of the most straightforward genres for my first Fusion game (a skill-based platformer, so no real requirement for combat, AI, RPG mechanics, maps, NPCs, non-linear narrative etc.), and after 3.5 years working on it virtually fulltime, the end is still nowhere in sight

    An RPG is bound to be at least twice or thrice as complicated and time-consuming. Since you're just out of uni and, I'm assuming (though I could be way off!), in your early 20s, you're probably too young and hungry and curious to be able to see such a giant project through to the end. You're at a stage where you're learning so quickly (and it sounds like you haven't yet started graphics yet, which is another area where you'll learn quickly) that after 6 months you'll probably be bored with what you've done and be tempted to start over (bigger and better), try a new project, or branch out into some previously unforeseen direction. Also, you probably have a social life, which is a big no-no

    Anyway, have a look at some of these impressive examples of what people have done without the use of any extensions at all - just pure Fusion code. It'll give you a good idea of what's possible, and how it was done:

    Isolight - Isometric Lighting Engine (free EXE demo here)
    CleanerAI pathfinding AI
    P3D: a 3D engine made from just Fusion code





    And have a look at some of the games made in Fusion (perhaps they used some custom-made extensions, I don't know - but probably not as extensively as you've described):




  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    jn2002dk's Avatar
    Join Date
    Mar 2014
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't see any reason why you couldn't make a tactical RPG in Fusion using only default extensions

    One advice though, regarding what has already been mentioned about project size for a first game, i don't think a TRPG is impossible with your background. It's more a matter of scope in my opinion

    Aim small at first, get the basic gameplay down including graphics and sounds. Sort of in line with the minimum viable product approach. At that point, get some testers so you can get some feedback on what does and doesn't work and adjust accordingly

    If you get enough positive feedback and you're happy with what you've got, you can now expand your scope and implement things like a detailed world, story, talent trees or what ever else you'd like to have in your game

    If you get stuck and start to lose motivation, some studies actually suggest that jumping between a couple of projects can improve creativity. At any rate, it's useful to leave your project for a day or two so you can look at it with fresh eyes. It's very easy to overlook the simplest problems when you've been buried in a project for a while

Similar Threads

  1. object oriented programming and/or efficient code
    By Doverseer in forum Fusion 2.5
    Replies: 6
    Last Post: 2nd February 2016, 02:12 PM
  2. Some sales numbers and experience to share plus promo code
    By JoKa in forum iOS Export Module Version 2.0
    Replies: 19
    Last Post: 7th November 2012, 11:58 AM
  3. [Req]Custom User Code Object
    By LB in forum Extension Development
    Replies: 27
    Last Post: 19th March 2010, 02:59 AM
  4. User Registration Code Question...
    By Renatos in forum Install Creator and Patch Maker
    Replies: 2
    Last Post: 6th January 2010, 02:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •