Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (549)
Games in Android Showcase (139)
games submitted by our members
Games in WIP (594)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: How to achieve scrolling screen with BufferStrategy? on: 2012-10-20 22:39:56
Well I think I managed to solve my problem (thinking is pretty hard when I am awfully tired  Grin)

Well now I am asking is this vice way to do:

public void renderScreen() {
      if(bI == null) { //double buffer image I used before BufferStrategy
         bI = createImage(screen_width*2, screen_height);
         bG = bI.getGraphics();
           //drawing code here
   public void paint(Graphics g) {
      strategy = this.getBufferStrategy();
      g = strategy.getDrawGraphics();
      //draw buffer image to screen
      g.drawImage(bI, (int)buffer_pos_x, 0, null); //drawing the "buffer" Image to screen
   public void run() {
      if(mappi != null && pl != null) {
         while(game_on == true) {
            try {
            } catch(InterruptedException ie) {}
      if(game_on == false) System.exit(0);

Is that a correct order of BufferStrategy and rendering & etc. ?

Edit: As regarding to my last topic where I had problems with Fraps, I ran to this kind of problem:
When recording under 77fps Fraps records flickrs while playing game. When recording at 77fps flickers dont exist. Is this normal? I am just testing my game and the final game wont run faster than 60 fps. Normal? Problematic? Strange behavior? Bad Code?
2  Game Development / Newbie & Debugging Questions / Re: How to achieve scrolling screen with BufferStrategy? on: 2012-10-20 21:59:19
Maybe one of the most common type of sentences on this forum: I am pretty new to coding (well not new but after long time since training I decided to continue game making) so I dont quite understand how I should include AffineTransform into my code. I am using JFrame (if that tells something?). Im pretty lost at the moment.  Clueless

Edit: I wouldnt like to change all my code into Graphics2d so thats why I feel this kinda as a problem. Cheesy
3  Game Development / Newbie & Debugging Questions / How to achieve scrolling screen with BufferStrategy? on: 2012-10-20 19:06:49
I had problems with Fraps and my Java game few days back and I was suggested to use BufferStrategy. So I used it and problems are gone now, but I ended up to situation where my coding skills arent enough to solve this simple problem: I used to draw everything to an image. After everything was drawn the Image was shown to screen (=double buffering). And now BufferStrategy has taken place of the image.

I used to also move that image so that screen scrolls left and right depending where player moves. So how can I reach same result? Im pretty stuck at this point with this.  Huh
4  Game Development / Newbie & Debugging Questions / Re: Java & Fraps = flickering? on: 2012-10-17 16:51:46
If you dont throttle the fps, you are just going to heat up the gpu and stuff, normally just vsync and/or cap at 60 fps
Actually I had fps capping in there but I commented it away while trying to find solution to this problem. Dont worry its not a problem. I used 60 fps mainly for this.  Grin
5  Game Development / Newbie & Debugging Questions / Re: Java & Fraps = flickering? on: 2012-10-17 16:40:53
BufferStrategy works for me with Fraps! Thank you for help Cero!  Grin

However I ran to problem: I used to draw my graphics to image which I used for double buffering. I drew that image to screen and checked offset for image from players position (scrolling screen).
6  Game Development / Newbie & Debugging Questions / Re: Java & Fraps = flickering? on: 2012-10-17 15:16:02
your game runs > 60 fps
seems odd already.
in Java2D, you should use BufferStrategy and preferably Vsync
I am giving BufferStratety a try. But fps>60 is odd? How so? Cheesy
I am pretty novice to game making and been working on this project for half a year when I have had a time for coding so I am lacking of knowledge of how things should be done. Tongue
7  Game Development / Newbie & Debugging Questions / Re: Java & Fraps = flickering? on: 2012-10-17 00:20:59
wow thats odd. I always use FRAPS and never had a problem...mmmh
well one thing you can do is upload some app of yours that has the problem and let someone else try using FRAPS
may of course also have to do with the FRAPS version, if there was a bug, which I dont know
I thought it was bug I tried 2 versions on Fraps and problem still existed in newer one. Go on and give it a try:  Smiley
8  Games Center / WIP games, tools & toy projects / Re: Tiny Dungeons - WIP on: 2012-10-17 00:07:12
Graphics is indeed awesome! Im hoping to hear about this more!
9  Game Development / Newbie & Debugging Questions / Re: Java & Fraps = flickering? on: 2012-10-16 23:46:02
Unfortunately I do not have your solution (yet) but I have experienced a similar issue where every other second or so my game's Fraps recording will flash blue in the background. I'm using Slick2D as opposed to pure Java2D but if I find a solution I will be sure to inform you.
That would be really glad and I would be thankfully!  Grin
10  Game Development / Newbie & Debugging Questions / Java & Fraps = flickering? on: 2012-10-16 23:17:53
I am trying to record my progress with my game making into a video with Fraps, but I am running in to this kind of problem: <a href=";hl=en_US&amp;start=" target="_blank">;hl=en_US&amp;start=</a>
Does anyone have a clue is this Java + Fraps related problem or is this purely just because of my code? Fraps and Minecraft runs just fine but with my own creation I have that problem. As you can see: recording runs well couple seconds but then it starts (I tested and its not related to screen scrolling). Any ideas are welcome.  Huh
11  Game Development / Newbie & Debugging Questions / 2d collision detection on: 2009-11-06 19:06:12
I'm making 2d game viewed from up and I'm having problems with collision detection. First I made array based collision detection and moving but I think it wasn't good. So I'm asking how I could make simple collision detection? I was thinking something like this: if(player inside of box) {player_loc - player_speed } where player_speed is how many pixels player will move everytime button is pressed but it didn't work as I wanted it to work.  Huh

EDIT: I solved this already! Sorry for post! Smiley
12  Java Game APIs & Engines / JOGL Development / Re: JOGL and Ubuntu problem! on: 2008-09-06 06:51:08
I get JOGL to work on this computer (finally).I have 2 computers, but on other I dont get it to work.Something is wrong with it.I must just try some ways to fix the problem in it.But thanks a lot cylab!
13  Java Game APIs & Engines / JOGL Development / Re: JOGL and Ubuntu problem! on: 2008-09-04 15:28:07
Well now i get something working!Thanks!But I have only one problem yet!I run that your program but it doesnt draw anything to window!It gives lot of error but I get window!That good!Thanks! Smiley
14  Java Game APIs & Engines / JOGL Development / Re: JOGL and Ubuntu problem! on: 2008-09-04 13:37:28
I deleted files from ext (I putted them to there earlier), but now I must use com.sun.opengl because it is new version of JOGL.But still I get error.Eclipse gives error from Animator and something stuff like that.Before i deleted jogl from ext it didnt do that same.So do I have to put them back to ext?
15  Java Game APIs & Engines / JOGL Development / Re: JOGL and Ubuntu problem! on: 2008-09-04 11:53:47
I tryed to use one JOGL cube example from programming website, but I get error like this:

Exception in thread "main" java.lang.UnsatisfiedLinkError:;)Z
   at Method)
   at Method)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(
   at JoogliDemo.main(

i didi everything like in that Eclipse quide told!Whats the problem?
16  Java Game APIs & Engines / JOGL Development / Re: JOGL and Ubuntu problem! on: 2008-09-03 15:44:46
I tryed to add Native Librarys but I get that same error.I added those gluegen.jar or what ever it was and jogl.jar again and tryed to replace that with new jogl.jar old jogl.jar but that didnt help. =(
17  Java Game APIs & Engines / JOGL Development / JOGL and Ubuntu problem! on: 2008-09-03 14:35:14
So I download JOGL and installed it somehow right way but when I try to run any program what contains JOGL I get error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jogl.jar in java.library.path
   at java.lang.ClassLoader.loadLibrary(
   at java.lang.Runtime.loadLibrary0(
   at java.lang.System.loadLibrary(
   at Demo.main(

So where I have to add that jogl.jar?I am using Ubuntu and Eclipse!I tryed to sreach help from Google but I didn't find anything. Angry
Pages: [1]

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Archive (13 views)
2015-01-29 04:26:08

theagentd (16 views)
2015-01-28 15:33:52

GamerIDGoesHere (25 views)
2015-01-27 01:23:23

GamerIDGoesHere (26 views)
2015-01-27 01:22:15

CopyableCougar4 (34 views)
2015-01-27 00:34:41

CopyableCougar4 (20 views)
2015-01-26 04:47:56

Olo (15 views)
2015-01-25 21:26:00

Olo (18 views)
2015-01-25 18:44:22

Robo11 (36 views)
2015-01-25 06:14:26

basil_ (30 views)
2015-01-17 22:29:32
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

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