Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (601)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (649)
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  
  type conversions and fixed-point  (Read 3377 times)
0 Members and 1 Guest are viewing this topic.
Offline Absolution

Senior Newbie

Java games rock!

« Posted 2002-12-12 13:26:56 »

Just some thoughts:
In trying to optimize my latest project I noticed that type conversions are still painfully slow (at least in my 1.1 applets) so I try to avoid them whenever possible or save them to the end.  I've actually started using some fixed-point math in the critical sections of code (inner loops) and I have got some noticeable improvements that way.  Mainly because I'm trying to convert floating-point to integer for pixel plotting/array-addressing.  I find avoiding that (int) call at the expense of a few integer multiplications and shifts still helps.  I wonder if that will carry over cross-platform though. hmm.  Anybody have anything to add?

Offline cknoll

Junior Devvie

Flame On!

« Reply #1 - Posted 2002-12-12 13:53:25 »

Something to add? Sure! Start writing to the 1.4 api, PLEASE!  The more people supporting it, the more quicker the adoption rate will be.

Offline Absolution

Senior Newbie

Java games rock!

« Reply #2 - Posted 2002-12-12 14:10:42 »

Don't you wish it was standard with all browsers?  Tongue  That's the main reason I like 1.1.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline zparticle

Senior Devvie

Thick As A Brick

« Reply #3 - Posted 2002-12-12 14:52:28 »

Well not even 1.1 is "standard" with all browsers. Given any particular browser vendor and any particular version of that browser you are likely to find a different set of issues (read BUGS) that you have to code around.  Smiley

Offline cknoll

Junior Devvie

Flame On!

« Reply #4 - Posted 2002-12-12 15:21:50 »

Bugs? No way!!!


Offline EgonOlsen
« Reply #5 - Posted 2002-12-12 15:34:22 »

If it's possible to support 1.1 in a project, then why not? My software 3D engine supports 1.1. too. A software renderer (i guess Absolution is talking about one...) doesn't need Java2 features (let alone 1.4 stuff). All it does is drawing pixels into an integer array. Whatever you do with this pixel-data is up to one prevents you from using it in a Swing-application for example. But there is simply no need for anything higher than 1.1 for this purpose, so why disregard it?
Anyway, back to the topic: I don't have anything to add except that i'm doing exactly the same thing. I'm using floats all the way but converting them to fixed-point in the rasterizer.
Edit: Actually, i AM supporting Java2, because i'm using a BufferedImage in case of Java2 and a MemoryImageSource in case of 1.1... Grin

Offline swpalmer

JGO Coder

Exp: 12 years

Where's the Kaboom?

« Reply #6 - Posted 2002-12-13 16:43:28 »

No offense, but a software 3D engine that is intended to run on PC hardware is pointless.  Use Java3D or an OpenGL binding.  If you are writing for devices with no hardware 3D support (mobile phones), or are doing it simply for 'fun' or educational purposes  then of course you might have something.  But anyone that wants to make a 3D application or applet in Java for PCs and is coding to java 1.1 is just making things harder for themselves. Not to mention that they are doing a disservice to the Java community by promoting an obsolete version that gives people a bad impression.

And of course there is the chicken and the egg problem... why will people have anything better than java 1.1 if that's what everyone is coding for anyway...  "I say if you build it they will come"... all that is needed to make java 1.4 more popular are programs that people want that require it.
Use the java plug-in and Web start.

Offline EgonOlsen
« Reply #7 - Posted 2002-12-13 20:41:15 »

Try to tell that to somebody who wants to add a small 3D applet game to a website to attract visitors. Try to convince him or her that the visitors have to download and install all this stuff and that they'll contact him for support (or simply blame it on him) if it doesn't work. People are using my engine, so i don't think it's pointless. And of course i did that for the fun of it. Writing stuff for OpenGL wouldn't be half the fun (at least for me).

Offline retrosoft

Senior Newbie

oh, just work....,

« Reply #8 - Posted 2002-12-14 11:59:14 »

Hey egonolsen dont give up on your software dream we cant all sail in the same boat...

public void myGame extends
Offline EgonOlsen
« Reply #9 - Posted 2002-12-18 21:54:56 »

Hey egonolsen dont give up on your software dream...

I never will! Grin I have just released a new version (0.81) which can be found here:

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline retrosoft

Senior Newbie

oh, just work....,

« Reply #10 - Posted 2002-12-20 14:04:36 »

Hey thats looking really good everyone should check it out!
I’ll be keeping an eye on your site  Shocked

public void myGame extends
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Riven (23 views)
2015-07-27 16:38:00

Riven (13 views)
2015-07-27 15:35:20

Riven (18 views)
2015-07-27 12:26:13

Riven (8 views)
2015-07-27 12:23:39

BurntPizza (24 views)
2015-07-25 00:14:37

BurntPizza (36 views)
2015-07-24 22:06:39

BurntPizza (20 views)
2015-07-24 06:06:53

NoxInc (23 views)
2015-07-22 22:16:53

NoxInc (14 views)
2015-07-22 22:13:39

Jesse (36 views)
2015-07-22 03:10:36
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 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‑
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!