Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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  
  fullscreen bufferstrategy clipping question  (Read 1845 times)
0 Members and 1 Guest are viewing this topic.
Offline zulo

Junior Devvie

Java games rock!

« Posted 2003-02-23 01:21:16 »

My game is fullscreen bufferstrategy(3),its a breakout game, it runs at 70fps with 64 objects in the game area(bricks) + the ball.

Theres only one type of brick object now represented with a png image, and its static so that means all objects share that image(am I right?).

This fps is only with 64 bricks(2 rows)..theres 32 columns pr row of bricks. And the game runs in 800x600 so I need more rows.
I tried with 12 rows, that means its 384 brick objects on screen, and the fps gets down to 30,and the ball is clearly slowing down in movement.

Now heres my question, can I set the clipping to draw only the ball at its new position?
I tried g2.setClip(ball.x,ball.y,ballwidth,ballheight); , but
it doesnt seem to change anything.
I have seen clipping in applets but never in fullscreen applications.
Please help.

Do you think the slowdown could be because of all the objects?
(384 objects is getting checked for collision with the ball every frame)
I could try to change the collision code to check only the bricks that are near the ball..that would be maximum 8 bricks instead of 384,or 600 if the level is big.
Offline Abuse

JGO Ninja

Medals: 66

falling into the abyss of reality

« Reply #1 - Posted 2003-02-23 08:44:41 »
Pages: [1]
  ignore  |  Print  

EgonOlsen (76 views)
2018-06-10 19:43:48

EgonOlsen (56 views)
2018-06-10 19:43:44

EgonOlsen (76 views)
2018-06-10 19:43:20

DesertCoockie (256 views)
2018-05-13 18:23:11

nelsongames (156 views)
2018-04-24 18:15:36

nelsongames (155 views)
2018-04-24 18:14:32

ivj94 (896 views)
2018-03-24 14:47:39

ivj94 (157 views)
2018-03-24 14:46:31

ivj94 (809 views)
2018-03-24 14:43:53

Solater (173 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!