Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 ... 36
1  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-09-17 12:48:07
Having some progress with my beginner targeted C++ IDE:



P.S: Anyone to help me test this? PM me if you are interested.
2  Game Development / Game Mechanics / Re: Camera Rotation Problem on: 2014-09-16 12:56:37
Congratulations, by the way, your triangles are very amusing.. Did you make a museum of triangles?  Pointing

The image is corrected, thanks for pointing it out.
3  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-16 01:22:30
(ps: is it weird that my first language was C++ but then I found Java and totally abandoned C++?)

no, my first language is Java, but I do enjoy all the languages I code in.
4  Game Development / Game Mechanics / Re: Camera Rotation Problem on: 2014-09-14 01:38:05
Thanks for the correction, I'll correct it once I get back home from college. And, for the second problem, I translate the view matrix after rotation. It's too easy to forget that, check once. Thanks for your complement by the way.
5  Games Center / WIP games, tools & toy projects / Re: [Android] Chainsaw Cat (not playable until next week) on: 2014-09-12 15:50:52
Where's my CAT, liquid? Didn't find it in the screenshots.
6  Discussions / Miscellaneous Topics / Re: How to call police/ambulance from a different country on: 2014-09-12 13:29:18
@Drenius

It may not be helpful from his country, but if someone finds this page through search, he/she could be helped.
7  Discussions / Miscellaneous Topics / Re: How to call police/ambulance from a different country on: 2014-09-12 13:11:45
In India, 108 is ambulance and 100 is police station.
8  Discussions / General Discussions / Re: OpenGL learning resource on: 2014-09-11 17:23:24
Haven't read that book, but I can suggest taking a look at Opengl super bible 6th edition. Also grab glsl 4 shader cookbook.
9  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-09-10 14:43:59
Did some hacking today.

10  Discussions / Miscellaneous Topics / Re: What other programming languages do you use & why? on: 2014-09-08 17:11:42
I use C, C++, Java, C# and PHP:

C & C++ are part of college course, Java because it's my first language and I love it. C# because my friend doesn;t want to install java to run my games, so I port them to C# to run on windows natively and PHP for writing my own wordpress plugins.

Forgot to mention, I also use GLSL.
11  Game Development / Game Mechanics / Re: Camera Rotation Problem on: 2014-09-08 16:58:35
The problem there is in the Quaternion to Matrix conversion. I use this formula to do that.



The problem is that. In code, that becomes

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  
public static Matrix4f toRotationMatrix(Quaternion q, Matrix4f dest)
{
    if (dest == null)
        dest = new Matrix4f();
    else
        dest.setIdentity();

    // Normalize the quaternion
   q.normalise();

    // The length of the quaternion
   float s = 2f / q.length();

    // Convert the quaternion to matrix
   dest.m00 = 1 - s * (q.y * q.y + q.z * q.z);
    dest.m10 = s * (q.x * q.y + q.w * q.z);
    dest.m20 = s * (q.x * q.z - q.w * q.y);

    dest.m01 = s * (q.x * q.y - q.w * q.z);
    dest.m11 = 1 - s * (q.x * q.x + q.z * q.z);
    dest.m21 = s * (q.y * q.z + q.w * q.x);

    dest.m02 = s * (q.x * q.z + q.w * q.y);
    dest.m12 = s * (q.y * q.z - q.w * q.x);
    dest.m22 = 1 - s * (q.x * q.x + q.y * q.y);

    return dest;
}

One more thing, I've just written a tutorial on this topic in my LWJGL Tutorial Series: Click here.

Hope this helps.
12  Game Development / Newbie & Debugging Questions / Re: Player Movement based on Mouse Clicked on: 2014-09-07 02:40:15
You might want to take a look at my GObject class. It's so old (more than 3 years) but is written with swing in mind.

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  
/**
 * Moves this object to a specified point with a specific speed. Note that
 * the velocity used is independent of vertical or horizontal velocities of
 * this object.
 *
 * @param nx The new x-position
 * @param ny The new y-position
 * @param speed The speed with which to move
 * @return True if the new point has been reached
 */

public boolean moveTo(float nx, float ny, float speed)
{
    boolean _x = false;
    boolean _y = false;
 
    int distance = (int) Math.sqrt((double)((x - nx) * (x - nx) + (y - ny) * (y - ny)));
 
    float vel = Math.min(distance, speed);
    float newx = x;
    float newy = y;
 
    if (x > nx)
    {
        // We should move left
       newx -= vel;
    }
    else if (x < nx)
    {
        // We should move right
       newx += vel;
    }
    else
    {
        _x = true;
    }
 
    if (y > ny)
    {
        // We should move up
       newy -= vel;
    }
    else if (y < ny)
    {
        // We should move down
       newy += vel;
    }
    else
    {
        _y = true;
    }

    x = newx;
    y = newy;

    return (_x && _y);
}

I think that helps you. Call it with the coordinates reported by mouse click.
13  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-09-04 17:44:34
Found that webgl is working on chrome for mobile.

14  Game Development / Newbie & Debugging Questions / Re: *solved* Updating & Rendering in a timely fashion on: 2014-08-30 06:58:33
SHC -- Could you be more specific about your objections to the util.Timer?

There is no specific reason or objection, but I don't like them. I would like to quote Eli Delventhal's Game Loops article.

Quote from: Eli Delventhal
Decent loops, but I still wouldn't use them

I think I've seen the approach of using either java.util.Timer or javax.swing.Timer more often than any other approach (at least in amateur projects). This is nice because it saves you from having to deal with any part of the loop yourself, and it's more or less accurate. The reason for this is that neither of the two Timer classes are intended to be used as heavy-lifting tasks.

That's the only reason why I don't like those Timers in game loops. Hope this helps.
15  Game Development / Newbie & Debugging Questions / Re: What kind of game should a noob make for his first one? on: 2014-08-30 06:13:51
Pong is perfect (It's my first one too). Also SpaceInvaders would be fine.
16  Game Development / Newbie & Debugging Questions / Re: *solved* Updating & Rendering in a timely fashion on: 2014-08-29 06:52:43
Never, Never use Timer and TimerTask for game loops, they are mainly designed with Swing in mind and may not work well for a gameloop. A decent game loop should run as fast as it can, decoupling logic and rendering. (Don't go multithreading yet, that sounds nice in the start, but cause a lot of troubles if written incorrect)

I use a Fixed Timestep GameLoop and I set it up like this.

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  
public void run(int desiredUps, int desiredFps, int frameSkip)
{
    long now = System.nanoTime();
    long logicTime = System.nanoTime();
    long renderTime = System.nanoTime();

    long frameLogicTime = 1000000000 / desiredUps;
    long frameRenderTime = 1000000000 / desiredFps;

    int skippedFrames = 0;

    while (true)
    {
        if (Display.isCloseRequested())
            break;

        now = System.nanoTime();
        skippedFrames = 0;

        while (logicTime + frameLogicTime < now && skippedFrames < frameSkip)
        {
            update();
           
            skippedFrames++;
            logicTime += frameLogicTime;
        }

        while (renderTime + frameRenderTime < now)
        {
            render();
            renderTime += frameRenderTime;
        }
    }
}

If you use this, make sure that frameskip is atleast 1.  I recommend to give a reading to the following articles.


Hope that helps!
17  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-08-27 17:34:53
Made my first Android Hello World

18  Discussions / General Discussions / Re: dart on: 2014-08-27 11:53:29
What's that language?
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-08-27 05:44:01
learned about drawbuffer blending and rewritten a grid shader


Hey, It's the model of Kubera!!
20  Games Center / Showcase / Re: Color Mix on: 2014-08-24 15:31:13
Awesome game. Is it also available to android?
21  Games Center / WIP games, tools & toy projects / Re: [RTS] Clash Tune : tune your armies, clash enemies ! on: 2014-08-24 15:00:52
 Pointing  I'm interested!!!
22  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Slick2D not drawing Images? on: 2014-08-23 15:54:18
Maybe an error with the PNG image. Did you try other images?
23  Games Center / Showcase / Re: CustomRPG - A fully customizable role playing game! on: 2014-08-22 16:09:48
And to remove www from link, use

1  
[url=http://aivgames.com]aivgames.com[/url]
24  Games Center / Showcase / Re: CustomRPG - A fully customizable role playing game! on: 2014-08-22 15:59:28
A perfect website should redirect users when they use the deprecated www subdomain. Try adding a CNAME record to your DNS.
25  Game Development / Newbie & Debugging Questions / Re: GLSL Lighting a 3D box on: 2014-08-22 15:50:45
You shouldn't reset the buffers, you should rewind them.
26  Games Center / Showcase / Re: CustomRPG - A fully customizable role playing game! on: 2014-08-22 15:47:51

Your site is not working. At least no game on it.
27  Game Development / Newbie & Debugging Questions / Re: How can I implement camera rotation into my collision detection? on: 2014-08-21 03:31:47
You didn't get the basic idea. Think the scene as empty space. Y is up, X is towards right and Z is coming out towards you (out of monitor, of-course). This space is called as the world space. Now, for the case of objects, every object is composed of vertices. Here the vertices are in the object space, they have position inside relative to the object, and as a whole, they are transformed by scaling, translating, or rotating into the world space.

Think of the camera, as just another object in the world. you can position it anywhere you want, and rotate to change the scene what is viewed when seen through it. Therefore, the camera should not affect the collisions in the world. Usually, you wrap up your objects in a sphere or an aabb and test them for collisions. The shapes you use should also move along with the object, that is, whatever transformation you use, will also apply to the colliding shape (We should only apply transformations like translation and rotation, and not of the camera's of-course).

There, in the world space, you will test your objects for collisions and apply transforms according to your collision response. Only then, you apply the camera to the entire scene and then project it to the screen. Usually, these are only applied in the shader level.

Hope you got it now.
28  Game Development / Newbie & Debugging Questions / Re: How can I implement camera rotation into my collision detection? on: 2014-08-21 02:53:45
Camera is only for controlling what is viewed on the screen and from where you look. Collisions should not use the camera, they should be done as they are, camera rotation should not affect collision detection.
29  Discussions / Business and Project Management Discussions / Re: Game Programmer looking for Team on: 2014-08-21 01:48:14
You can have a mod to move this post. Other than that, I don't think this post is written by a kid, it seems somewhat professional (not in the details, but in the style). And one more thing, swing is not a game library and isn't tailored for making games. Before all this, I recommend to learn some game engine like LibGDX, it help's you a lot.
30  Discussions / Miscellaneous Topics / Re: How often do you code on: 2014-08-20 12:02:14
Its not the number of hours you code, it is how productive you are that matters.
Pages: [1] 2 3 ... 36
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (28 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (74 views)
2014-09-10 06:39:09

Tekkerue (37 views)
2014-09-09 02:24:56

mitcheeb (57 views)
2014-09-08 06:06:29

BurntPizza (45 views)
2014-09-07 01:13:42

Longarmx (28 views)
2014-09-07 01:12:14

Longarmx (34 views)
2014-09-07 01:11:22

Longarmx (34 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!