Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (582)
Games in Android Showcase (163)
games submitted by our members
Games in WIP (633)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 9
1  Discussions / Miscellaneous Topics / Re: I've been here one year. on: 2015-05-08 20:50:28
Developers and their cats huh.... Sometimes I can't do any work because of this:



Hang in there buddy... I'm going on 13 years in these parts (1st 2 lurking)..  Grin
2  Discussions / General Discussions / Re: What's your day job? on: 2015-05-07 18:08:14
Contract assassin / cleaner.... err well I usually arrive after a mess has been made by the in house staff and rescue the project. Sometimes I get in at the start and do it right.. Most recently though I was a source code reviewer in a major patent litigation lawsuit (lips are sealed there as things go, but interesting nonetheless). Stoked as that last gig set me up for the rest of the year to finally get something launched of my own. If I was a glutton for punishment and travel I'd probably get into source code reviewing because it pays better than even high-end tech contracting; err cleaning, yeah...
3  Game Development / Newbie & Debugging Questions / Re: Best way to deal with infinite elements? on: 2015-01-21 00:08:52
Depending on your needs as you mentioned using this for something like an endless runner I'd get rid of objects altogether if all you are tracking is one type of data (re: rectangles). Use primitive arrays and keep track of the active count and index by stride of your data. You can get more clever and store multiple types of data perhaps with an increased stride and some sort of index data which identifies the data type. This doesn't require new object creation and also brings cache locality into play when you are working over all the data for rendering / collision detection. IE the only time you are guaranteed to have a contiguous block of data with Java is primitive arrays. It will be at least an order of magnitude faster than creating new objects and iterating over a collection of objects regardless of collection used.

Of note is that I didn't really look into supposed logic issues in the pseudo-code you posted, but here is more or less how you'd do it without objects. It will be a lot faster! Benchmark it and report back..  Grin

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
static final s_MAX_SIZE = 10;

static final s_STRIDE = 4;

int listRec1[] = new int[s_STRIDE * s_MAX_SIZE];
int listRec2[] = new int[s_STRIDE * s_MAX_SIZE];

int listCount1, listCount2;

Rectangle playerRec = new Rectangle();

render(float delta)
{
   if (currentTime - previousTime > 5) //5 seconds
   {
      if (listCount1 < s_MAX_SIZE)
      {
         int index = s_STRIDE * listCount1++;  // post increment only happens after mult.
         listRec1[index] = anyX;
         listRec1[index+1] = anyY;
         listRec1[index+2] = anyW;
         listRec1[index+3] = anyH;        

         if (listCount1 == s_MAX_SIZE && listCount2 == s_MAX_SIZE)
         {        
             listCount2 = 0; //clear listRec2.
         }
      }
      else if (listCount2 < s_MAX_SIZE)
      {
         int index = s_STRIDE * listCount2++;
         listRec2[index] = anyX;
         listRec2[index+1] = anyY;
         listRec2[index+2] = anyW;
         listRec2[index+3] = anyH;        
      }
      else if (listCount1 <= s_MAX_SIZE && listCount2 < s_MAX_SIZE)
      {
         listCount1 = 0;

         int index = s_STRIDE * listCount2++;
         listRec2[index] = anyX;
         listRec2[index+1] = anyY;
         listRec2[index+2] = anyW;
         listRec2[index+3] = anyH;        
      }
   }        
     
   for (int i = listCount1; --i >= 0;)
   {
      int index = i * s_STRIDE;
      int rectX = listRec1[index];
      int rectY = listRec1[index+1];
      int rectW = listRec1[index+2];
      int rectH = listRec1[index+3];

      //code to draw all rectangle inside listRec1.
      //code to verify collision with player and Recs.
   }
     
   for (int i = listCount2; --i >= 0;)
   {
      int index = i * s_STRIDE;
      int rectX = listRec2[index];
      int rectY = listRec2[index+1];
      int rectW = listRec2[index+2];
      int rectH = listRec2[index+3];

      //code to draw all rectangle inside listRec2.
      //code to verify collision with player and Recs.
   }
}
4  Game Development / Newbie & Debugging Questions / Re: Compute + Geometry Shaders on: 2014-12-30 04:18:25
So one neat thing about compute shaders is that they exist within the OpenGL pipeline. So you can use normal texture sampling in compute shaders which is not how OpenCL work.

A simple invert op w/ a sampler:

https://github.com/typhonrt/modern-java6-android-gldemos/blob/master/java6-android-gldemos/src/main/java/org/typhonrt/android/java6/gldemo/open/gles31/invert/ComputeInvertSampler.java#L92

And in the compute shader:
https://github.com/typhonrt/modern-java6-android-gldemos/blob/master/java6-android-gldemos/src/main/assets/shaders/open/gles31/color/invertTextureSampler.comp#L38

I also provide the imageLoad version too:
https://github.com/typhonrt/modern-java6-android-gldemos/blob/master/java6-android-gldemos/src/main/assets/shaders/open/gles31/color/invertTexture.comp#L29
5  Game Development / Newbie & Debugging Questions / Re: Compute + Geometry Shaders on: 2014-12-29 23:04:26
a pretty good article here about how to use compute shaders for realtime raytracing.

And I ported it to OpenGL ES 3.1 for Android with a repo here:
https://github.com/typhonrt/modern-java6-android-gldemos

Compute shaders are basically OpenCL light with the added benefit of being a little more integrated into the OpenGL pipeline, so it's easier to access texture data for instance, etc. With SSBOs you can shuffle a lot of data to be processed on by the GPU via a compute shader instead of the CPU. Eventually I'll be getting around to porting some of the Nvidia Gameworks OpenGL examples to another related repo as the one above and the ComputeParticles example is nice:
http://docs.nvidia.com/gameworks/content/gameworkslibrary/graphicssamples/opengl_samples/computeparticlessample.htm
6  Game Development / Game Mechanics / Re: Savegame structure for Entity/Component System with complex components on: 2014-12-28 21:56:28
Yes i only use the composition as components, i.e, data only. I don't think i could do without composition, as i dont want to write a specific component for each 'Type' of an Entitiy derivation. But all this made me think about my component approach, and honestly, i think i have found my error in the approach of an ECS.

Composition is great and indeed it sounds like you are 10% of the way there for an efficient ECS, but are still clinging to the old ways. It takes time believe me as I've worked on mine for years as things go.

But some of my components are so complex that i really need to create 2-4 specific classes for it.

You're doing it wrong.. ;p  This screams thinking more about the separation of data and the systems that process it. In an ideal scenario a 1:1 or 1:N arrangement is good. 1 data component containing everything a system component needs to process this data and complete a task.

You are making very heavyweight "objects" despite having that 1st tier of implicit composition (seen in your other post). Components are more about the architecture / API that provides implicit composition and ability to manipulate those relationships. IE calling a heavyweight object a component does not make it so.



Allthough i would like my components to be 'Data only', they still are and an external system (static method or object method), runs on it. But i realize a lot of people are having trouble with this.

There is very little codified per se for ECS.

Ok gotta go. Flying and phones off right now.. Cheesy
7  Game Development / Newbie & Debugging Questions / Re: Anybody know where I can find a good glow shader tutorial. on: 2014-12-28 02:59:18
blur the areas you want to glow (perhaps by color or a mask) then potentially adjust contrast or muck about and blend (additive or otherwise) back into the original image. Must use FBO passes.

There is also the trick with code in the Nvidia Gameworks OpenGL demos which will make luminant colors glow.

http://docs.nvidia.com/gameworks/index.html#gameworkslibrary/graphicssamples/opengl_samples/bloomsample.htm

https://github.com/NVIDIAGameWorks/OpenGLSamples/tree/master/samples/es2-aurora/Bloom

Lots of other neat techniques in the Gameworks OpenGL samples. Eventually in my "copious spare time" I'm going to port over the Gameworks OpenGL samples to the Java / Android OpenGL demos repo I'll be maintaining.
8  Game Development / Game Mechanics / Re: Savegame structure for Entity/Component System with complex components on: 2014-12-27 19:00:30
You have already posted a similar thread here with more details on your Entity / component API you created. http://www.java-gaming.org/topics/how-to-save-game-data-with-entity-component-based-engine-via-json/34784/msg/333101/view.html These details do reveal the difficulty of your serialization efforts. More or less your component system from the other post was a bit basic. IE one level of storage under an Entity class as the container.

I'll assume your design hasn't changed much from your other post.

...and also objects of other classes i wrote for specific Components.
...and class objects which again contain other class objects.

Which is sort of like traditional OOP again once you have explicit composition back into the mix. Other standard object serializers will not be able to understand the 1st tier implicit lookup of your Entity class. But potentially serializing the 1st tier of components since they use explicit composition from then on could work by a standard serialization library. (Kryo is a good one for Json).

I assume you at least separate things into pure data components and then system components that work only on the data ones. Perhaps add an annotation to your data components that marks them as such. You'll still have to create a little bespoke save / load parser for serialization that walks the 1st tier of components and looks for any that have the @DataComponent or whatever annotation tag you make at the Class level. Once you find one of those then chuck it into the grinder of whatever standard OOP serializing library you are using. On load you'll have to conceivably partially compose an Entity of a particular type adding all relevant systems then deserialize each data component and add it to the entity. If all goes well the object graph of each data component even the explicit composition aspects are handled by your library of choice.

I tried serialization, but then i would need to implement Serializable on EVERY SINGLE class i used in the component(right? Oo), which seems to me like a dirty solution.

Yeah don't do that. Josh Bloch, the fellow involved in implementing Serializable back in the Java 1.0 days, profusely apologizes for this blight.

On the other hand side, if i were to use something like Json, i would have the problem of needing to save one of my class objects as a string description of some sort, and then load it by identifying the string, get its values stored in a similar descriptive way, and then create the correct class objects from that.

That's what some of the 3rd party libraries already do which is serialize / deserialize an object graph.

https://github.com/EsotericSoftware/kryo
9  Game Development / Newbie & Debugging Questions / Re: Which is the "better" practice on: 2014-12-26 23:46:14
Re: KevinWorkman had a great comment earlier.

I too have had to refactor plenty of nasty code in my time for clients where general bad practices just piled up with many hands touching things in the process.

Sure.. As Cas and others mention if you are doing traditional OOP and your scope is limited and you plan to not necessarily carry over ones work to the next game then do whatever works for you and be done with it.

The big problem with the singleton is versioning and modularity. I won't dwell on things too long, but component architectures solve the singleton issue by making versioning and modularity top level concerns as part of a framework providing the tools / API to do it better. As long as one has reference to the relevant container then it's a simple query to find the "GameData" object (or whatever used to be the singleton), etc.  In my efforts there is a way to inject the relevant main container into child components without dependency injection or reflection, so that is the way I handle things.

The defining thing is are you taking a short term "library" approach or working with a framework that solves the stickier parts of traditional OOP design.
10  Game Development / Performance Tuning / Re: GPU Accelerated Image Editing / Techniques - How to? on: 2014-12-25 17:14:04
I have a couple image filter examples using OpenGL ES 3.0 and compute shaders (OpenGL ES 3.1) for Android:
https://github.com/typhonrt/modern-java6-android-gldemos

You'll want to check out GPUImage for iOS for a repository of OpenGL ES 2.0 image operations.

https://github.com/BradLarson/GPUImage

All the shader code is just sitting there to do practically everything Photoshop does. In my efforts I took a good chunk of that shader code converted it to OpenGL ES 3.0+ along with improving it and am doing some fun stuff with photos / videos.

I don't really recommend Renderscript since it's Android only and Google has turned it's back on open standards like OpenCL which is far superior for GPGPU; though now we have compute shaders with OpenGL ES 3.1. You can accomplish everything Renderscript can do and more with OpenGL ES 3.1.

Image processing is directly related to GLSL fragment shaders, so no need for actual GPGPU techniques; just straight up standard OpenGL GLSL.

There are "script intrinsics" though with Renderscript for a handful of image operations. It's useful if you want to integrate basic image processing with the Android 2D API / blur a Bitmap and are too lazy to learn OpenGL 3.0+. I still recommend it because once you learn OpenGL it works across platforms. 
11  Java Game APIs & Engines / OpenGL Development / Re: Modern OpenGL ES 3.0 / 3.1 compute shaders for Java with Android 5.0 on: 2014-12-15 04:16:30
Ahh Julien Julien Julien..  Clueless   Kiss   persecutioncomplex  It's not so much as a framework as it is a compact utility library that replaces the very long in the tooth mechanisms that have been around since Android 1.0. The library is for simple demos though I'll in time provide all the utility code that makes it possible to port the NVidia Gameworks samples to Java for Android. I'm trying to strip things down to the bare minimum of what is necessary for modern OpenGL and making the code clean for small demos. It's good for test cases too to test different mobile GPU manufacturers I already found some issues in the Snapdragon 805 Adreno 420 that don't exist in the 320 / 330 or Tegra K1 and have run into the proper folks at Motorola to have them take a look. One of the demos briefly shows the problem; only Nexus 6 / Adreno 420 with current weak drivers is showing the problem. The hardware is supposed to support OpenGL ES 3.1, but a gimped driver was shipped (just GLES 3.0 support). So, having samples that run across platform really show the glaring issues that manufacturers need to fix as some developers notice!

I actually stripped a lot of the utility code out of TyphonRT itself. What I released is definitely not the meat of TyphonRT from an architecture standpoint. That is why FBOData has public fields and accessor methods as I just got rid of the interface as it was one more class to track. IN a component architecture where there is a lookup often to retrieve an object one makes the member for data objects public.

Not trying to take over any binding anytime soon (the utility code posted uses the Android SDK bindings, but makes them pleasant to use). I actually welcome LWJGL3 or even JOGL to GLES / EGL especially whoever will potentially take on making a full profile Java / OpenGL Binding for the Tegra K1 including all the cool NV extensions (NV_command_list), etc.
12  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-14 23:06:56
Should be titled what I did yesterday, all last night, this morning, and continuing today...

Finally got some really nice clean and modern OpenGL code up for Android which supports compute shaders and such.

Just got featured on the front page of XDA Developers... Cheesy

http://www.xda-developers.com/android/opengl-es-3-03-1-frameworks/

Woot woot...  Grin
13  Java Game APIs & Engines / OpenGL Development / Modern OpenGL ES 3.0 / 3.1 compute shaders for Java with Android 5.0 on: 2014-12-14 20:03:27
Hi folks,

Check out these Github repos I just posted this morning for modern OpenGL ES 3.0 / 3.1 demos and a lightweight framework that makes using this tech much easier from Java / Android

The main demo repo is here, but check out the install guide:
https://github.com/typhonrt/modern-java6-android-gldemos

Glad I could get my first open source (Apache2) effort up after all these years. There are few if any modern OpenGL ES 3.0 / 3.1 demos for Java with Android and this is important tech. I spent a good chunk of the last week pulling out code from my commercial middleware (TyphonRT) to make a lightweight and concise GL framework that makes working with modern GL much easier. I also provide a few demos with more forthcoming though this is a spare time effort.

I ported over Kai's LWJGL / basic ray tracing in compute shaders demo code to OpenGL ES 3.1 and it works like a charm on the Tegra K1. Can't wait for his follow up post with the full code for something much prettier.

The nice thing is that the demo code is separated from the framework, so the framework can be used separately. Eventually I'll be porting the NVidia Gameworks demos to Java / Android. You do need a Tegra K1 based device to take advantage of OpenGL ES 3.1 as well Motorola and / or Qualcomm shipped deficient drivers that only supports 3.0 for the Snapdragon 805 / Adreno 420 on the Nexus 6 launch; talk about a disappointment there.  This framework and repo is updated for the absolute latest Android Studio 1.0.1 and build tools "21.1.2". There is a reasonable guide on how to check the code out, but a prebuilt apk is also available. Lots more to say, but I'd be glad to answer any questions about modern OpenGL on Android. I'll be expanding the wiki on the repos linked here in the next week.

If you think the code above is useful or cool it's the basis for where I'm headed with building a next-gen video engine for Android. I have ~8 hours left on a crowd funding campaign that will help me get it out sooner than later having bootstrapped to 95% of the way there spending 2.5k hours over the last year building it covering all costs out of pocket ($80k) / not quite close to raising the funding goal ($20k), but I'm most interested in finding early users who are interested about next-gen video and having fun / cool toys before iMeh; if you back the project even though it likely won't time you'll get an early invite regardless! I'll keep it short as there is a video available to check out of it in action.

KS here: http://kck.st/1xA3R61 At this point I'd really just like to connect with interested early users as the funding goal is well... yeah... Thanks folks!
14  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-10 23:16:42
I was planning on coding away today, but when I woke up I had 20 new backers for my Kickstarter which has been the biggest influx yet...

The very nice folks over at Phandroid did a nice little write up and article on the TyphonRT Video Suite:
http://phandroid.com/2014/12/10/typhon-rt-kickstarter/

So I have spent the last 4 hours trying to get some more momentum behind it.. There is some activity on Reddit BTW if any of you use Reddit... "TyphonRT" may be a good search term..  Roll Eyes

About coding though.. I am close to getting a nice little repo up on Github with a very lightweight utility code to do modern OpenGL dev with Android.

The repo is located here and I hope to get things up in the coming days:
https://github.com/egrsoftware/java-android-gldemos

So hopefully back to hacking on the modern gl demos.. I'll be porting over the most excellent ray tracing demos posted on the LWJGL blog. Check it out... Good work Kai:
http://blog.lwjgl.org/ray-tracing-with-opengl-compute-shaders-part-i/
15  Discussions / General Discussions / Re: am thinking of getting this PC, for both gaming and developing on: 2014-12-10 09:05:18
@Catharsis
I chose that motherboard over a full size one, as it was the cheapest motherboard that supports overclocking.

Most definitely. I mentioned ATX, because if the case I have to give away (3U rack-mount) is used for the build out it would look "interesting" inside with all that extra space.

We'll get @philfrei jamming soon enough with some new gear!  Grin

Link for the Kickstarter is in my sig... hint hint.. all of you..  Wink 4 days left.. I can use all the help possible on getting the word out. I just couldn't get it into the tech press which was what was needed...
16  Discussions / General Discussions / Re: am thinking of getting this PC, for both gaming and developing on: 2014-12-09 23:10:47
Suppose we start with the purchase of the computer I listed earlier, and add another 4MB RAM for 8 total (16 possible):

Typically you want to have matched RAM. These days 8GB min; preferred 16GB.

How do I find out if it is possible to upgrade the CPU to the recommended  FX 8320 CPU (3.2ghz 8 core)? (I know much less about how interchangeable CPU's might be.)

The CPU will have a socket type the FX-6300 and 8320 are AM3+.

The PCPartPicker site is nice because it lists all the details you need to mix and match parts.

I'm tempted to try and build, but I think my "angel" may be more comfortable with going with the existing pre-built unit.

I'd recommend it for similar reasons folks above have mentioned: better quality parts, easily exchange / upgrade parts due to a case with space, plus then there is just having the satisfaction of knowing you had a hand in building what you are using daily and know exactly what to do to upgrade a part.  Once you build one you'll never go back to pre-built. It'll take ~30 min to put it together.
17  Discussions / General Discussions / Re: am thinking of getting this PC, for both gaming and developing on: 2014-12-09 20:08:13
@philfrei

I've got a spare rack-mount case I haven't used in ~7 years if you'd like to grab it.  From my quick reading of this thread I can also help you put together a box too as it seems like you might not have done this before. Besides we chatted previously about hanging out at some point.  Not too many JGOers have historically been near SF Bay Area as far as I'm aware.

It looks like what @Phased posted is a good build out: http://pcpartpicker.com/p/xpyPYJ at that price range. I'd switch to an ATX motherboard as that is what the case is unless you wanted to buy a microATX case. I guess you can put a microATX board in an ATX case; it'd look empty with the case I have...

I live close by to Central Computers in SF, so if there by chance is a missing cable it's easy to pick it up. If you decide to pull the trigger on ordering those parts PM me..
18  Java Game APIs & Engines / OpenGL Development / Re: [framebuffers] Rendering after another framebuffer was bound on: 2014-12-08 04:43:57
I don't have any way to test this, the call to glClear is done where the framebuffers are bound, so its fine. I just wanted to know if you stopped rendering to a frame buffer then re-bound it and drew anouther object, would both of their content be there.

Yes... Keep in mind though the necessity of correctly setting glViewport when dealing with different sized frame buffers.  An easy way to test is simply bind a FBO, set the glViewport to the backing texture size, draw something, unbind, rebind set glViewport to something smaller and redraw. The 2nd drawing will be in the smaller view port size on top of the original drawing.

So yeah... not knowing what the rest of your rendering code does one does have to keep in mind calls to glViewport when binding / unbinding FBOs.
19  Game Development / Newbie & Debugging Questions / Re: Bug with touch movement in a game on: 2014-12-07 20:41:27
Consider handling ACTION_CANCEL and ACTION_OUTSIDE as those are additional states that are likely being triggered when dragging outside of a target View.  Use a switch statement.
20  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-04 16:44:48
Well, I've chucked a few bucks your way Smiley Does look kinda fun, although I can't quite honestly see the application beyond monkeying about!

Thanks Cas, you know I got your back on your next one!  Grin  Yeah.. When doing an impromptu demo with Scoble (he literally pulled out his phone and hit record within 30 seconds of engaging him which even caught me off guard a little) and the last one with Android Central what mainly is shown is scrolling between presets and most of the ones I have loaded up are rather gratuitous in style as to be obvious what is happening. There are plenty of opportunities for subtle image enhancement. One fun one is adding a slight bloom around edges (seen in the sizzle reel video with quick shot of the silhouetted girl & the drapes). What really can't be shown though easily at least in a quick demo is the preset editor where one can spend minutes or hours experimenting with different combinations to tweak out things to come up with original effects composition. For many folks this will be their first time ever doing something like that. I plan to offer a tutorial series describing basic to advanced effects composition and also discuss the GLSL code that makes it happen. I definitely want to enable sharing of effects presets between users.

For game devs it's certainly possible to prototype an effects composition chain and understand what it'll look like before implementing it in ones own game / engine.

I think the biggest professional use case is adding lower thirds in the field and immediately uploading completed content to media sites without further handling from offline editors.
21  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-12-04 10:53:07
I happened via serendipity (longer story!) to run into Robert Scoble (https://www.facebook.com/RobertScoble) today. He quickly whipped out his iPhone and....

https://www.facebook.com/video.php?v=10152876836024655&set=vb.501319654&type=2&theater

"This Android app makes me jealous. Video effects. Feels like a new age in video." -- Robert Scoble...   

I need all the help I can get to tip the crowd funding campaign... Even with Scoble posting to his FB that just got 5 backers 30 to 35.... Not going to make it very likely, but anyone on JGO who does a crowd funding campaign has my $5; RPC being my latest funding... Tomb of Tyrants before that and of course Spine....  So yeah... I can use all the help I can get at this point w/ 10 days left. Still haven't got into the press per se...

http://kck.st/1xA3R61

<a href="http://www.youtube.com/v/gJ0kYC4sFo8?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/gJ0kYC4sFo8?version=3&amp;hl=en_US&amp;start=</a>

 Grin
22  Games Center / Contests / Re: End of 4K. Thanks all! on: 2014-11-30 09:51:00
Yah.. Bummed I never had the free time to enter...

I understand there is a 4k / Android category with this competition:
http://nv.scene.org/2015/

At least there was in 2014 / didn't attend, but I might in '15... Granted it's likely all GLSL re: demo scene / eyecandy and not a Java game competition.
23  Discussions / Miscellaneous Topics / Re: I don't have the lollipop update yet? on: 2014-11-27 08:30:48
Or you can do it yourself especially since you have a Nexus 5:
https://developers.google.com/android/nexus/images

24  Game Development / Newbie & Debugging Questions / Re: I want to scale ParticleEffect - Libgdx on: 2014-11-23 22:58:11
What is the value of "Values.Scalar_Width"? You need to likely take screen density into account. The S4 isn't the highest density screen either. IE I just got the Nexus 6 for instance. These are Android system values from DisplayMetrics:

Nexus 6:
density: 3.5
densityDpi: 560
scaledDensity: 3.5
xdpi: 494.27
ydpi: 492.606
widthPixels: 2413
heightPixels: 1440

Nexus 5:
density: 3.0
densityDpi: 480
scaledDensity: 3.0
xdpi: 442.451
ydpi: 443.345
widthPixels: 1794
heightPixels: 1080

You get them by getting a DisplayMetrics instance for the desired screen:

1  
2  
3  
4  
      
DisplayMetrics displayMetrics = new DisplayMetrics();
((WindowManager)getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getMetrics(
displayMetrics);


You can use any Context (Activity / Application) to call getSystemService.

Granted this is the solution for Android. You'll want to find a value with some of the factors returned by DisplayMetrics and set "scaleEffect" accordingly.
25  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-11-19 02:30:14
Yeah Galaxy Nexus was released in the fall of '11 though there wasn't that much of a delay if I recall. I happened to attend Google I/O in '12 and got one and the original Nexus 7. It replaced and was slightly better than the G2X / Tegra 2. I think that was the last year of good device giveaways for Android developers. I skipped the Nexus 4 (not that great of a GPU) and went straight to the Nexus 5 / Snapdragon 800. I started building my video engine on the Galaxy Nexus; har har har... About 1 filter (only some of them; forget blur!) running at ~24FPS while encoding. One couldn't instantiate a MediaCodec encoder / decoder at the same time or one after another due to whatever native resources not being released / out of memory. Snapdragon 800 / 801 and the Adreno 330 GPU blew the door wide open for doing what I'm doing today; up to 8 effects + plenty of window based ones (blur) at 30FPS (OK multiple blur / or kuwahara turned up can kill things). It's what I call the "FBO bonanza" as the Adreno 330 was the first phone form factor GPU that wasn't heavily penalized for multiple FBO rendering in a single pass.

The Snapdragon 805 / 810 is like the tock of a tick; ~30% and 80% faster respectively of the Snapdragon 800.
26  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-11-18 23:11:58
Goodness things have been busy... Last week I attended the Samsung Developers Convention and ran into Phil Nickinson of Android Central... On demoing the video capture / effects composition app he pulled out his video camera and we recorded an impromptu demo that was posted to Android Central (first outside press):
http://www.androidcentral.com/typhonrt-video-suite-looks-be-amazing-real-time-renderingrecording-platform

I'm definitely looking forward to AnDevCon the rest of the week!  For anyone attending I'm giving a lightning talk on Wednesday evening about modern OpenGL on Android. I also have the opportunity to participate with a demo booth at the Intel sponsored after party Thursday evening 7:30 to 10pm. Stop by and check out the TyphonRT Video Suite. I'll have an LCD TV on hand and allow folks to get hands on with the video capture / effects composition app and have some fun.  Wished I had time to get together a green screen backdrop for photo / video fun, but I'm working hard on my demo code for my presentation.

My presentation on OpenGL ES 3.1 / compute shaders is on Friday at 10am. I am finishing up the source code takeaways today using the Nexus 9. What I'm demoing and providing utility code for is using OpenGL ES 3.1 from Java / Android Studio. There presently is no information out there about how to do this and so far I've found several tricks that make it possible that aren't obvious in integrating compute shaders with standard Android mechanisms like loading textures from resources that can also be used in compute shaders. I'm working real hard today in converting the advanced ComputeParticles demo (http://docs.nvidia.com/gameworks/index.html#gameworkslibrary/graphicssamples/opengl_samples/computeparticlessample.htm)
from the NVidia Gameworks samples today to Java... Don't know if I'll make it as it's complex, but I'm giving it a try. Source code and slides will be available on GitHub soon.

If you are planning to make it to AnDevCon give me a holler and let's hang out and chat all things Android + modern graphics / video!

Also, some darn cool updates. I just installed Lollipop on the NVidia Shield tablet and yeah yeah yeah yeah YEAH MediaCodec works fine and my video engine is stable on the K1 / Lollipop. NVidia shipped the Shield w/ KitKat and a broken implementation of MediaCodec. So moving to Lollipop as the base OS for the video engine is really going to help in stability and hopefully I won't have to build as huge of a device testing lab.

And OMG Nexus 6 in the mail.. I'm trying to reroute it to a UPS station, so I can pick it up tomorrow morning!!! I still am amazed that a year ago I was using the Galaxy Nexus and now the Nexus 6 which is light years apart from the GN. 

Booyah!
27  Games Center / WIP games, tools & toy projects / Re: TyphonRT Video Suite (Kickstarter) on: 2014-11-13 23:33:22
Didn't mean to insult Smiley It the audio doesn't fit the video, maybe that colored my perception of the audio, ending up a tad harsh Smiley

No worries.. That is one of the only few tracks of mine that would be at all appropriate or close to appropriate for a general audience. All the rest are outsider / eccentric / experimental music.

Anyway, if anything, that 8 second 'intermission' is hopefully easy/cheap to rip out. That will surely help retention rates.

That I can take a look at and am plenty skilled at editing. Maybe There could be a way I could mash up the monologue and intro sizzle reel. I think refining the textual content is much more pertinent at this point.

As things go it's practically impossible for me to get anyone to be in a film / reshoot scenes without involving other creatives on the clock. I've essentially locked myself in my studio coding for the past year+ and most old acquaintances won't be in a video or even back the KS, so yeah. So everything has a dollar sign attached to it.
28  Games Center / WIP games, tools & toy projects / Re: TyphonRT Video Suite (Kickstarter) on: 2014-11-13 23:02:03
Definitely a live and learn experience I suppose..  As things go the current video cost a lot to produce. I don't have the resources / equipment to shoot a better one myself and was engaged full time as a contractor when things were being filmed for half of it at least (then that client ran out of funds and ahhh...). I'm taking on a short term contract Dec / January to survive at this point, thus also pushed out the release date a month for the KS.

A comparison KS is Looksery's:
https://www.kickstarter.com/projects/looksery/looksery

Sure the video is a bit... Hmm.. I guess I'll call it "consumer friendly". I dunno...

then 8 seconds of fade out (bye bye!) followed by a monologue without background audio.

Dang, I thought it would seem over produced with background music during the monologue.

that background music is so generic it would be better to switch to audio that

Hey man.. I produced that track.. Albeit back in 2002... ;P
29  Games Center / WIP games, tools & toy projects / Re: TyphonRT Video Suite (Kickstarter) on: 2014-11-13 22:34:30
Good points.. I do appreciate the feedback because I'm not getting much. I'll try an figure out verbiage changes that make sense.

I see all sorts of projects being transparent in where the funding goes. I guess there are some that don't list it either and lean toward the direction you bring up. A big problem is just getting out of the friends and family category of backers. During the first campaign I was counting on conference attendance to pass out flyers and demo in person to Android enthusiasts. This turned out to be not so good.

I'm at the Samsung Developers Conference right now though and got very lucky to get featured on Android Central via Phil Nickinson who've I've bumped into in the past at conferences since the early days of Android:
http://www.androidcentral.com/typhonrt-video-suite-looks-be-amazing-real-time-renderingrecording-platform

Getting further coverage in Android blogs / any press is the only thing seemingly that will make it tip.
30  Games Center / WIP games, tools & toy projects / Re: TyphonRT Video Suite (Kickstarter) on: 2014-11-13 21:57:14
So, I rebooted the Kickstarter. I lowered the funding goal from $45k to $20k and did this without lowering quality expectations. Basically I needed to fund a significant device testing lab if I was going to release for KitKat due to MediaCodec API instability across the ecosystem. I'm bumping the min Android OS requirements to Lollipop which received more testing from Google. There are also other benefits like defaulting to the Camera2 API.

Check out the new Kickstarter:
https://www.kickstarter.com/projects/85808410/typhonrt-video-suite-next-gen-video-apps-for-andro-0
Pages: [1] 2 3 ... 9
 
Ralphanese (18 views)
2015-05-29 13:07:55

Gibbo3771 (15 views)
2015-05-29 06:54:17

Ralphanese (23 views)
2015-05-28 16:52:52

theagentd (31 views)
2015-05-27 22:21:17

theagentd (36 views)
2015-05-27 22:21:08

CopyableCougar4 (25 views)
2015-05-27 19:24:50

MrMapcom (24 views)
2015-05-23 20:26:16

MrMapcom (33 views)
2015-05-23 20:23:34

Waterwolf (37 views)
2015-05-20 15:01:45

chrislo27 (44 views)
2015-05-20 03:42:21
Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!