Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (541)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
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 4
1  Game Development / Newbie & Debugging Questions / Re: Running .jar error main class not found. on: 2014-12-27 10:42:58
Quote from: Dreamtime link=topic=35173.msg333056#msg333056

Edit: My manifest.txt for the jar file is just "Main-Class: Game"

1. We first create a text file named Manifest.txt with the following contents:

Main-Class: MyPackage.MyClass

Warning: The text file must end with a new line or carriage return. The last line will not be parsed properly if it does not end with a new line or carriage return.

========================
2. How your classpath is defined?
2  Game Development / Newbie & Debugging Questions / Re: Running .jar error main class not found. on: 2014-12-23 18:20:14
maybe extra char occurred in manifest: trailing space, \r\n -> \r, eof?
3  Game Development / Newbie & Debugging Questions / Re: 3D GPU animation skinning issue on: 2014-12-12 06:00:37
It seems that the influences are assigned wrongly, at least.
4  Game Development / Newbie & Debugging Questions / Re: Initialising variables in a constructor or in the class body on: 2014-12-05 17:48:18
AFAIK, Compiler will make the first class def. from the second.
5  Discussions / General Discussions / Re: Parsing SVG files on: 2014-11-30 17:02:21
Hi,

I've found one more library for SVG rendering: JFreeSVG 
6  Game Development / Artificial Intelligence / Re: Make an Entity in 3D face a specific angle? on: 2014-11-27 13:01:58
I have found the similar case. Hope it will help.

http://www.java-gaming.org/index.php?topic=21947.0
7  Game Development / Artificial Intelligence / Re: Make an Entity in 3D face a specific angle? on: 2014-11-26 14:32:36
Please, post some more code.
8  Game Development / Artificial Intelligence / Re: Make an Entity in 3D face a specific angle? on: 2014-11-26 07:39:57
At least, your code should look like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
double theta = Math.atan2(dz, dx), angle = this.getRotY() + Math.toDegrees(theta);
 //dz and dx are the sides of the triangle that I use for distance
         
if (angle == 0)
   increaseRotation(0, 0, 0);
else if (angle > 180)
        increaseRotation(0, (float) (-angle), 0);
else
        increaseRotation(0, (float) (angle), 0);
9  Discussions / Miscellaneous Topics / Re: C#, did Microsoft just want to be different? on: 2014-11-25 10:32:40
IIRC, something similar was in C++ v1  Huh
10  Game Development / Newbie & Debugging Questions / Re: LibGDX ClassCastException on: 2014-11-22 07:35:36
Maybe you put a String value in properties somewhere?
11  Game Development / Newbie & Debugging Questions / Re: Create a simple box with a texture !!! on: 2014-11-21 19:30:29
Try to add flag Box.GENERATE_TEXTURE_COORDS to Bpx ctor call.
12  Game Development / Newbie & Debugging Questions / Re: TransparencyInterpolator with Text3D on: 2014-11-18 17:18:18
I hope here is what you need.
13  Game Development / Networking & Multiplayer / Re: Three Solutions to UDP's Critical Packet Loss on: 2014-11-17 19:05:20
Solution Two
... This cycle is repeated until a valid confirmation packet arrives.
I think it is better:
This cycle is repeated until a valid confirmation packet arrives, or connection timed out.
14  Discussions / General Discussions / Re: Parsing SVG files on: 2014-11-16 07:48:02
I've found some links:

http://xmlgraphics.apache.org/batik/

Android
https://code.google.com/p/andengineexamples/
https://code.google.com/r/newtondev-svg/

Qt
http://qt-project.org/wiki/QtWhitepaper
rendering-vector-graphics-in-opengl Look at 1st answer
http://qt-jambi.org/ Qt Jambi - Qt for Java

http://sourceforge.net/projects/libsugar/
15  Game Development / Game Mechanics / Re: SMD skeleton problems on: 2014-11-15 09:53:21
I  not entirely get how do you convert the bones.
As i realize SMD bones are, in fact, joints.
so, an8 bones = SMD bones - 1.

What do you think?
16  Game Development / Game Mechanics / Re: SMD skeleton problems on: 2014-11-14 18:51:03
i tried switching roty and rotz. just got a different weird looking skeleton
It seems we simplified the solution overly Undecided Smiley.
Insert this for positions:
1  
2  
3  
+   temp = sb.y;
+   sb.y= sb.z;
+   sb.z = -temp;
17  Game Development / Game Mechanics / Re: SMD skeleton problems on: 2014-11-14 16:39:09
i tried switching roty and rotz. just got a different weird looking skeleton
not just switching but also negating rotz.
18  Game Development / Newbie & Debugging Questions / Re: Ant javac classpath problem on: 2014-11-11 09:50:30
Which version  of ant do you use?
19  Game Development / Game Mechanics / Re: SMD skeleton problems on: 2014-11-09 17:38:29
for SMD x is left, y is forward, z is up.
in anim8or, x is left, y is up, z is forward.
how do i convert rotation between these 2 systems?

I think z-up to y-up conversion may be done in this way:

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  
for(int x=0;x<bones.size();x++)
{
    smdbone sb=bones.get(x);
         
    Quat4f orientation= new Quat4f();
    float length;
     
     
    Quat4f xrot=new Quat4f();
    xrot.set(new AxisAngle4f(1,0,0,sb.rotx));

+   float temp;
+   temp = sb.roty;
+   sb.roty= sb.rotz;
+   sb.rotz = -temp;
       
    Quat4f yrot=new Quat4f();
    yrot.set(new AxisAngle4f(0,1,0,sb.roty));
     
    Quat4f zrot=new Quat4f();
    zrot.set(new AxisAngle4f(0,0,1,sb.rotz));
     
     
    orientation.set(xrot);
    orientation.mul(yrot);
    orientation.mul(zrot);
     

    String pname;
    if(sb.parent==null)
    {
            length=2;
            pname="root";
    }
    else
    {
            length=new Vector3f(sb.x,sb.y,sb.z).length();
            pname=sb.parent.name;
    }
         
         
    Bone b = new Bone();
    b.name=sb.name;
    b.length=length;
    b.orientation=orientation;
         
    fig.getbone(pname).subbones.add(b);
}
20  Game Development / Game Mechanics / Re: SMD skeleton problems on: 2014-11-08 07:43:47
where did you get that code from?

Home page:
http://texel3d.free.fr/projets/ani2pov/

Code fragment:
link
21  Game Development / Game Mechanics / Re: SMD skeleton problems on: 2014-11-05 17:14:27
Maybe it could help you as a hint:
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  
   
for( int bone = 0; bone < (int)pFigures[i_Fig].m_FigureHelper.vBones.size(); ++bone)
      {
         if( bone > 0 )// Not a parent
         {
            fprintf(_File,"%d %f %f %f %f %f %f\n",
                  bone,
                  pFigures[i_Fig].m_FigureHelper.vBones[bone].Translation.x,
                  pFigures[i_Fig].m_FigureHelper.vBones[bone].Translation.y,
                  pFigures[i_Fig].m_FigureHelper.vBones[bone].Translation.z,
                  pFigures[i_Fig].m_FigureHelper.vBones[bone].Rotation.x, // rot X
                  -pFigures[i_Fig].m_FigureHelper.vBones[bone].Rotation.z,// rot Y
                  pFigures[i_Fig].m_FigureHelper.vBones[bone].Rotation.y // rot Z
                  );
         }
         else
         {
            fprintf(_File,"%d %f %f %f %f %f %f\n",
                  bone,
                  pFigures[i_Fig].m_FigureHelper.vBones[bone].Translation.x,
                  pFigures[i_Fig].m_FigureHelper.vBones[bone].Translation.y,
                  pFigures[i_Fig].m_FigureHelper.vBones[bone].Translation.z,
                  pFigures[i_Fig].m_FigureHelper.vBones[bone].Rotation.x-1.561606f, // rot X
                  -pFigures[i_Fig].m_FigureHelper.vBones[bone].Rotation.y,// rot Y
                  pFigures[i_Fig].m_FigureHelper.vBones[bone].Rotation.z // rot Z
                  );
         }
      }
 


It's a fragment of the program (in C++) converting an8 to smd.
22  Game Development / Game Mechanics / Re: SMD skeleton problems on: 2014-11-03 10:53:20
Hi deepthought,

The third trial.  Smiley

The SMD file contains a position of the end of the bone relative to the parent and 3 euler angles for orientation

Are you sure it's alright with degrees-to-radians converting?
AxisAngle4f accepts radians I guess.
23  Game Development / Game Mechanics / Re: SMD skeleton problems on: 2014-11-02 15:23:36
Try to normalize quaternion after multiplication.
1  
2  
3  
4  
 orientation.set(xrot);
      orientation.mul(yrot);
      orientation.mul(zrot);
     orientation.normalize();
24  Game Development / Game Mechanics / Re: SMD skeleton problems on: 2014-11-02 10:28:20
I'm afraid you calculate bone length incorrectly.
The SMD file contains a position of the end of the bone relative to the parent
1  
length=new Vector3f(sb.x,sb.y,sb.z).length();

Hope this will work:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
Vector3f boneEnd;
if(sb.parent==null)
         {
            boneEnd = new Vector3f(sb.x,sb.y,sb.z);
            pname="root";
         }
         else
         {
            boneStart=boneEnd;
            boneEnd = new Vector3f(sb.x-boneStart.x,sb.y-boneStart.y,sb.z-boneStart.z);
            pname=sb.parent.name;
         }
length=boneEnd.length();
25  Game Development / Newbie & Debugging Questions / Re: Hanging networking code? (Client I/O Init) on: 2014-10-18 06:03:09
I think your init code should contain something like this:
Server:
1  
2  
3  
4  
ServerSocket serverSocket = new ServerSocket(portNumber);
    Socket clientSocket = serverSocket.accept();
    bos = new BufferedOutputStream(clientSocket.getOutputStream());
    bis = new BufferedInputStream(clientSocket.getInputStream());

Client:
1  
2  
3  
Socket socket = new Socket(hostName, portNumber);
    out = new BufferedOutputStream(socket.getOutputStream());
    in = new BufferedInputStream(socket.getInputStream());
26  Discussions / Miscellaneous Topics / Re: What are Anti-Virus Developers Protecting us From? on: 2014-04-18 16:20:27
kaspersky removes files without asking and you can't restore it. It destroyed my custom sound-driver and it killt the software I used for playing with www.hackthissite.org and some other stuff. (And yes the software was clean)
I agree, Kaspersky treats the term  "malicious software" too widely.
27  Discussions / Miscellaneous Topics / Re: What are Anti-Virus Developers Protecting us From? on: 2014-04-14 09:29:02
They are, in fact, a massive con... Everything else is either selling fear or misguidedly unhelpful.
Agree.

The only AV checker you ever need is MS Security Essentials on Windows.
MSSE overlooks many of threats
28  Game Development / Newbie & Debugging Questions / Re: How to create a control panel next to a Canvas object in a JFrame? on: 2014-04-14 09:18:39
I wanted to do something like this. It's basically a JFrame consisting of a Canvas on one side, and something on the other side.
Most likely you should use JSplitPane
29  Game Development / Newbie & Debugging Questions / Re: Swing JComboBox problem. on: 2014-04-09 10:44:58
I think it's what you looking for: http://tips4java.wordpress.com/2013/11/17/combo-box-with-custom-renderer/
30  Game Development / Newbie & Debugging Questions / Re: My most inefficient way of implementing running texts. How to optimize? on: 2014-04-09 10:25:36
Couldn't find the right way to make it stop adding text to the already-36-characters-long "line" variable (not the "lines" ArrayList variable.).
I think you should check max height of the text that can be inserted in the window.

Also, IIRC, if the word > MAX_STRING_LENGTH it should be split on 2 parts:
first part =< MAX_STRING_LENGTH, the remainder is moved on the next line.
Pages: [1] 2 3 4
 

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

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (10 views)
2014-12-27 04:03:04

TheDudeFromCI (13 views)
2014-12-27 02:14:49

Mr.CodeIt (25 views)
2014-12-23 03:34:11

rwatson462 (56 views)
2014-12-15 09:26:44

Mr.CodeIt (46 views)
2014-12-14 19:50:38

BurntPizza (92 views)
2014-12-09 22:41:13

BurntPizza (113 views)
2014-12-08 04:46:31

JscottyBieshaar (84 views)
2014-12-05 12:39:02

SHC (94 views)
2014-12-03 16:27:13

CopyableCougar4 (102 views)
2014-11-29 21:32:03
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

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
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!