Phone Raycasters! (J2ME, MIDP1.0)

Started by
30 comments, last by abstractworlds 19 years, 10 months ago
Quote:Original post by McMcDonald
What do you mean with "fill-limited" and "vertex-limited" ?
McMc


Vertex-limited mean that frame rate dominated by number of all poligon nodes(vertices), that is in fact number of triangles(if you are rendering only triangles) on the screen. Fill-rate limited mean that frame rate dominated by number of of pixels drawn on the screen (how big is drawn area taking redraw into account). For example all early 3D videocards were fill-rate limited, and most of modern games on modern videocards are vertex-limited.

@ pkelly83:
in my expirience(Nokia 6600) drawing lines extremly slow. Anything else is faster. Of cause it's only if you are using API. With direct writing into memory it's all up to coder :) . However I may have explanation for you. It's possible that in Java fillRect not using native API function but instead use DrawPixel for each pixel in the rect. In this case fillRect should be slower. That can also explain why 6600/N-gage so slow in your benchmarcs - unfortunate Java implementation...
Advertisement
Okay, i understand.
My raycaster is more fill-rate limited.
----------------------------My sites:www.bytemaniac.com www.mobilegames.cc
Quote:Original post by Woody FX
Abstract world you should know ?

Sorry I don't know. As I mentioned on the benchmark page, phone manufacturers aren't very informative about the inner workings of their hardware. I don't worry too much about series 60 performance, I spend most of my time worrying about the performance of the mass market Java phones in the bottom half of the benchmark results.

Quote:Original post by McMcDonald
My walls and sprites are textured

There have been a number of Java games that have taken this approach, 3D Adventure, StalkNShoot, The Infernal Gate, Hudson Blade, Mobile Force, Rogue Agent 3D, and I think that most of these games were only made possible by using Nokia extensions (e.g. direct pixel access), thus limiting the game to Nokia phones only. I think it would be difficult/impossible getting this feature working on all phones with standard MIDP 1.0. What mobile phones are you targeting?

Quote:Original post by pkelly83
which of these is slower

We opted for the fillrect over drawline, since it ran faster on some of the slower non-Nokia phones. It is very much implementation dependent, so you can either do it differently for different phones, decide at runtime with a small initial test, or go for a single solution that gives the best result across a range of phones. For our first game, which also had a MIDP 1.0 benchmark built-in, we opted for a single solution for fairer benchmark comparisons.
Quote:
There have been a number of Java games that have taken this approach, 3D Adventure, StalkNShoot, The Infernal Gate, Hudson Blade, Mobile Force, Rogue Agent 3D, and I think that most of these games were only made possible by using Nokia extensions (e.g. direct pixel access), thus limiting the game to Nokia phones only.

Not necesarilly. There's MIDP 2.0, the Motorola Game API, etc. that offer direct pixel access.

Doing it without direct pixel access isn't viable, that's for sure. I tried a triangle filler, with a variety of methods, and using drawLine()s or fillRect()'s to plot pixels is just waaaaay too slow (a few seconds per triangle).

shmoove

[edit]
the triangle rasterizer's if anyone wants to try (Nokia only) : http://www.brinkster32.com/shmoove/triangles.zip
[/edit]
I'll see if I can get sprites and textures working then. Should be fun! I've sorta got textures work already. Instead of using direct pixel access to images, I'm storing them in an array. Sprites are just going to be normal images.
Hi!

Here is a small game using my engine.
Perhaps i will make a "real game" with this demo after finishing my current project.

You can download it here:
http://www.bytemaniac.com/files/gemrun3d.jad
http://www.bytemaniac.com/files/gemrun3d.jar

It is currently designed for nokia s60 phones.

Tell me what you think about it! (and report errors if you find one)

McMc
----------------------------My sites:www.bytemaniac.com www.mobilegames.cc
on my 6600 it told "initializing graphics" and hangs...
Did you try to read from some hardcoded paths ? I installed on E:
Hi!

I wrote it for midp 1.0 - perhaps this is the reason. I don't read from hardcoded pathnames, only from resources within the jar. I will try to run it on the midp 2.0 emulator.

Thanks for trying it!
McMc
----------------------------My sites:www.bytemaniac.com www.mobilegames.cc
You remember the sonic the craphog bonus levels in Sonic 2/3 on the Megadrive (Genesis)? Somthing like that might be easy for phone 3D games as it's all faked. Working away on a voxel engine now. :-).

Will post a texture mapping version of Raycaster in morning.
Hi!

After having read through the posts of this thread, I decided to dive into the world of raycasting, and to my surprise, the concept was fairly simple :)

However, I find speed to be a problem on MIDP1 phones. It's all right when I use the standard Graphics object and draw lines, but as previously mentioned in this thread, that kind of rendering excludes the possibility of texturing. So, I decided to go with the Nokia UI API, using a pixelbuffer to draw to and upload to the screen using DirectGraphics.drawPixels(), which I am still working on.

What I really wonder is: has anyone here made a texture-mapped raycaster that runs at an acceptable speed?

And, since I am in the unfortunate situation to not own a Nokia phone myself, are there any Nokia emulators doing a good job emulating the phone speed? I have thrown together a couple of J2ME-tests and run them on a friend of mine's phone (not raycasters though, just pure tile-engine type of "games"), and on the phone they run like crap, while on the computer emulator, they run like a dream...? At least using Sun's API, filling the screen with tiles is incredibly slow. I may be doing some fatal mistakes though, but I can't think of what that might be. :/

-Trond
-Trond

This topic is closed to new replies.

Advertisement