Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (527)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
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 ... 5
1  Game Development / Newbie & Debugging Questions / JFileChooser, language support on: 2007-08-28 14:25:49
I am wondering, is there any way of replacing these

"Look in"
"File Name"
"Type of File"
"Cancel"

With language strings so I can support more than English? Am I wrong, maybe those translations already exist in Java but I need to set the localization somehow to get them??
2  Java Game APIs & Engines / Java 3D / Re: Converting C++ directx code to Java, easy? on: 2007-08-08 10:33:34
Wow, that was a quick reply!
So you were able to mix them, that is great!
That is also what I intend to do on my project if I switch to openGL since the Swing UI is fast enough so I want to keep the advantages of the already built Swing components to not have to reinvent the wheel  Smiley
3  Java Game APIs & Engines / Java 3D / Re: Converting C++ directx code to Java, easy? on: 2007-08-08 10:15:23
Doing openGL means switching to at leist a AWT Canvas. So wondering, has anyone tried mixing openGL with Swing? I have a JFrame which contains 3 swing JPanel and where my map and drawing is done in the center one. So one northPanel, southPanel, centerPanel

Is it possible to have the openGL canvas in center while still using Swing components in the north and south without them interfering with each others because that would be GOLD and means the switch from Swing to openGL would be much easier.
4  Java Game APIs & Engines / Java 3D / Re: Converting C++ directx code to Java, easy? on: 2007-08-01 07:28:39
you shouldn't need to download the lwjgl source jar, the full slick download comes with all the dependancies its needs (unless you are using an OS other than windows in which case you'll have to grab the natives for that version of lwjgl), you just need to add the lwjgl.jar to your external jar path.

You are correct, the JWGL is inside the Slick. But regardless, both the jar files and the.Java files misses classes like GL11 for example. I placed all jars in the same place where I placed Jogg and Jorbis jars that I used from before but I cannot import certain classes because they do not exist.

Also, downloaded GL11.java from the Internet but when I compile I get


"GL11.java": illegal character: \64 at line 717, column 22"
"GL11.java": <identifier> expected at line 717, column 50"
...
...
...

errors everywhere



example of methods that give error.
void glAccum(@GLenum int op, float value);
5  Java Game APIs & Engines / Java 3D / Re: Converting C++ directx code to Java, easy? on: 2007-07-31 22:16:23
Downloaded these 2 packages
lwjgl-source-1.1.zip
slick.zip

and extracted them in the correct path and tried using Slick.

There are still source files missing when I try to import
for example

import org.lwjgl.opengl.GL11;

By the way I am using Java 1.4 still (because my JDE does not support newer Java) now if that would have anything todo with it.
6  Game Development / Performance Tuning / Re: Java 7 and Swing, slow? on: 2007-07-30 20:31:34
I am mostly drawing png's.
7  Game Development / Performance Tuning / Java 7 and Swing drawing graphics, slow? on: 2007-07-30 20:16:21
When I switched from my Java 5 to Java 6 my Swing drawing lost like 75% of its drawing speed so I had to basically either stay with Java 5 or switch to Java 6 and convert all my code using some better graphics engine. I chose to stay with Java 1.5 for the moment.

Now with Java 1.7 out, has anyone tried it and does it work well drawing Swing or do I need to get away from Swing to get enough frame rates to make a 2D game?
8  Java Game APIs & Engines / Java 3D / Converting C++ directx code to Java, easy? on: 2007-07-25 20:08:22
I have a pretty ok codebase in Java now but would like to speed up my drawing. I am currently using pure swing so I am totally platform independant. I have contact with a company that hold a good graphics engine written in C++ using DirectX.

Also, by the way I have 7 years experience in Java but only 1 year experience in C/C++

So, my question is what would generally be easiest?

1) Convert the C++ code to Java
or
2) Use my existing Java code and build my own graphical Java code for openGL or DirectX
or
3) Convert my whole codebase to C++ so I can use their Graphics

Please motivate your answer, this is a big decision for me to take  Smiley
9  Game Development / Newbie & Debugging Questions / Reading Unicode. on: 2007-06-25 11:39:50
I have code for reading a text file using

FileReader
StringTokenizer

The text file I had was ANSI. I now need to be able to read Unicode to support more languages. As soon as I made it a Unicode text file instead then my code threw exceptions instead. Why?
10  Game Development / Newbie & Debugging Questions / Re: Protecting Java code, how? on: 2007-06-11 14:32:42
>[...]rather protecting from ppl stealing code or entire classes using it as their own source code for making games.

Oh that... well, that won't happen. Most people don't even use stuff from non-obfuscated commented code, because it relies to much on other classes. And even if someone would use some of my utility methods... so what? All my reusable stuff will be opensource anyways. Smiley

Ok, but I am talking about software being sold online and retail perhaps on several platforms so that is why I need to worry about ppl "steal and code reuse". Smiley
11  Game Development / Newbie & Debugging Questions / Re: Protecting Java code, how? on: 2007-06-11 14:16:41
obfuscating your code so that all variable names and class names are obfuscated and put into a single package/directory will pretty much prevent your code being stolen, even if the classes are decompiled they will be completely uncommented and variables names unmeaningful, the amount of effort it would take to find, understand, to make the code usable would simply not make sense and it would be easier to write your own code from scratch. Besides theres also the legal deterrent if they are caught stealing your code.

Ok, but if the code is like 200 classes spread out on 10 packages would that mean it was much easier for someone to pick out certain classes?
12  Game Development / Newbie & Debugging Questions / Re: Protecting Java code, how? on: 2007-06-11 13:59:13
Cracking a Java app is more work then cracking a native one. Disabling usual CD checks takes average non-programmer Joe 2 minutes. Crack generation included. The required knowledge fits on a postcard.

Even without any obfuscation Java is better "protected", because it requires more knowledge and time.

Note that I do not mean copy protection or piracy but rather protecting from ppl stealing code or entire classes using it as their own source code for making games.
13  Game Development / Newbie & Debugging Questions / Re: Protecting Java code, how? on: 2007-06-11 13:11:40
An obfuscator can certainly do the trick as it produces code that, if you decompile it, can't be compiled again.

However, an obfuscator can also introduce problems. I've tried it some time ago (not for protecting my code, but to make the jar smaller), and at that point the obfuscated code wouldn't run on Java6 anymore (that issue was fixed later with a new release of the obfuscator).

But what exactly is your reason for protecting your code?
It's true that decompiling java is easier than with C, but with C it's still perfectly possible. In fact all binaries can be hacked and it's also not too difficult, which explains why almost all programs' copy protection is cracked even before they appear on the shelves.
If people want to crack your software, they will, and no obfuscator will really protect you from that.

So, why did they sue Microsoft for not showing the source code for Windows if it is that easy? Did it have something to do with themselves being afraid being sued if they went into Microsoft code? I searched on google today and found a software named Mocha that could decompile Java code and then you would be able to compile it again. On the same webpage there was a software that would prevent the Mocha from doing it by using this so called Crema software. Is that just waste of time because I recon there are certain ways of hacking that as well?

http://www.javaworld.com/javaworld/javatips/jw-javatip22.html
14  Game Development / Newbie & Debugging Questions / Protecting Java code, how? on: 2007-06-11 12:22:16
EDIT:
I was not clear enough, I did not mean protection from hack+piracy but rather protection from others hacking and ripping away copyrighted well structured code that they can use as their own source code when making games.



I heard that Java code is easy to decompile, can someone with knowledge in these kind of things explain that abit? I am wondering if it is possible to protect my code from being reverse compiled or not. I use obfuscator but is that really enough?

Was not Microsoft sued for not sharing their source code to other developers making integration to Windows difficult for the competing businesses? But windows is an Operating System and built from C++ so the lower the leve the easier to protect a code? It is obviously not so easy to decompile everything else they would have already done that with windows? Can someone compare the languages and compare other factors that decide this?

15  Game Development / Newbie & Debugging Questions / Re: Running and communicating with exe files from Java. on: 2007-06-07 22:34:01
are you sure you are reading the data correct in the started exe?

No, I did not make the exe myself. So, my code looks ok then? I should be talking to the guy who made that exe then.
16  Game Development / Newbie & Debugging Questions / Re: Running and communicating with exe files from Java. on: 2007-06-07 22:08:31
flush

I tried 2 ways:

i)
bos.write(123456);
bos.flush();


ii)
bos.write(123456);
process.getOutputStream().flush();


neither worked
17  Game Development / Newbie & Debugging Questions / Re: Running and communicating with exe files from Java. on: 2007-06-07 17:02:24
It was easy starting an exe and getting return value. But now I want also to send parameters to it, alternatively start the exe with a parameter.

So, I tried.

Process process=Runtime.getRuntime().exec(Global.getInstallPath()+"myfile.exe");
     BufferedOutputStream bos = new BufferedOutputStream(process.getOutputStream());
bos.write(123456);


It seems the exe never receive those numbers and I do not know why...

18  Game Development / Newbie & Debugging Questions / JRE size. on: 2007-06-07 09:00:16
The JRE seems to be 60-70 megs on the HD with roughly half of the size being jar files. Wondering, are these jar files (one is 35 megs) necessary or are they a doublette of something?

jre/lib/rt.jar is 35 megabytes, can it be deleted?


Also, is it even allowed by Sun to modify the JRE , I do not think so?
19  Game Development / Newbie & Debugging Questions / Re: Running and communicating with exe files from Java. on: 2007-05-24 16:43:54
Bah!
Was kind of easy   Grin

Process process=Runtime.getRuntime().exec("blablabla.exe");

      int i=process.waitFor();
20  Game Development / Newbie & Debugging Questions / Running and communicating with exe files from Java. on: 2007-05-24 14:44:26
I want to be able to start a windows exe from my Java and also communicate with. Say I send it some parameter and also when that exe is done to get its return value.

Runtime().getRuntime().exec

is that the way? How about the parameter passing between the exe and my Java game?
21  Game Development / Newbie & Debugging Questions / Re: Reading a file from CD/DVD. on: 2007-05-13 20:35:28
Thanks, saves me alot of time not trying to find something that does not exist Smiley
22  Game Development / Newbie & Debugging Questions / Reading a file from CD/DVD. on: 2007-05-13 11:08:01
The java.io has alot of classes for reading and writing. I know I can use the path of my CD/DVD player to make java read from it but if I did not know the path, how can I detemine that during runtime i.e what path my primary cd/dvd device has?
23  Game Development / Newbie & Debugging Questions / Modify the insets. on: 2007-05-11 11:00:44
When I am building a GridBagLayout i want to be able to come back and change settings later on. Reason is that I am doing a code reuse where I have a parameter named "boolean ripped" that determines if I want to show a small version of the panel. The small version might set some aubpanel to have size 0 effectively not showing certain parts of the panel.

I also want to be able to adjust insets

basicall

if(ripped==true)
{
blahblah;
blah;
blahblahblah;
}

so inside those begin and end I want to be able to modify insets. how?
I can easily fix it on creation but what if I want to be able to have a already created object with gridbaglayout and change the insets afterwards?
24  Game Development / Newbie & Debugging Questions / Re: Distribute Fonts, how? on: 2007-05-09 09:41:31
Is there a way to check whether a certain font exist on the machine so that I can pick a reserve font to use? I notice this already happens but I want to be able to select what font i want to use.
25  Game Development / Newbie & Debugging Questions / Distribute Fonts, how? on: 2007-05-09 08:55:06
I am using Haettenschweiler for my Java Game and some ppl do not have it installed on their computers, hence it is no standard font. Is there a way (what about copyright) to distribute a font with my java game?
26  Game Development / Newbie & Debugging Questions / Component Orientation, TOP to BOTTOM. on: 2007-04-30 13:26:27
I am using Gridlayout with 30 rows and 1 column. Thinking of using 15 rows and 2 columns instead but I want to list the first 15 to the left and the last 15 to the right


1 2
3 4

is not what I want

instead

1 16
2 17
3 18
4 19
5 20
6 21
7 22
8 23
9 24
10 25
11 26
12 27
13 28
14 29
15 30



Any way to do it?
27  Game Development / Networking & Multiplayer / Re: ObjectInputStream for tcp/ip gaming, can message B arrive before message A? on: 2007-04-28 22:38:55
I think I might have found the problem. Will be able to see later on when I buy a second computer. The 2 threads I have all add their results into one OrderThread in game that has vector storing up all stuff and performing it into the game. Since both threads access the same OrderThread some problem may occurr. I have put synchronized keyword on all the public methods in the OrderThread class now, so I will see if that solve it Smiley
28  Game Development / Networking & Multiplayer / Re: ObjectInputStream for tcp/ip gaming, can message B arrive before message A? on: 2007-04-25 20:06:05
I have one thread running for chat and one for other actions and those 2 have separate ports. Despite that, I have experienced crashes that seem to occur when using the chat.

If I have a chat and both players send simultaneously then it woudl not crash?
Meaning, it is probably that the 2 different threads interfer somehow despite on different ports?
I am going to buy a second computer soon so that I can easier provoce these crashes myself and get an answer.
29  Discussions / General Discussions / Re: alt+tab sometimes (5-10% of the time) freezes the display in Windows XP. on: 2007-03-22 14:19:41
Almost certainly a driver issue of some sort.

Cas Smiley

I heard other ppl also had the same problem. So is it a bad driver for the graphic card or for the display and is there no way for me to work around it?

If it is correct what you are saying then I should thank you very much because else I would probably spend alot of time (which I already have) bumping my head against a wall if I think it is the Java code fault.

So, is there no way to see that alt+tab coming and quickly set the full screen off before the alt+tab comes into effect (also tried it but never go it to work)?
30  Discussions / General Discussions / Re: alt+tab sometimes (5-10% of the time) freezes the display in Windows XP. on: 2007-03-22 12:13:54
Yes, a pure Swing application with NO openGL or anything.
Pages: [1] 2 3 ... 5
 

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

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (73 views)
2014-11-26 15:22:04

toopeicgaming1999 (63 views)
2014-11-26 15:20:36

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

SHC (29 views)
2014-11-25 12:00:59

SHC (27 views)
2014-11-25 11:53:45

Norakomi (32 views)
2014-11-25 11:26:43

Gibbo3771 (27 views)
2014-11-24 19:59:16

trollwarrior1 (40 views)
2014-11-22 12:13:56

xFryIx (78 views)
2014-11-13 12:34:49

digdugdiggy (57 views)
2014-11-12 21:11:50
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!