Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
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 2964 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 Member




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.

-Chris
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 Member




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 Member




Flame On!


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

Bugs? No way!!!

http://news.com.com/2100-1001-977051.html?tag=fd_top

*cough*

-Chris
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 you...no 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




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 www.retrosoft.co.uk
Offline EgonOlsen
« Reply #9 - Posted 2002-12-18 21:54:56 »

Quote
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: http://www.jpct.net/download.htm

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 www.retrosoft.co.uk
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.

TehJavaDev (16 views)
2014-08-28 18:26:30

CopyableCougar4 (25 views)
2014-08-22 19:31:30

atombrot (38 views)
2014-08-19 09:29:53

Tekkerue (34 views)
2014-08-16 06:45:27

Tekkerue (32 views)
2014-08-16 06:22:17

Tekkerue (20 views)
2014-08-16 06:20:21

Tekkerue (30 views)
2014-08-16 06:12:11

Rayexar (66 views)
2014-08-11 02:49:23

BurntPizza (43 views)
2014-08-09 21:09:32

BurntPizza (34 views)
2014-08-08 02:01:56
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!