Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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  
  Full screen question  (Read 3021 times)
0 Members and 1 Guest are viewing this topic.
Offline role

Junior Devvie




Java manmoth is coming!


« Posted 2003-02-16 05:05:56 »

can i use awt tools in full screen mode?
like button, panel, etc
or how to make button in full screen?
can i register the button to action listener?

and how to put panel in east (borderlayout.east)?

newbie in fullscreen  Tongue

Golden T Game Engine - Java2D/OpenGL Game Engine
Golden T Website | Golden T Forum
Offline JuddMan

Senior Devvie


Medals: 1


Your Ad Here


« Reply #1 - Posted 2003-02-16 11:46:35 »

If you are using full screen exclusive mode to draw onto a buffer or something like that, it takes over the entore JFrame (or frame), so even if you did somehow add stuff to it your graphics would write over it.

one of the disadvantages when going for the fullscreen exclusive mode is that you can't use the traditional swing and awt interfaces... you need to write your own.
Offline Abuse

JGO Knight


Medals: 15


falling into the abyss of reality


« Reply #2 - Posted 2003-02-16 18:12:21 »

oops Roll Eyes

you can use awt/swing components fine in fullscreen Tongue

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline JuddMan

Senior Devvie


Medals: 1


Your Ad Here


« Reply #3 - Posted 2003-02-17 03:46:56 »

i was assuming he wanted to also use some kind of bufferstrategy thing. can that be done?
Offline Abuse

JGO Knight


Medals: 15


falling into the abyss of reality


« Reply #4 - Posted 2003-02-17 16:53:50 »

Quote
i was assuming he wanted to also use some kind of bufferstrategy thing. can that be done?


ah, your right then Cheesy (well - kinda...)

awt/swing stuff uses passive rendering, BufferStrategy is strictly an active rendering system.

However, you could still use awt/swing components by manually calling their paint/paintComponent methods in your own render loop. (though im not 2 sure you'd want to do that - awt/Swing rendering code isn't the tightest of code Angry)

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

Senior Newbie




Java games rock!


« Reply #5 - Posted 2003-02-17 23:41:10 »

???Sorry, I am also a newbie on doing java game programming.

How to do you all print the swing components on the JFrame in the Full screen mode? using what classes or methods
Huh

Offline role

Junior Devvie




Java manmoth is coming!


« Reply #6 - Posted 2003-02-20 13:49:28 »

thanx all i have turn my game into fullscreen exclusive  Grin
and it works very nicely  Grin

yup Juddman i want to use BufferStrategy but then i don't know what's wrong with my computer,
i try to use BufferStrategy like in sharedcode sections but it only works in windowed mode.
in fullscreen the game only appear in umm maybe 2 seconds and then back to windows  Angry maybe my hardware not support BufferStrategy  Cry
so i still use passive rendering.

okay thank you

Golden T Game Engine - Java2D/OpenGL Game Engine
Golden T Website | Golden T Forum
Offline Abuse

JGO Knight


Medals: 15


falling into the abyss of reality


« Reply #7 - Posted 2003-02-20 20:09:15 »

BufferStrategy not working in fullscreen mode?
Sounds very odd Huh
Just to make sure it isn't your code...
Have you tried this little sample app?

http://www.pkl.net/~rsc/Balls.jar

its got loads of features :-

- Windowed or Fullscreen modes
- togglable rendering modes, (BufferStrategy or Normal active rendering)
- different image types (VolatileImage, automatic Image, BITMASKed automatic Image)
- AlphaCompositing (to demonstrate Software operations on VolatileImages are *very* slow)

hehe, what a shameless sales pitch Cheesy

but anyway - you'll be able 2 see if BufferStrategy realy does work or not Cheesy

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

JGO Coder


Medals: 2


pixels! :x


« Reply #8 - Posted 2003-02-20 22:04:32 »

Quote
[...]
- AlphaCompositing (to demonstrate Software operations on VolatileImages are *very* slow)
[...]


yea it's really *very* slow... btw is there a way to make such stuff faster?

using sys ram instead of vram should be faster in this case right?

sry for ot ._.

弾幕 ☆ @mahonnaiseblog
Offline role

Junior Devvie




Java manmoth is coming!


« Reply #9 - Posted 2003-02-21 03:06:50 »

woahh  Shocked balls.jar works very good abuse!! except the balls still shown it's background (no transparent Kiss)

umm so what's wrong with my code then??  Huh
it works fine in windowed mode, but not in fullscreen  Huh
maybe i must take a look closer at your code   Wink

oh yeah by the way is balls.jar programmed quit after several loop?
cos it suddenly quit after 1-2 minutes.
i didn't press Escape and other keys

thanx for the code  Wink


Golden T Game Engine - Java2D/OpenGL Game Engine
Golden T Website | Golden T Forum
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #10 - Posted 2003-02-21 03:32:38 »

Quote
[...]except the balls still shown it's background (no transparent Kiss)[...]


Quote
different image types (VolatileImage, automatic Image, BITMASKed automatic Image)


bitmask=transparent Smiley

弾幕 ☆ @mahonnaiseblog
Offline Abuse

JGO Knight


Medals: 15


falling into the abyss of reality


« Reply #11 - Posted 2003-02-21 16:53:34 »

Quote
woahh  Shocked balls.jar works very good abuse!! except the balls still shown it's background (no transparent Kiss)


as oNyx said, accelerated bitmask transparency is only possible with automatic images.
If you change the image type to 'Bitmasked automatic Image', the balls background should disappear.

Quote

umm so what's wrong with my code then??  Huh
it works fine in windowed mode, but not in fullscreen  Huh


post your code
Quote

maybe i must take a look closer at your code   Wink

or you could do that instead Cheesy
(i think I included the src in the jar file)

Quote

oh yeah by the way is balls.jar programmed quit after several loop?
cos it suddenly quit after 1-2 minutes.
i didn't press Escape and other keys


now thats abit worrying :S

There are 3 things that can cause it to stop.

1) pressing Escape - this should instantly quit the program.

2) Changing to 'VolatileImage' while in 'normal' rendering mode.
If you do this, it will stop rendering the balls until you change the 'image type' back to 'automatic image' or you change the 'rendering mode' back to 'BufferStrategy'.

3) Changing the number of back buffers several times at runtime can cause a JVM crash. (or worse :S)
Its only there as a little test, if you use it - expect it to crash Tongue (I put a 'Triple Buffer' option in the startup dialog for regular use)

Quote

thanx for the code  Wink


no probs, hope it helps.

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

JGO Knight


Medals: 15


falling into the abyss of reality


« Reply #12 - Posted 2003-02-21 17:23:54 »

Quote


yea it's really *very* slow... btw is there a way to make such stuff faster?

using sys ram instead of vram should be faster in this case right?

sry for ot ._.


yup, simply change from using BufferStrategy to using 'Normal' (i.e. create the backBuffer yourself in sys ram)
and keep the image your drawing in sys ram as well.

Balls.jar has that as well Cheesy

try comparing :-

AlphaCompositing + BufferStrategy + VolatileImage

with

AlphaCompositing + Normal + automatic Image.

the 2nd is atleast 10 times faster Cheesy

This is a rather serious problem as well, and is likely to cause performance problems with Java2D for many versions to come.

If you use BufferStrategy (i.e. have your frame buffer in vram) you risk using a pixel operation that is not hardware accelerated. (and absolutely kill performance)

At the moment, only 2 operations have potencial to be accelerated (blit & bitmask)

When the number of hardware accelerated operations increase (as they must if Java2D is ever going to get anywhere)
A facility to enquire exactly what operations are accelerated will need adding. (i.e. getDeviceCaps() capability)

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

Junior Devvie




Java manmoth is coming!


« Reply #13 - Posted 2003-02-23 11:54:12 »

nope i didn't press any key abuse
i try it several times but still quit suddenly
and now it quit after 20 seconds (the fastest one)

i suppose my video card not support buffer strategy  Cry
but i don't understand, why it works in windowed mode? but not in full screen???  Huh
but the fullscreen exclusive work fine when not using buffer strategy!!  Angry very odd..

okay thanx anyway

Golden T Game Engine - Java2D/OpenGL Game Engine
Golden T Website | Golden T Forum
Offline Abuse

JGO Knight


Medals: 15


falling into the abyss of reality


« Reply #14 - Posted 2003-02-23 13:53:52 »

what gfx card?

Sounds to me like buggy drivers - have you upgraded them recently?
if not, do so Cheesy

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

Junior Devvie




Java manmoth is coming!


« Reply #15 - Posted 2003-02-24 06:05:33 »

umm i don't know, it's generic one  Embarrassed
in fact my gfx card not support OpenGL
is bufferstrategy need OpenGL?

i suppose i have no luck with bufferstrategy  :-/
thanx for anything

Golden T Game Engine - Java2D/OpenGL Game Engine
Golden T Website | Golden T Forum
Offline Abuse

JGO Knight


Medals: 15


falling into the abyss of reality


« Reply #16 - Posted 2003-02-24 17:13:38 »

it doesn't need ogl support, however, im pretty sure it needs dx5+.

if your programming, you realy should know what hardware you have in your pc Roll Eyes

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

Junior Devvie




Java manmoth is coming!


« Reply #17 - Posted 2003-02-25 12:42:25 »

sorry i don't know anything bout hardware  Tongue
i use dx8.1, win xp, P-IV processor
i don't want to use bufferstrategy for now
i test many samples that use bufferstrategy and have the same problem.  Angry

okay thanx

by the way, what's the benefit of using bufferstrategy?


Golden T Game Engine - Java2D/OpenGL Game Engine
Golden T Website | Golden T Forum
Offline Abuse

JGO Knight


Medals: 15


falling into the abyss of reality


« Reply #18 - Posted 2003-02-27 18:10:36 »

Quote

by the way, what's the benefit of using bufferstrategy?



the only thing BufferStrategy does, that isn't do-able through the use of other classes, is page flipping.

however, thats quite a big 'only' Smiley

as it improves fps, and eliminates tearing.

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

Junior Devvie




Java manmoth is coming!


« Reply #19 - Posted 2003-02-28 03:01:30 »

yeah i have no luck then  :-/

i don't know what's wrong with my computer
i try lwjgl and bump!! it have same problems like using bufferstrategy!!  Angry
it only runs well in windowed mode  Sad

is it a bug or maybe i have replace my video cards  Huh

umm can i use lwjgl for making 2D games?
it said lwjgl is more stable and use CPU intensively

Golden T Game Engine - Java2D/OpenGL Game Engine
Golden T Website | Golden T Forum
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.

rwatson462 (35 views)
2014-12-15 09:26:44

Mr.CodeIt (26 views)
2014-12-14 19:50:38

BurntPizza (60 views)
2014-12-09 22:41:13

BurntPizza (95 views)
2014-12-08 04:46:31

JscottyBieshaar (55 views)
2014-12-05 12:39:02

SHC (71 views)
2014-12-03 16:27:13

CopyableCougar4 (73 views)
2014-11-29 21:32:03

toopeicgaming1999 (133 views)
2014-11-26 15:22:04

toopeicgaming1999 (124 views)
2014-11-26 15:20:36

toopeicgaming1999 (34 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

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
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!