Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (516)
Games in Android Showcase (123)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  Speed4k  (Read 7796 times)
0 Members and 1 Guest are viewing this topic.
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #30 - Posted 2005-12-12 08:14:05 »

Minor Update:
- Another attempt to improve OS X 10.3 compatibility.  NB. OS X 10.4 is Ok

Edit: Confirmed working on OS X 10.3 by c_lilian Smiley


Time flies like a bird. Fruit flies like a banana.
Offline c_lilian

Senior Duke


Projects: 1


Java games will probably rock someday...


« Reply #31 - Posted 2005-12-12 08:42:52 »

Hey it works fine now on mac Os 10.3 !!

(also frag4k)

Thanks !

Lilian

Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #32 - Posted 2005-12-12 09:12:03 »

Hey it works fine now on mac Os 10.3 !!

(also frag4k)

Hooray!  Thanks for testing it and Frag 4k again for me.  Cheesy

Alan


Time flies like a bird. Fruit flies like a banana.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline nonnus29

Senior Duke




Giving Java a second chance after ludumdare fiasco


« Reply #33 - Posted 2005-12-12 13:02:58 »

Now can you start a thread/tutorial about how to code so games will work on the mac?  That would be really cool.... and greatly appreciated!

 Smiley
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #34 - Posted 2005-12-12 19:33:47 »

Now can you start a thread/tutorial about how to code so games will work on the mac?  That would be really cool.... and greatly appreciated!

I don't really know enough for a tutorial and a lot of what I think I know is based on other folks statements &  guesswork.

However the jist of it is that the Mac AWT drawing insists on an image of TYPE_INT_ARGB_PRE. (Although if you create a compatibleimage, it returns type 0 - custom.)  If you create a BufferedImage of another type (e.g. TYPE_INT_RGB or TYPE_INT_ARGB), then on each call to a drawing primitive (e.g. g.drawLine(...), the entire buffer is converted to TYPE_INT_ARGB_PRE, the graphic drawn, and then the resulting image converted back.  On OS X 10.4, this works, but is about 40 times slower than the equivalent on Windows.  On OS X 10.3, there appears to be a bug & sometime the converting back stage doesn't happen, causing the drawing to be lost.  This results in Invisible Monsters, Cars etc.  This may be specific to BufferedImages that have become unaccelerated due to getRaster() having been used on them (which is the case in Speed4k & Frag4k).  The bug appears to be related to BufferedImages of TYPE_INT_ARGB (i.e. without premultiplied Alpha channel).  Drawing on images of TYPE_INT_RGB appears to work on OS X 10.3.

The solution (as mentioned numerous times on this forum) is to use TYPE_INT_ARGB_PRE whereever you would otherwise use INT_TYPE_ARGB.  This still works fine on Windows.  It is also advisable to use TYPE_INT_ARGB_PRE instead of TYPE_INT_RGB, if you are regularly drawing on the buffer using awt calls in the main loop.  However if you use getRaster(), and solely generate the image by manipulating bytes, then TYPE_INT_RGB works fine.

Lastly, if you have a screen image built up in a BufferedImage & want to blit it to the screen, then for maximum speed it needs to be TYPE_INT_RGB or TYPE_INT_ARGB_PRE.  On OS X 10.4, both of these take about the same time.  I don't know about OS X 10.3, but my code uses a TYPE_INT_RGB as a frame buffer, and there haven't been any complaints (yet).

Alan

Time flies like a bird. Fruit flies like a banana.
Offline Malohkan

Senior Duke




while (true) System.out.println("WOO!!!!");


« Reply #35 - Posted 2005-12-17 19:55:31 »

Very impressive!  I haven't quite gotten the hang of breaking at the right time before corners but for the most part controls are great!  Surprisingly though... I feel like you're too generous on collision detection Smiley  I've many times driven straight for a car and found that I missed it!  Sometimes I hit it though Smiley  Other than that it's great.

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline [ERROR]

Senior Newbie


Projects: 1



« Reply #36 - Posted 2006-01-10 09:52:19 »

Great Game!

Saw a game called Drivey in slashdot long back.  http://drivey.com/   Altough this is a 3D demo and doesn't use voxels,  it might be of interest to u.

Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #37 - Posted 2006-01-12 03:09:11 »

@Malohkan
The collision detection is a touch primitive.  I've been short on time recently, but hope to look at that part again.

@Error
Glad you liked the game.  Thanks for the link.

Alan 

Time flies like a bird. Fruit flies like a banana.
Pages: 1 [2]
  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 (32 views)
2014-10-27 03:28:38

TehJavaDev (26 views)
2014-10-27 03:27:51

DarkCart (41 views)
2014-10-26 19:37:11

Luminem (22 views)
2014-10-26 10:17:50

Luminem (27 views)
2014-10-26 10:14:04

theagentd (33 views)
2014-10-25 15:46:29

Longarmx (61 views)
2014-10-17 03:59:02

Norakomi (58 views)
2014-10-16 15:22:06

Norakomi (47 views)
2014-10-16 15:20:20

lcass (43 views)
2014-10-15 16:18:58
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!