Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - inelokii

Pages: [1]
1
Projects / Re: Make an Android Game in one month (outside working hours)
« on: December 01, 2013, 09:15:17 am »
I found a solution to my problem by myself  ;D (It was my bad  :-[)!

In fact, I have a method loading automatically resources as Texture, by rescaling the Bitmap to the nearest power of 2. But for some devices, Android recommands to load a picture 512x512 as a 1024x1024 picture (when using Context.getResources().getDrawable(R.id.......)).
So I had to find another way to retrieve the real picture size instead of using Drawable methods. Which is done now by using the BitmapFactory!

Explanations through the code:

Wrong way to scale automatically pictures:
Code: [Select]
String resourceName = context.getResources().getResourceEntryName(resourceID);
Drawable drawable = context.getResources().getDrawable(resourceID);
int width = drawable.getIntrinsicWidth();
int height = drawable.getIntrinsicHeight();
// set to highest width that is a power of 2 (troncate)
int new_width = Integer.highestOneBit(width);
int new_height = Integer.highestOneBit(height);
// ..... (I removed code asserting that texture is not already loaded)
Texture tex = new Texture(BitmapHelper.rescale(
BitmapHelper.convert(drawable), new_width, new_height));
Warning : getIntrinsicWidth and getIntrinsicHeight (Drawable methods) returns only Android advise about width and height the texture should have. In my case, these methods return an integer (between 1024 and 2047) for a picture 512x512 for some devices only...

Better way to scale pictures:
Code: [Select]
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeResource(context.getResources(), resourceID, options);
int width = options.outWidth;
int height = options.outHeight;
// set to highest width that is a power of 2 (troncate)
int new_width = Integer.highestOneBit(width);
int new_height = Integer.highestOneBit(height);
// ..... (I removed code asserting that texture is not already loaded)
Texture tex = new Texture(BitmapHelper.rescale(
BitmapHelper.convert(context.getResources().getDrawable(resourceID)), new_width, new_height));

2
Projects / Re: Make an Android Game in one month (outside working hours)
« on: November 30, 2013, 09:25:11 am »
A lot of things have been achieved since November 20th, and I'd like to show you my work with a little technical video (without game sound, I haven't found any free software to record both image and sound)!
http://youtu.be/fRehPA-nQ8w

The first step is done : the development of the display and the basics of gameplay.

I'm not totally satisfied about the display and the demo store google play.
I intend to do:
- Create and animate a background ("stars sky")
- Send information on google play store (pictures, video, description) associated with the demo
- Create a support tool in order to allow you bug reporting (via a google form)


Technical point :
I made this video with a beta version of Bluestack (Android simulator) instead of emulators for 2 reasons:
- ARM emulators are very slow..
- INTEL x86 emulator (with the hardware accelerator tool) is fast enough, but display is totally wrong  (see picture in attachment) :'(

If someone have an idea to avoid display bug on INTEL emulator, it would be a pleasure to test it ;)!


[attachment deleted by admin]

3
Projects / Make an Android Game in one month (outside working hours)
« on: November 20, 2013, 01:34:11 pm »
My biggest problem, I think most of you have already been confronted to, is the following:
in terms of project size, I always start something that I am not able to finish.

So I started a new challenge: create a video game in one month. A month to have a playable version on Google Play, and a second month to finish the big features and tweaking the gameplay.

If you are interested to take this challenge, please visit: https://www.facebook.com/pages/Space-Royals-Sound/232469776922019 and click "like" the page (French page, but I will write news in this thread in English).
Clicking to the "like" button is very important, cause I can estimate how many people are interested in, and if I have more people understanding english than french, I will translate this facebook page to english.

In particular you can find the presentation of the project in English. Another link for more convenient viewing this short presentation:
https://docs.google.com/presentation/d/1Yvxt-_Efk5s_sZjfKK-NbbaPB68Jj_oYLw88diD5QwE/edit?usp=sharing

Regarding the game to develop itself, here are some details.
Space Royals Sound is a shoot 'em up in landscape view, in which the player controls a spaceship. Its purpose is to arrive at its destination safely, exploding asteroids on its way.

Two features in relation to this game gender make it unique.
You can find them on the presentation schemes (link below), but here are short description.

On one hand, the music will affect the provision of asteroids. Like rhythm games, asteroids will be placed according to the tempo and tone of the music changes. To complete this specificity, the player can import the music stored on your smartphone / tablet, making game lifetime almost infinite.

On the other hand, some asteroids are not visible on the screen. How the player will be able to destroy them? It will have at its disposal a scanner mechanism, controlled by finger pressure on the screen. Low pressure will move the scanned area to the left, a bigger pressure to le right.
If you have any question or comment, do not hesitate!

4
Support / Re: Another object/texture transparency problem
« on: August 25, 2013, 09:06:49 pm »
I have implemented the solution of having 2 Object3D, one for the bottom part (under water), the other for the upper part.

It works well, even for 2D animations (texture shifts)!
In the architecture I have done, my only regret was to have 2 instances of GenericVertexController for handling Object3D "sizes" (but one class only  :P)

In Attachment of this post a new picture of my progress  ::)!

Thanks you!

[attachment deleted by admin]

5
Support / Re: Another object/texture transparency problem
« on: August 23, 2013, 12:16:32 pm »
Thanks you for your advice!

I will try to split the object representing my character into 2 objects, 1 above the water, 1 below (with of course the same texture).
It will make my transparent objects organization simplier  ;D
I hope the texture "link" between the above and the below part will be nice (no "cut" texture effect)  ::)

6
Support / Another object/texture transparency problem
« on: August 21, 2013, 03:35:13 pm »
Hello everyone,

I have a annoying problem about transparency objects. I read a lot of threads in this forum, but I'm still not able to find a good solution.

My goal is to draw a character that have water under knees (not neck).
If objects are not transparent, it's easy to do that.
But I can't have a similar result with transparent objects: http://postimg.org/image/t3yf7kmjr/cfd76ffa/ (or in attachment of this topic).

Some comments about the picture :
- The ground (green and orange/brown part of the picture) is an object3D, not transparent.
- The water is one level higher than the ground. It is a set of rectangular transparent object3D, one per square. Each object has its own sort offset, depending of the location & camera angle.
- The character is an Object3D (rectangular), transparent because texture contains fully transparent pixels. Like water objects, the sort offset of this object depends on its location & camera angle (but higher than water for the same square).


I don't know how to fix this in an efficient way, because splitting each Object3D composing the water into 4 little object3D sounds an heavy solution...
On other hand, I don't know if I can modify texture of a specific object (for example, add a texture representing water on character texture).
Or if there is a way to display the texture on a non transparent object (by removing black pixels for example), I'm also interested!

Anyone have a clue for this problem? :'(

[attachment deleted by admin]

Pages: [1]