Main Menu
Menu

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.

Show posts Menu

Topics - sushobhit

#1
Support / Scaling an object (Self Created)
August 11, 2016, 07:10:28 AM
 :D

Can anybody plz help with this problem I am stuck with .
I have created a simple cube using
Object3D.addtriangle(sv....)
The problem is I DK how to add scaling capability to it .What are the vec calcs to be applied to make it scalable . Plz .

Here is the code :

      SimpleVector upperLeftFront=new SimpleVector(-0.8,-0.8f,-1);
      SimpleVector upperRightFront=new SimpleVector(0.8,-0.8f,-1);
      SimpleVector lowerLeftFront=new SimpleVector(-0.8,0.8f,-1);
      SimpleVector lowerRightFront=new SimpleVector(0.8,0.8f,-1);
      
      SimpleVector upperLeftBack = new SimpleVector( -0.8, -0.8, 1);
      SimpleVector upperRightBack = new SimpleVector(0.8, -0.8, 1);
      SimpleVector lowerLeftBack = new SimpleVector( -0.8, 0.8, 1);
      SimpleVector lowerRightBack = new SimpleVector(0.8, 0.8, 1);
      
      SimpleVector upperLeftLeft=new SimpleVector(-1,-0.8,0.8 );
      SimpleVector upperRightLeft=new SimpleVector(-1,-0.8,-0.8 );
      SimpleVector lowerLeftLeft=new SimpleVector(-1,0.8,0.8 );
      SimpleVector lowerRightLeft=new SimpleVector(-1,0.8,-0.8 );

      SimpleVector upperLeftRight = new SimpleVector( 1, -0.8, -0.8 );
      SimpleVector upperRightRight = new SimpleVector(1, -0.8, 0.8 );
      SimpleVector lowerLeftRight = new SimpleVector( 1, 0.8, -0.8 );
      SimpleVector lowerRightRight = new SimpleVector(1, 0.8, 0.8 );

      SimpleVector upperLeftUp=new SimpleVector(-0.8,-1,0.8 );
      SimpleVector upperRightUp=new SimpleVector(0.8,-1,0.8 );
      SimpleVector lowerLeftUp=new SimpleVector(-0.8,-1,-0.8 );
      SimpleVector lowerRightUp=new SimpleVector(0.8,-1,-0.8 );

      SimpleVector upperLeftBottom = new SimpleVector( -0.8, 1, 0.8 );
      SimpleVector upperRightBottom = new SimpleVector(0.8, 1, 0.8 );
      SimpleVector lowerLeftBottom = new SimpleVector( -0.8, 1, -0.8 );
      SimpleVector lowerRightBottom = new SimpleVector(0.8, 1, -0.8 );
      
Object3D sample = new Object3D(44);

#2
Hi Friends ,

Please tell me what I am doing wrong here ????
My player's rotation is controlled by Mouse dx
and move forward is done when the UP key is pressed.

Now during the start the first time when I press the UP key the player moves in the desired direction..
But after that when I roatate the player using the mouse and press the Up key it first goes a little in the last Direction
it moved to and then it goes in the right direction.

What changes should I make.

   

SimpleVector t= box.getZAxis();
t.scalarMul(0.05f);
moveRes.add(t);
moveRes = box.checkForCollisionEllipsoid(moveRes, ellipsoid, 8);
box.translate(moveRes);


Also I am using a little code just after this in the gameloop for Gravity I hope its not this that is causing the problem....

// finally apply the gravity:
         SimpleVector t = new SimpleVector(0, 1, 0);
         t = box.checkForCollisionEllipsoid(t, ellipsoidG, 10);
         box.translate(t);
The value of ellipsoid as follows :


private SimpleVector ellipsoid = new SimpleVector(2, 2, 2);
   private SimpleVector ellipsoidG = new SimpleVector(2, 20, 2);
#3
Support / Save Texture Back To File
July 08, 2014, 12:29:38 PM
Hi ,

I am facing difficulty in saving Texture Back to File.

OK.

So , I get the  rendered scene into a Texture.

Now , how can I save this Texture into a bitmap ????


#4
Support / Shadow Maker Shader
May 29, 2014, 08:09:55 AM
Hi ,

I want to implement a shader for a Plane object which shows shadows of all the objects placed on it.
I know about blob shadows but that wont solve the pourpose that i am trying to achieve.

I have a rough sketch in my mind which is something like this : The shader of the plane would be a perpixel light shader
and it illuminates all of the plane falling under light. Now if an object falls in between the position of the light and the position of the object(plane) i.e the vertex if simply does gl_FragColor = shadowcolor * texturecolor; and if there is no object between light & plane it simply does gl_FragColor = textureColor;

All is going fine till now , I am able to get gl_FragColor = textureColor ; but how do i find out if there is an object between light and the plane.... plz help !!!

Do I have to set a uniform for each individual object if yes which matrix I have to pass that contains positions of all vertex of the object.

Very desparate to get this one working cause this is the last thing i have left to learn regarding game programming.....

#5
Feedback / Web GL
May 28, 2014, 11:27:37 AM
Anyway I could PORT my jpct java code to work on Browser (WEBGL)
#6
Support / Cel Shader
May 27, 2014, 12:18:51 PM
Hi Egon ,

I was wondering if you have a decent cell shader code VERTEx + Frag.
Made one myself , got the silhoutte right but am unable to get
a good effect of the texture i.e the textures are not flattening properly

Just by chance if you have one handy it would save me a lot of time.

Regards.

(p.s) - who says jpct is just for small-medium projects , i dont think the same way a reviewed on mobilegameengines
           it is as good for large and very large projects.:0
#7
Support / How to create textures for glshader
May 23, 2014, 01:23:01 PM
hi egon ,

I would like to learn the shader and while going through the example provided with jpct-ae(hello shader) i came across 3 files one the real image , second normal (bluish version of the same image) and third (a greyish version). An you combine these 3 to make the shader.

?? So if i have a image , how can I get the bluish one and the greyish one so that the texture could be applied?

#8
Projects / LAZYLION 2D ENGINE
April 19, 2014, 08:02:59 AM
                                               
A SET OF CLASSES USING JPCT'S FRAMEBUFFER & BLIT PROCEDURE TO CREATE 2D WORLD ,
OBJECTS , LIGHTS.   
OPEN SOURCE 2D ENGINE BASED ON JPCT FORMAT. STILL HAS LOT OF POSSIBILITIES OF IMPROVEMENT

FEATURES :
1.SPRITE ANIMATION
2.COULD ALSO BE USED FOR DESIGNING GAME MENUS
3. 2D GAMES
4. INTERACTIVE PRESENTATIONS
5. LOW ON SYSTEM RESOURCES.

Download Links :

http://speedy.sh/RdH2U/2dengine.zip
http://www.filedropper.com/2dengine
http://wikisend.com/download/108818/2dengine.zip
#9
Support / Lens Flare
April 15, 2014, 07:22:39 AM
Hi egon ,

Can you plz share some sample lens flare images.. I just cant seem to get it right ..
#10
Projects / SPACECOP 3D v2
April 05, 2014, 12:26:34 PM
Based on valuable feedbacks improvisions were done

Features :
- Infinite Gameplay
- Challenging Levels (Speed increase after 50000 points & then again after 100000)
- Cool Sounds
- WWW HiScorecard
- Keyboard Support (if can attach a keyboard to your tab/phone just use <- / -> DPAD)
- Android 2.x & >

New Features :
-Smoother Steering [Left-Right]
-Two ships to choose from
-3D Fonts [Main Menu]
-Some memory optimizations [Music conv from MP3 to OGG , Textures Decreased in W*H but Quality Remains Same]

Download From :

Link # 1 : http://www.sendspace.com/file/ls0lze

Link # 2 : http://www.apkfiles.com/ [Games >>> Racing]

Link # 3 : www.rokiapps.tk
#11
Support / RE: Camera Problem
April 05, 2014, 12:17:14 PM
Hi Egon ,
A week back I posted about the problem I was facing with translation of object along with the camera. Well tried everything
that I can but still now results. So I am attaching the whole program with this post plz help me solve the problem.
I have also attached a README to pinpoint the issue. You can find it in the attached RAR :

Download Link : http://www.sendspace.com/file/j769yr

ASAP
#12
Support / Setting the Translate Path for an object
March 30, 2014, 02:39:24 PM
Hi Friends , WISH ALL A JOYFUL APRIL FOOL's DAY :P

Actually i was working on a Project regarding  a Prison.
In the prison there are 20 convicts . Out of 20 one is our hero & he has to escape the prison.
Now,
I have set up the Prison enviornment. It has JailCells , 2 Basketball Courts , Medicine Room , Cafe etc etc.

Now ,
The hero is controlled by the user using MotionTouch Events. So that's not a problem.
The problem is the rest of convicts operate by AI(Artificial Intelligence) so they have to be programmed.

Now ,
I want to set a Path for each konvict like :

Path Start (JailCell)     ->                               Path End (BasketBall Court)
So once the path is set set the object should translate itself from jailcell to the basketball court.

One thing is I simply translate(jail) -> translate(BBCourt) but that looks very robotic.

I want it to look humanly
To Egon : Like you have class ParticleManager , any class for PathMaker if YES please share

And also the object should avoid any collisions in between

What should I do , what is the most Optimised way of achieving this...
#13
Support / Camera Problem
March 29, 2014, 07:08:58 AM
Hi ,

There is a problem coming when i try to translate  my object and move the camera along with it

When both are done simultaiously there is a SHAKE

to be more specific if I do :
{
Object.translate(0,0,2);
Camera.moveCamera(new SimpleVector(0,0,2),1f);
} // There is a shake the engine tends to retaiate the object traslation are seem to shake

Plz tell me how i can smooth the camera movements....
#14
Support / About Particle Manager
March 25, 2014, 07:26:17 AM
The particle manager I want it to particulate a bigger image (size approx 120x120)

So what should I change in  the Particle class do it seems the particle is UVMapped and the particle you create contains one triangle
#15
Feedback / Google Glass
March 20, 2014, 06:16:34 AM
I don't know if I am being too Futureistic but I think Google Glass i as much a reality now and within a year it would be available on the Streets everywhere.
Now , What I want to know is (as I couldnt get much info from Google Glass website) what is the platform on which google glass runs. There are voice sensors , and I think the prism is also a sensor

Q 1 - Does Google Glass supports 3rd Party Programs
Q 2 - Does Google Glass runs on the same architecture (ie it has Android topped with Java)
Q 3 - Would JPCT be available for Google Glasses as if JPCT be available for Google Glasses 4D Games could be made practical
#16
Support / Video Capture
March 19, 2014, 10:38:37 AM
Ok now that the Game is developed it has to be posted to the market.
Great !!! Wait .. now wouldnt it be interseting if I could capture the Video of the game
during play.....it would be great for marketing right!!! but how...

Now I know it is quite possible as everytime a new Bitmap is created in onDrawFrame
or to be more specific frame...

So what I want is to somehow save each frame in image format
and then later on compile all these images into a single video file

Something like :
onDrawFrame(fb)
{
fb.clear(RGBCOLOR);
world.renderscene(fb);
world.draw(fb);
fb.display();
world.savecurrentframeimageBMP(OUTPUTSTREAM);
}

Can anybody tell how it can be made possible...
Something like taking ScreenShots....

Now that I think of it this technique can also be applied for making animated movies.

Eg : In the game music ride 2 posted in Projects (JPCT) there is video of game being played in realtime . 8)
#17
Support / Texture UVMapping
March 10, 2014, 10:33:47 AM
Just trying to make an Island model.
The Model loads perfectly (format .md2)
Created the Texture Map for the Model in UVMapping Software (Steve Cox)

I choose Planar Map , it creates the front and the back
But when I settexture in JPCT the texture are very qurky

Tried to create tile texture by group but still the texture are not at all applied properly.

What I want to know is what are the specifications for creating the Texture Map of an Model :
Which software should be used.
The Model was created in Milkshape3d then I exported it to MD2.
To create the Texture I exported the model .OBJ and opened it in UVMapper (Steve Cox)
-> New UV Map
Alignment Z-Axis
Split By Orientation
Orientation Horizontal

But the texturemap it creates does not at all orients with the model in the JPCT
What happens is simply the whole Bitmap is pasted on the Model

What could be the problem...
I have also tried it with calctexturewrap but to no use
#18
Support / AlienRunner Memory Ques
March 07, 2014, 07:07:02 AM
Hi Egon ,

Yesterday I downloaded AlienRunner source and was going through it in SurfaceCreated
there is piece of code something like this :
int[] memoryalloc = new int[1024*512*3];
memoryalloc[0] = 1; //use it
memoryalloc = null; // clean it
// 6 mb

Now as I can see here you are just creating 6 mb space in the memory(RAM) and then make that 6mb free
As memoryalloc is not used anywhere else then why are you doing this code.

Please help me understand and does it increase the efficency of APP
#19
Support / Problem with MergeObject
March 06, 2014, 10:12:50 AM
I am trying to create a Object by merging many objects on a Plane

It is something like say there is a Plane and on that Plane I want a House , a shop , some trees

So i do a mergeobjects
Something like this :
house.translatemesh();
trees.translatemesh();
shop.translatemesh();
finalobject = mergeobjects (finalobject,plane);
finalobject = mergeobjects (finalobject,house);
finalobject = mergeobjects (finalobject,shop);
finalobject = mergeobjects (finalobject,trees);
trees.translate(100,0,0);
trees.translatemesh();
finalobject = mergeobjects (finalobject,trees);
shop.translate(0,0,100);
shop.translatemesh():
finalobject = mergeobjects (finalobject,shop);
trees.translate(100,0,50);
trees.translatemesh();
finalobject = mergeobjects (finalobject,trees);

The final Object I get always have different rotations.
I will try to be more specific
The objects gets merged ok but Cam.lookAt(finalObject.gettransformedcenter());
the transformed center is different If I add more objects
I want the cam to always lookAt the planes transformed center
#20
Projects / Space Cop 3D
March 06, 2014, 07:15:05 AM
Hi Friends ,

Finished my first Project (HIPPO SHIP) now SPACE COP 3D as the name sounds better.
The Spaceship also got the NYPD lights. Fully Polished project ready , complete.

Feature :
- Infinite Gameplay
- Challenging Levels (Speed increase after 50000 points & then again after 100000)
- Cool Sounds
- WWW HiScorecard
- Keyboard Support (if can attach a keyboard to your tab/phone just use <- / -> DPAD)
- Android 2.x & >

ENJOY !!!!!