Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Wireless Tool Kit  (Read 8243 times)
0 Members and 1 Guest are viewing this topic.
Offline bajen77

Junior Newbie





« Posted 2007-04-04 18:55:32 »

I have a game that works in the wireless tool kit but when i run it OTA in the wireless tool kit it doesnt work. The music works but no Images is shown, a error message in the wireless toolkit " java/Lang/ null pointer exception" I dont understand what is wrong when it works when it is run without the ota. Regards Mick
Offline aNt

Senior Member




AFK


« Reply #1 - Posted 2007-04-06 15:34:43 »

probably doesnt work in the WTK dude- try it on a real phone. how does it do there?
Offline bajen77

Junior Newbie





« Reply #2 - Posted 2007-04-07 02:22:17 »

Havent tried it on a real phone. new to this so i havent learned how to instal to phones yet. Just strange that it work on wtk on ordinary run but not in ota in wtk
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline OverKill

Junior Member




Java games rock!


« Reply #3 - Posted 2007-04-10 09:30:31 »

Some more info would be great.

The WTK is one of the best emulators out there (even if it has that stupid top bar crap).

* what do you mean by 'ota'? What are you doing 'ota'?
* where do you get your images from? jar or also ota?
* where do you get that null pointer from? Track it down!

ps: when you start the wtk, do it from dos. then all system.out.printlns will be written to the console. Ah the wonderful world of j2me debugging.
Offline bajen77

Junior Newbie





« Reply #4 - Posted 2007-04-10 11:48:15 »

In wtk ota is a option for testing, over-the-air. The game is getting installed to the emulator when it is run through ota. The error message is uncaugth exception, nullPointer. Cant track it down cause it doesnt give any information in what class or anything.
Offline OverKill

Junior Member




Java games rock!


« Reply #5 - Posted 2007-04-10 13:58:40 »

Ah ok. Was just that OTA is a often used in other contexts.

Have you checked the Jad File?

NullPointer:
That is the problem with j2ME.
How far do you get with the installation? Does the app start?
Put some sysouts into the entry points: main class constructor and startapp.
Offline bajen77

Junior Newbie





« Reply #6 - Posted 2007-04-10 17:18:37 »

Can it be that i have to many actor objects to paint out to the screen, I have about 50 enemies on the first level. Maybe I should make different threads for collisionstest and all other tests?
Offline OverKill

Junior Member




Java games rock!


« Reply #7 - Posted 2007-04-10 17:41:34 »

Have you done what I wrote? Have you checked how far you get?

Oh sure that could be, are they requesting repaints? If so remove that. Have only one place where you render.
Double-buffering would help.

More threads won't help. Actually they will hurt more because your actual device will have a limited processor and you can only go so far.
The sync time will kill your app.

If anything, remove threads. Get everything into one rendering and update loop. (if it is turn based, then you can have a thread do the update cycle so your main thread can continue rendering, but only for TBS games, because the player can wait).

50 enemies is a lot. Look into collision optimisations like BSPs or quad trees.
Offline bajen77

Junior Newbie





« Reply #8 - Posted 2007-04-10 17:52:45 »

The apply does start. The backgrond color is painted on the screen but not the images and sound. I do not request repaint(). There is a automatic paint in the end of the loop, the repaint is controlled by the loop time sequence. I will look into doubble buffering and quadTree. But when it comes to collision, painting and other actions I have made it to be unactive until the player is close to the so all actors and collision testing does not happen.
Offline bajen77

Junior Newbie





« Reply #9 - Posted 2007-04-10 21:12:25 »

I have been using flushGraphics if that is what you mean double buffer. Maybe there is  better way to do double buffer?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline OverKill

Junior Member




Java games rock!


« Reply #10 - Posted 2007-04-11 08:53:55 »

Ah so it does get far enough.

Can you disable sound/images and see if that helps?

flushGraphics is ok. GameCanvas has a double buffer on the inside.

In the end it could just be a WTK problem and will never happen on the end devices.
Though it is still good to have safeguards in your code so when other devices start bitching, you can at least eliminate those parts as possible wrong-doers.

BTW: Is this project intended to be ported to other devices or just a college project?
If the former, you might want to look into using a preprocessor.
I used to have try-catches wrapping the content code of each method that was only added on demand (otherwise it would really slow down the app). This helped track down those wierd bugs.
Offline Abuse

JGO Coder


Medals: 11


falling into the abyss of reality


« Reply #11 - Posted 2007-04-12 13:44:14 »

One possibility:

When running from the file system (under windows), accessing resources is case insensitive.
As soon as you deploy the build to a jar, it becomes case sensitive.

I'd suggest you check all your resource names for correct case.

Beyond that, stop using the WTK in its stand-alone configuration.
I suggest (atleast to begin with) you change over to Eclipse, with the EclipseME plugin - it is a much more productive working enviroment.

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline bajen77

Junior Newbie





« Reply #12 - Posted 2007-04-12 15:42:57 »

I will try to install the game on a real phone and see if it works. And after that I will look deeper into the code. It might be a install problem. The game is a hobby project that is intended to be published for downloading to phones.
Offline jtwome

Junior Newbie





« Reply #13 - Posted 2008-02-05 01:26:46 »

Try to catch Throwable on every thread, and print stack trace on the catch clause.

-------
Javatech
java games
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

pw (12 views)
2014-07-24 01:59:36

Riven (10 views)
2014-07-23 21:16:32

Riven (11 views)
2014-07-23 21:07:15

Riven (12 views)
2014-07-23 20:56:16

ctomni231 (42 views)
2014-07-18 06:55:21

Zero Volt (38 views)
2014-07-17 23:47:54

danieldean (32 views)
2014-07-17 23:41:23

MustardPeter (34 views)
2014-07-16 23:30:00

Cero (50 views)
2014-07-16 00:42:17

Riven (50 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!