Toby R's Forum Posts

  • Well the first rule is that you should think about that long before release, but anyway you might find this useful 25 Creative Ways to Promote Your App for Free

  • If you don't want to use a project file, but still read from a xml file, you could paste in the contents of your xml file into the xml load action.

    Thanks for reply Setting XML directly as a string into loading function would be a horror to edit it later

    "let people hack the game, if it is fun for them", as long as it is single player.

    Well... ye... I had that thoughts as well... hmm...

  • Is there a particular reason why you can set a constant to be also static? Is there any difference?

  • Hi Guyz,

    It's already 3rd day I think how should I do it the right way, so I thought maybe you could give me your opinion.

    The game

    The game is a single-player 2d action shooter, where you have 10 different weapons and each weapon has 10 upgrades so it's like 100 weapons. And each weapon has a primary and a secondary shot. Each weapon upgrade gives different stats for the weapon and those are:

    - fire rate (primary shot)

    • fire rate (secondary shot)
    • min damage (p. shot)
    • min damage (s. shot)
    • max damage (p. shot)
    • max damage (s. shot)
    • radius of impact (p. shot)
    • radius of impact (s. shot)

    So 8 variables (constants actually) per one level of each weapon which gives after all 800 numeric variables.

    BTW: game is dedicated to be released on desktop (Steam) so I have to think locally (no MySQL etc.).

    The problem

    My problem is that I am not really sure how should I implement these data to C2 the right way. I mean here to do not make a mess in the code and to be able to easily change it whenever I need.

    Possible solutions

    Solution 1 - XML

    First thing that came to my mind was XML. I can create some XML file and put data there, then load it on start of the game. But I don't really want to have an external file somewere in the project directory which could be "hacked". I was thinking to encode it with some salt using some two-way encryption algorythm like Base64 or so, but then again there is nothing implemented in C2 and I don't really want to use any third party plugins here, cause I had a lot of performance issues with previous game.

    Solution 2 - Dictionary/Array

    I can also put data to some C2 data holder like Array or Dictionary. But I would have to set all data programmatically at the start, and this involves a lot of index constants etc... Then for any change it would be really not readable searching among 800 "set" functions... for some reason it gives a messy feeling.

    Solution 3 - local constants

    At the beginning that seemed to me the worse idea, but it starts to be the best in my opinion. First of all constants are the fastest to read for engine I believe. Second thing is that I have each weapon behaviour in separate event sheet so I would put only 80 local constants per event sheet. They seems to be readable and easy to change. I have even implemented part of this solution.

    But still I'm not 100% sure it's the best way to keep the readability and architecture clean.

    Any suggestions would be very appreciated.

  • That is pretty interesting topic, I mean the ways to do an AI. What I do is simply think how I want the particular "enemy" to react on particular player's behaviour etc.

    Chase the player

    For instance I use Pathfinding combined with Line of Sight for my 2d action shooter game to make my horde of enemies to chase my player as soon as he gets close to them. So with combination of two behaviours my enemies have an AI to be agressive.

    Attack the player

    For non shooting enemies I use "Is Overlapping another object" in order to trigger attack function.

    etc... it's all depends on your game.

  • You do not have permission to view this post

  • The game looks indeed very nice. Can you tell how did you do those ghostbusters-like thunderish red lasers (the big guy on the first screen shoots them). Is it a graphic or some clever C2 effect use? They look amazing!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't think that a Loader Layout is a good place to put game intro to. Loader Layout is a place where you can (and should) set your customized loading screen with progress bar etc.

    Be aware that this is the first visible screen. So before it gets loaded user sees a blank screen, because it simply replaces the original C2 loading screen. Now when you put the whole intro there (sprites, fonts etc.) C2 engine will have to load it into memory before showing it to the user.

    The loading process of the Loader Layour has no progress bar (because it's Loader Layout where the progress bar should be) so if you make it heavy user might experience a long blank screen which is not nice. So I suggest to do the Loading screen as light as possible just to load the game, and then GoTo "intro" layout where you can actually put the heavy animated intro stuff.

    Now another thing. You cannot set a "layout loading progress bar". It works only for the first layout (Loader Layout). So if your intro layout is heavy with sprites etc. you may want to do a Layout Loading screen.

    This you might find useful if you don't want to use external plugins: How to smoothly switch between layouts

  • Functions are more-so coding realm (yes yes, Construct is "code free" but you can take it to the next level..functions are the next level). Typically (always) functions do not have spaces in them.

    That is true. But in "normal" programming you can hermetize. You can do private/protected/public functions. In C2 once you import event sheet which contains the function it becomes global. So it's nice to do some distinction even by naming convention. And this separator (" -> ") really does the job when it comes to readability so I would really like to stick to it.

    The worry is how C2 is converting it to JS, if it is possible to have any problems cause of that or not. As we know JS is interpreted by the browser and might have slightly different behaviour... but in other hand... I'm thinking now that I'm sure Ashley would not allow spaces in function names if there would be a chance that this will bring any problems. So I think I'm safe.

  • Ok I found some info on GameMaker forum. It looks like it is possible to resubmit the game. So good news <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    http://gmc.yoyogames.com/index.php?showtopic=632388

  • Are there any known disadvantages of using spaces in function names?

    I found this convention very readable to me and comfortable to work with. But as it is not the "normal" way of naming functions I started to think if it won't bring me some problems later? Performance maybe?

  • Refactoring (code/events/groups reorganization) is something everybody does pretty often I believe. As project grows you reorganize your code to fit better all new features etc.

    I was just renaming my groups in entire project to stick with some convention. That wasn't as easy as one might expect . Simply because you have to Right Click, choose "Edit" and then rename. So that was hell lot of clicking in my case.

    F2 key is very intuitive to do the renaming, it works for event sheets, layouts, objects, directories but not for groups.

    I think it would be nice to have a selected group "Edit" function under F2 key. Would be very comfortable during refactoring.

  • I think it's more about to distinct the names of directories so they would be "eye catchy" on the first sight among all those objects, layouts and event sheets names.

    If it's not a big deal to implement, I think it would be even better to have an option to customize directory names like all those options in theme customization. Font bold/normal, maybe color etc.

  • Hi Guys,

    I can't google any usefull information regarding this... What if a game gets rejected on Greenlight? Is there a possibility to submit it one more time after - let's say - some changes? Ot it got permanently banned?

    I'm just trying to figure out how much work should I do before submitting. It would be rather unpleasent feeling when you get rejected permanently on Steam after you spent months on your game... but being rejected after several weeks is kinda "fair enought, let's try something else".

  • Cause you probably run that loop every frame. If you want to run it only once then you have to add some "blocking" condition next to the "System for" loop. For instance add "On start of layout" or "trigger once" etc.