Aphrodite's Forum Posts

  • On your layout proprieties, you have to set Unbounded scrolling to "Yes" (so the game can scroll passed the top-left edges)

    tomsstudio

    Alright so your making a new compiler from the XML event sheets. Kudo's I thought about doing somethign similar in Java, but it was merely a passing thought.

    So while the sheet is easy enough to convert on the logic flow. How are you handling the issue that the Plugin export code is still in JS. Do you have a JS to Monkey converter?

    I also figured you would translate WebGL to OpenGL calls. What is important that the C2 render loop makes use of WebGL calls and that your translating the JS code into the other language. Besides GL, there is also the two major areas of WebAudio or more specifically what ever Audio system the langauge supports and WebRTC which I'm not sure has a direct UDP variation.

    He doesn't use at all the exported JS, but rather the capx/project folder itself, and do equivalents of the official plugins through monkey (since the project folder contains just the names of plugins used, and how they are used, he should be able to make an equivalent of them)

    For the unofficial plugins, not sure it can be handled at all like that, but not that it matters at the moment (pretty sure doing plugins for this could be possible, but we'd have to make them ourselves I think)

  • > And also for organisation, groups are great, and as I always say : a clean code is easy to maintain, to debug, to optimise.

    >

    THAT, right there, is one of my next goals to perfect. With my current project, while it start off "simple" enough, working through the final steps to completion is proving to be a bug tester's near-nightmare. Who knew an infinite runner could be so bothersome?

    The ironic thing is that I am actually using Groups to isolate activities, but am finding it a tad confusing because - as is often the case, I'm sure - so many objects/events are related in different categories/Groups. WHERE do I put them? LOL How does this help me keep things CLEAN and tidy?

    Organization is not my friend. LOL

    Groups aren't the only one thing about organisation, I've written something about organisation in C2 (in french sadly), but the big lines are:

    • Don't be affraid to divide your work into multiple event sheets, for the levels themselves I have myself:
      • Functions, This is the one I prefer, the functions are great for organisation, because:
        • If you have to do complex maths operations, just do a function to isolate it, then use the Function.Call(functionName, Parameters) to have the return value, seeing Function.Call("Strenght_Stat_value_at_level", Self.Level) is something you know what it does more easily than sqrt(Exp(Player.Level))*1.33
        • you can also have repetitive actions that can be wrapper into a simple Action: "Call function "initiate ennemy" with parameter 0 = Ennemy.UID" for exemple is clearer than "Set angle to .. then set speed to.. then set animation to... then if something is true do ..."
      • Ennemi AI
        • Each ennemies have their AI written inside a group, I deactivate it when the last ennemy of this kind is destroyed, and reactivate it when It is deactivated and I create this kind of ennemy
        • If an object can spawn ennemies, I follow the same rule as if it was an ennemy
        • I also sometimes apply that to ennemies' shot
      • Variables, contains global variables and constant with commentaries, don't bother to include this sheet anywhere, it just works, you should not have too many of them, since local and instance variables are enough for the ennemy AI and for a lots of things.
      • Initialisation, to initiate the level, if you have a lot of math to do, remember the functions? yeah, there are useful
      • Inputs, not my favorite, but using groups here to detect the kind of input is good, so you don't check for other sort of inputs
      • Level, it contains the other ones (except variables)

    But the main point is..

    Just make your program easier to read for yourself, nothing cryptic, use constants and functions and variables to have actual understandable english (or whatever language you prefer) words that helps you understanding the concept you are trying to achieve, do not be affraid to isolate something complex, use commentaries wisely (you should not need 1 comment per line I think), use families to keep things easier sometimes, subfolders to know where each thing is.

    Also do not try to become organised in 1 day straight, just keep improving towards that, you'll learn beter ways to do so, and it'll become natural for you at the end.

    EDIT: I'll add that the point is at the end, you will know that the problem can only come from a limited number of things, and you''l only have to edit it once and it'll apply everywhere, since you don't repeat lines of code, but call them

  • As I'm working towards the completion of my first game - a very simple infinite runner that I might polish up REALLY nice later on - I've come to an epiphany: I have under-appreciated the use of Groups.

    This got me to thinking...

    What are some of your BEST tips for the use of Groups? What are some "hidden gems" that you've learned about their function? How do you organize your Groups? Is there an "unconventional" way that you use them?

    Groups can be activated and deactivated on demand, this is a really nice thing performance wise (I think deactivated groups are completely skipped when deactivated, except if you are runing the debugger). Try to see where you really need them to be active.

    And also for organisation, groups are great, and as I always say : a clean code is easy to maintain, to debug, to optimise.

  • bhentz: the bullet behavior does not stop when there is a solid, I think the 8 direction behavior does, so it could be a good start to use it instead

  • I guess I should try and retry (I'm not going through wrapper, just browsers)

    Thank for the help guys ^^

  • >

    > It has perform very well so far in my tests. BLOK DROP U runs solid and is a very physics driven game. I have heard CocoonJS does not do so well in that regard. My new title I'm working on has been running a solid 58-60 FPS.

    >

    >

    That's cool, though I wonder how it performs with more graphically demanding games.

    I could be totally wrong (And I think I'll never know xD ), but since this is for only one platform (the WiiU), I bet they implemented it so that the lack of WebGL isn't a problem at all for performances, cocoonJS has to deal with a lot of devices that they don't know everything about, Nintendo however knows everything about it's WiiU so the engine can be really optimised on their part.

  • In your case you could compare (sprite.animationframe % 4) = 0

    (x % 4 will return the rest of the division x/4)

  • Hi

    This seems like it shouldn't be that hard but I feel like I've hit a wall. Any help would be gratefully received.

    I want to position sprite01 relative to sprite02

    Sprite01 has two local variables: angle, and distance.

    I want to position sprite02 relative to sprite 01 according to the angle and distance stored in the local variables of sprite 01

    Should I be using trigonometry here or am I missing something really obvious?!

    Thanks

    you could use the Angle(x1, y1, x2, y2) and distance(x1, y1, x2, y2) expressions I think for that, like this:

    Sprite01 : Set instance variable distance to: distance(Sprite01.X, Sprite01.Y, Sprite02.X, Sprite02.Y)

    Sprite01 : Set instance variable angles to: angle(Sprite01.X, Sprite01.Y, Sprite02.X, Sprite02.Y)

    EDIT: I think I understood that you wanted to store the angle and distance, but if you'd rather set the position using this, then you'd have to:

    Sprite02 : Set X to Sprite01.distance*cos(Sprite01.angles)

    Sprite02 : Set X to Sprite01.distance*sin(Sprite01.angles)

    (I used the name "Angles" for the variable since I am not sure you can use the word "angle")

  • In some cases It wouldn't have, like this one:

    I just dragged otherValue outside, and everything stayed, because the expression still works

  • I know how to use variables, but thanks.^^

    It was just an example. The huge block of code already was in a (complex) function. I first used local variables to safe ram but then realised, that I needed global variables instead. Because no other event could acces that variables. It was a careless mistake but this can happen if you are not an experienced programmer. And this is constructs target group.

    So it was just a suggestion as it would sometimes make things easier, if you make a mistake.

    You should be able to drag them out of the function I think

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello I would have a feature request.

    I spent about 1-2 hours today by replacing variables in complex blocks of code by new variable types.

    Example:

    x0+x1+x2+x3... (setting up huge blocks of code involving variables)

    ,,Oh wait, this does not work. I have to use a global variable. Or a local one instead. Or maybe better to use an instance variable. Oh noes I have to change hundreds of lines of code which contained the old variables. D:"

    This was the scenario I had about 2 times today. It would be really usefull if construct had a feature which would allow the user to replace a variable and all it's references with a new one. Or a feature to find and replace specific peaces of code in an event sheet.

    I suggest you organize your code to have an easier time editing this.

    Also global variables are really something to use only when needed, I'll always try to have a local static variable or instances variable first.

    Also if you have complex calculation, I'd recommand using functions so the calcul is written once on the entire project, but called multiple times (so you only have to edit once), It'll also be easier to read.

    (For your suggestion to find and replace, there is a research function for the events sheet, but I think it is for non-free versions only)

  • Hey guys, I've been wanting to make more games using construct 2 but am having trouble coming up with original game ideas...If you don't mind, could you post one? Thanks!

    Personnally I like to think about something like:

    -What do you like (not in games)? >IceCream

    -Which genre are you targeting? >Platformer

    -What can make what you like disseapear? >Sister ( ;_; ); heat; dogs; etc..

    -How could that goes into a game? >Icecream cones trying to escape from the frezzer to the north pôle while avoiding people and animals, and staying cool enough on the way

    You can of course think about other questions to be more particular.

    PS: of course you can use the icecream cones idea if you want

    tomsstudio : If I am not mistaking, reading the manual actually gives you rep (and since your are doing this, I expect that the manual will be helpful ^^)

    I am not sure I could help a lot with testing, I have a little mobile game right now, which adapts itself to the aspect ratio, and a weak phone, so I should be able to test that

    (PS:if you are targetting android devices, which version of the OS?)

  • From what I've understand, mobile browsers and audio arent the best friends, but I don't have a lot of details, I think I understood that:

    -Some browsers can only start to play audio after the first touch (maybe only on touch input?)

    -Some do supports the web audio API and others don't, so in some cases, not a lot of sounds can be played together

    Is there something else I should be aware of?