Aphrodite's Recent Forum Activity

  • Hi, I'm just curious how CocoonJS vs CrossWalk compare to each other. I can only get CocoonJS to work for me and it works quite well. When I use Crosswalk I can't upload my .apk file I get a error every time. So I been sticking to CocoonJS, but I keep reading about how much better the Crosswalk for Android is then CocoonJS. Has there been a legitimate Pro vs. Con comparison of the two?

    Not experienced a lot with them, but:

    From what I've understood, CocoonJS seems faster on the logic of the game, but has bad memory management, but crosswalk is based on chrome for android, so the memory management is better on their side (I'll always suggest to try to optimise your logic if possible in both cases!), also the android's versions targets aren't the same (and for iOS, crosswalk is just incompatible)

    The companies behind are also one argument:

    -Ludei seems pretty much to be like talking to a closed door in case of problem, intel does a better job at that.

    -The cocoonJS plugin is only updated by Ludei now (I remember that scirra couldn't handle it well because of the lack of communication on ludei's side).

    -Crosswalks is far younger than cocoonJS, but it improves quickly it seems (and since it is based on chrome for android, you can expect the same improvement over time as chrome for android)

    -CocoonJS forced ugly-blinking splashscreen, seriously.

    On my part, I'll always try to stay away as far as possible from cocoonJS as I can, for preferences reason (I plan that my games can be played on mobile browsers, since crosswalk is based off a browser, It suits me perfectly, and also the blinking-non-editable splashscreen is something that I just cannot accept)

    Only my little experience with them (I don't plain on using wrapper really for now), but hope someone more experienced than I will help you decide on that

    PS: never actually uploaded crosswalks .apk so I cannot help with your problem

    So as I understand it then. C2 tool is just a programming IDE. The plugins themselves at this time are pretty much useless? So if I use say Dictionary, WebStorage, Platformer those are in effect not used at all.

    Well good luck

    jayderyu

    C2 does not have any program language before exporting/previewing, just some xml file to retain the "state of the editor" combined with ressources, plugins are only really used when creating the Javascript (aka previews and export time). They are (by default) loaded only at the opening of a project, However, their non javascript part (list of actions and conditions) are still used.

    So yes, C2 is the combination of:

    -A powerful IDE that just references the plugins used (can save the project with "organising file" if I can say so)

    -A exporter/previewer that can interpret the references used, and will call corresponding behaviors, effects and plugins (this is why you can update plugins so easily when updating C2 for exemple, because they aren't used in the IDE by default, just referenced)

    (I am not being ultra precise here, just explaining)

    here, the IDE part is still handled by C2, but the other one is handled by something else that tomsstudio is creating, and since the official plugins are likely to change not in their list of actions/conditions, but more in the way the javascript is at the end, that is not a problem (because the Monkey's exporter does not use the JS produced, if the JS produced changes, the Monkey's one will still load normally, maybe it'll need maintenance from time to time though).

    EDIT: to be more clear: the exporter is reading the event sheets, the layout views, the ressources, and converts that to monkey language, I'm pretty sure a series of monkey equivalent of official plugins could be done in monkey language, so not a problem

    EDIT2: Also I am wondering about using it in commercial project, I do not know if anything you are using is free to use for commercial projects or if there are conditions that apply/can apply one day

  • I could be wrong but I think that chrome for android works the same way:

    -Sounds aren't played until the user touch the screen

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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")

Aphrodite's avatar

Aphrodite

Member since 20 Dec, 2011

Twitter
Aphrodite has 2 followers

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies