FragmentActivty, FixedStepMaxFPSEngine, PaletteSwapShader

  ... the case you feel the need for a new feature or want to submit one.

Re: FragmentActivty, FixedStepMaxFPSEngine, PaletteSwapShade

Postby Niffy » Tue Aug 28, 2012 5:30 pm

Another updated,
You can pause the FixedStepMaxFPSEngine.
You can now draw the map at a different location in the scene.
Niffy
 
Posts: 284
Joined: Sat Sep 17, 2011 8:39 pm

Re: FragmentActivty, FixedStepMaxFPSEngine, PaletteSwapShade

Postby Niffy » Mon Oct 08, 2012 6:07 pm

Another update!
See the first post.
Niffy
 
Posts: 284
Joined: Sat Sep 17, 2011 8:39 pm

Re: FragmentActivty, FixedStepMaxFPSEngine, PaletteSwapShade

Postby Nilzor » Mon Jan 21, 2013 10:28 pm

I'm not entirely sure I understand what this does. Is it only related to FPS-synchronizing, or does it do layout as well? Could you please summarize in a couple of sentence what this is for and when we would need to use it?

Could it help me with rendering multiple Scenes in non-fullscreen?
See my related question regarding fragments and layout here .

Is this for Gles2 only?
Nilzor
 
Posts: 17
Joined: Wed Feb 29, 2012 9:54 pm

Re: FragmentActivty, FixedStepMaxFPSEngine, PaletteSwapShade

Postby Nilzor » Tue Jan 22, 2013 9:51 am

Ok I can answer my last question myself - it's GLES2.

But ... your branch doesn't compile. Class "BuildConfig" does not exist and variable "ICE_CREAM_SANDWICH" does not exist. There are more.

I downloaded the ZIP file.
Nilzor
 
Posts: 17
Joined: Wed Feb 29, 2012 9:54 pm

Re: FragmentActivty, FixedStepMaxFPSEngine, PaletteSwapShade

Postby Niffy » Wed Jan 23, 2013 1:22 am

I only work on GLES2, although my branch is not based on GLES2-AnchorCentre which has different coordinates.

The AndEngine Niffy branch does compile. You need the latest SDK libraries, this can be done in the SDK manager. Be sure to copy over the latest support library into the libs folder.

Perhaps a "Fix Project Properties" might fix it as well. (Right click the project in the project window Android Tools > Fix Project Properties

My AndEngine Niffy does LayoutGameFragment and FixedStepMaxFPSEngine

The FixedStepMaxFPSEngine can give a constant update at a given time period, not linking it to the FPS. So you can have an update every X seconds while drawing the scene as fast as possible.
For a better understanding read http://www.koonsolo.com/news/dewitters-gameloop/ My code is based on "Constant Game Speed independent of Variable FPS"

LayoutGameFragment allows you to place standard android widgets over the GLSurface. a video example can be seen (see main post)
Niffy
 
Posts: 284
Joined: Sat Sep 17, 2011 8:39 pm

Re: FragmentActivty, FixedStepMaxFPSEngine, PaletteSwapShade

Postby Nilzor » Wed Jan 23, 2013 11:38 am

Thanks for getting back to me Niffy,

Niffy wrote:I only work on GLES2, although my branch is not based on GLES2-AnchorCentre which has different coordinates.

The AndEngine Niffy branch does compile. You need the latest SDK libraries, this can be done in the SDK manager. Be sure to copy over the latest support library into the libs folder.


Ah, here lies the problem of course. But I'm still a bit confused: I am targeting platform version 8, i.e. Android 2.2 for my project. Is this supposed to work with your branch? I know Fragments can be supported with the Android Support Library so I do have a reference to that library in my project (or "Module", since I'm using IntelliJ). But the VERSION_CODE-class in android.os.Build does of course not have any reference to ICE_CREAM_SANDWICH or HONEYCOM.

Niffy wrote:LayoutGameFragment allows you to place standard android widgets over the GLSurface. a video example can be seen (see main post)

Ok, so it's not for allowing GLSurface to be layout out in an android widget? This is what I've been looking for, but maybe it's impossible. I'd like for instance three GLSurfaces in three different fragments, layed out by the Android layout engine, so that for me the top left coordinate are (0,0) for all three, even though one of them might be rendered on the right half of the screen.

As for your video I appreciate it but frankly I didn't understand what I was watching :) Maybe I'm stupid, but are the buttons standard Android buttons or are they AndEngine-creations? What is Android and what is AndEngine?
Nilzor
 
Posts: 17
Joined: Wed Feb 29, 2012 9:54 pm

Re: FragmentActivty, FixedStepMaxFPSEngine, PaletteSwapShade

Postby Niffy » Wed Jan 23, 2013 3:54 pm

Nilzor wrote:
Ah, here lies the problem of course. But I'm still a bit confused: I am targeting platform version 8, i.e. Android 2.2 for my project. Is this supposed to work with your branch? I know Fragments can be supported with the Android Support Library so I do have a reference to that library in my project (or "Module", since I'm using IntelliJ). But the VERSION_CODE-class in android.os.Build does of course not have any reference to ICE_CREAM_SANDWICH or HONEYCOM.


I have no idea why this happens. I've never seen this before. Are you sure the SDK is all up to date? Are you sure you've checked out the branch? Are both support library jars the latest? (One for andengine the other in your project) Perhaps it IntelliJ causing the problem?

My branch should work as the minimum level is API 4 as that is what the support library supports.
Nilzor wrote:
Ok, so it's not for allowing GLSurface to be layout out in an android widget? This is what I've been looking for, but maybe it's impossible. I'd like for instance three GLSurfaces in three different fragments, layed out by the Android layout engine, so that for me the top left coordinate are (0,0) for all three, even though one of them might be rendered on the right half of the screen.

As for your video I appreciate it but frankly I didn't understand what I was watching :) Maybe I'm stupid, but are the buttons standard Android buttons or are they AndEngine-creations? What is Android and what is AndEngine?


Why would you want three GLSurfaces? I'm not sure if that is even possible. You'll have to look that up.

I suppose you can say the GLSurface view is a widget, it first lays the surface down then everything is on top.
The video shows that fragments in action. So all the buttons and text are android widgets, while the blue background is Andengine. The clicking of buttons is removing and adding fragments to/from the layout.

map_with_fragments.png
map_with_fragments.png (90.29 KiB) Viewed 1492 times


The above image should help show this a bit more. All the buttons and menus are standard android widgets, while the background(The game world) is Andengine
Niffy
 
Posts: 284
Joined: Sat Sep 17, 2011 8:39 pm

Re: FragmentActivty, FixedStepMaxFPSEngine, PaletteSwapShade

Postby Niffy » Mon Mar 18, 2013 4:57 pm

Updated.

There is now an isometric world example. You can place cubes (whole cubes) and move a human about. Look at the readme for the example as well.

You need my latest Andengine and TMX branch,

https://github.com/Niffy/IsometricWorldExample

To understand how to use the isometric feature see the wiki.

https://github.com/Niffy/IsometricWorldExample/wiki

The example also use Fragments. There is two fragments on the scene to build an object or place human, a dialog fragment to select an item to build, then another two buttons are added as fragments.

Edit, I might start work on porting my branches over to GLES2-AnchorCenter, or steam on and rewrite my multiplayer code....
Niffy
 
Posts: 284
Joined: Sat Sep 17, 2011 8:39 pm

Re: FragmentActivty, FixedStepMaxFPSEngine, PaletteSwapShade

Postby Niffy » Fri Sep 27, 2013 8:54 pm

I'm still at working (slowy, because I found farmville 2 and the wonders of exercise) on a lockstep engine for the isometric example. But in the mean time I've been playing with google play game services as well, I've mapped out in a flow chart execution of methods while using andengine, GPGS and fragments. I've also got a collection, symbols if you like for a flow chart, of andengine, fragments and activity to use in the Pencil project (great free software like Dia)

Check out the repo here. https://github.com/Niffy/AE_GPGS
Be sure to checkout the readme,
Niffy
 
Posts: 284
Joined: Sat Sep 17, 2011 8:39 pm

Re: FragmentActivty, FixedStepMaxFPSEngine, PaletteSwapShade

Postby Sergio » Wed Dec 17, 2014 2:03 pm

I just wanted to say thank you, Niffy. I'm using your palette swapper and it's wonderful.

My respect and admiration for sharing your work.
Image
Sergio
 
Posts: 14
Joined: Wed Jul 10, 2013 6:12 pm

Previous

Return to Features

Who is online

Users browsing this forum: No registered users and 7 guests