Been using Genome2D_1_0_247hx.swc...

73 views
Skip to first unread message

2DGuy

unread,
Sep 24, 2015, 7:48:51 PM9/24/15
to Genome2D
I've been using version: Genome2D_1_0_247hx.swc for all of my web based projects and now I'm about to release some mobile apps using this version. Seems to be working fine, is there a reason to upgrade to a newer version I should be aware of? And more importantly...if I do upgrade will my existing code be broken?  Thx for any comments.

sHTiF

unread,
Sep 25, 2015, 7:44:41 AM9/25/15
to Genome2D
If everything in your project is going as expected and runnin fine I would suggest you to stay with existing version you are using.

The 1.1 introduces mainly new features especially UI and prototyping with some API changes as well, where most of the API changes could be achieved with simple replace on your side there are few that may involve quite some work, especially in prototyping for example. Some very small use cases may even miss functionality in the latest versions of Genome2D, like prototype transition for setter properties that were before normal properties etc.

As for the 1.1 version as it is, its quite stable and definitely usable, there are multiple quite large projects being developed using the latest version so I do get a lot of feedback and it seems we are past the dreaded beta state. We even develop two large projects on it here in my company which I would reveal more info hopefully as well. One of the projects is heavily using the 3D (FBX renderer) part of the latest version.

Back on topic though I would suggest you stay with your version for the soon to be released apps and try to tinker with the latest version within small experiments, you know get the feeling about the new stuff and features.

And as always any feedback or questions are welcome, either here or skype/email which most of the guys prefer for some reason :)

Cheers.

2DGuy

unread,
Sep 25, 2015, 8:46:37 PM9/25/15
to Genome2D
Awesome, thanks for the reply. We just tested everything on old and new devices and everything is working great. :) So for now, we'll stick with the older version. I do have one follow up question when using this version.

I use this call to add my render function: core.onPostRender.add(RenderFunction);

Is there anyway to NOT clear the device before the rendering loop starts? Was able to easily do this on DirectX and OpenGL but we had direct access to the rendering pipeline as well. lol.. If it's not doable somehow with this version, is there a way you could add this, to this older version? Just some kind of flag set to clear or not clear the device, dynamically at any time, etc. Thanks!

sHTiF

unread,
Sep 26, 2015, 7:52:18 AM9/26/15
to Genome2D
I am not sure I understand what do you mean by clearing the device. You want to avoid clearing the backbuffer from the last frame? Its not something that is directly supported as each frame starts with clear call, what is your exact usecase for this?

2DGuy

unread,
Sep 26, 2015, 1:08:10 PM9/26/15
to Genome2D
Graphic fx mainly. Over writing the same area with low alpha values results in an auto trail effect since it takes a few frames for the alpha to fill the area.

2DGuy

unread,
Sep 30, 2015, 11:52:20 PM9/30/15
to Genome2D
Wanted to try not using the "core.autoUpdateAndRender=false" call and take control of the logic and render calls myself. It sounded easy enough, thought I could just call: "core.update(delta)" and then "core.render()" from my enter frame listener, but nothing gets rendered. I'm not getting any errors, just nothing is being rendered on screen. What do I need to do? Hoping it's an easy one. lol... Thx!

sHTiF

unread,
Oct 1, 2015, 4:25:10 AM10/1/15
to Genome2D
Hi sorry for the late reply but getting ready for some presentations and swamped with work. Anyway you sent an email and I decided to address it here so others can get info out of it as well.
 

1) Is there anyway to not use the autoupdateandrender feature? Right now I'm latching into the pipeline as such:

core.onUpdate.add(LogicFunction);
core.onPostRender.add(RenderFunction);

What I want to do is have my own on enter frame handler and call the logic and render core functions under my control. Is this possible, if so please let me know how.

Do I even need to call core.update if I'm all I'm using is the DrawSource() command for all of my rendering?

If you  are not using anything except the DrawSource you don't need to call the core.update but be aware that core.update is the method that dispatches the onUpdate callback as well so your core.onUpdate hook will not work. Also I am assuming that you set autoUpdateAndRender to false therefore core.onPostRender will not work either if you don't call core.render method.

You can avoid calling core.render and doing your rendering yourself since you use just the DrawSource it would look like this:
core.getContext().begin(); // You can check for the return value as it will return false if its not possible to start rendering for example due to Stage3D losing context
core.getContext().DrawSource(...);
core.getContext().DrawSource(...);
...
core.getContext().end();


 
2) I see the drawsource command is in the latest version. Is there any rendering speed improvements in the latest version? Other than initial setup, resizing the device, the only rendering calls I make are DrawSource and then I use Gtexture for my own Atlas class. So moving over to the latest version if needed should be fairly easy. :) lol..

I am not aware of any speed improvements in the latest version although there may be some due to minor refactorings, I didn't do any benchmarks for quite some time as at some point it became pointless with all that speed I was getting I decided to focus on features and API. There may be more benchmarks at some point in the future.
 
3) Performance. On my Galaxy S3 I'm getting 60fps with the following rendering per loop:

My canvas size is typically 700x410.

At app start, I resize the context to the full size screen and also set the canvas.g2d_defaultCamera.scale properties accordingly.

Per loop:

Drawsource a 700x410 background.
Drawsource a total of 800, 32x32 sprites moving around the screen.

What do you think about that performance, do you think that is about right?

Is there something I should be differently to scale the game screen to the device?

We're going full speed into the mobile market for the next few months or so, so any performance tips when it comes to drawing 100's or even 1000's of 2d sprites is appreciated. :)

DrawSource is generally quite slow draw call compared to some of the others so I would use it only where necessary and if there are use cases when I am rendering many objects that adhere to some rules I would definitely use different call if possible. I can't comment on the numbers since I use DrawSource very sporadicly (9 slicing for example). But it seems quite low compared to pure draw call which has more room for optimization due to less inputs. With latest phones I even went past 100 000 sprites in very specific cases.

To utilize screen independence there is a viewport on GCameraController to scale your stuff for different resolutions but since you are going your own render route without nodes/components you will need to handle it yourself, still you can use custom GCamera zoom etc.
 
4) Is there an app on the Play store that uses Genome2D with alot...of 2d rendering that I can test on my device? I'd like to see their performance on my phone. Thx!

Unfortunately most games that utilize Genome2D are on iPhones and I can't even talk about most of them due to NDA since for some reason quite big companies use Genome2D and they have very specific rules, I am not going into detail here, where NDA is always in the place. Anyway the company I am working for is building 2 big games on Genome2D that will eventually come to Android so we'll see, focusing on iOS atm since payment Android vs iOS is like 1 : 100

Still here is atleast one from the latest that come to mind:

If by any chance you are interested in iOS (although I hope these guys build and Android as well)
Reply all
Reply to author
Forward
0 new messages