Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
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: Simple Clipping on: 2005-12-26 23:46:49
Thanks Jeff and Rolz!  I got it working.

-Mike Smiley
2  Game Development / Newbie & Debugging Questions / Simple Clipping on: 2005-12-26 10:17:31
Hello all,

  I implemented my own simple windowing system for my game.  Since I only want to render the window when something has changed, I need to ensure that when my underlying tile system does not draw over my window.  I was thinking of doing it this way:  Start with a clipping region that is the same dimensions as the JFrame that holds the game, and have each of my game windows "cookie-cut" out where they are drawn.  This solution seems simple enough, yet when looking at the Graphics and Shape API it seems that I cannot create an arbitrary shape without explicitly specifying the points (like with a polygon).

In other words, I can't figure out how to do this robustly.  I know there are some other simple design patterns out there, so if someone could tell me how to implement the solution I explained or point me in the right direction it would be much appreciated!

Thanks!
-Mike Smiley
3  Game Development / Newbie & Debugging Questions / Re: JDesktopPane and Canvas on: 2005-12-22 11:35:11
Thanks Mr. Light, I will look into thisĀ  Smiley

By the way, did you mean paintComponent(..) as opposed to printComponent(...)?

-Mike
4  Game Development / Newbie & Debugging Questions / Re: Space Invaders 101 Source Code on: 2005-12-22 11:32:15
Thanks for posting this, it was very helpful.

5  Game Development / Newbie & Debugging Questions / Re: JDesktopPane and Canvas on: 2005-12-22 06:36:45
Last question about this.  For the JInternalFrame is there any way to get rid of or modify the title bar (not the text, the actual bar.  I don't want it there). 

-Mike
6  Game Development / Newbie & Debugging Questions / Re: JDesktopPane and Canvas on: 2005-12-22 06:22:16
Ok, yes I am an idiot.  The problem was that I was using update instead of paint in the Canvas.

Thank you much,
-Mike 
7  Game Development / Newbie & Debugging Questions / Re: JDesktopPane and Canvas on: 2005-12-22 06:20:13
Kingaschi --

  Thanks for the reply.  I try this, but all that comes out on the internal frame is black.  Does my Canvas need to implement another method besides update(...)?  Like paint or something?

Thank you
-Mike
8  Game Development / Newbie & Debugging Questions / JDesktopPane and Canvas on: 2005-12-22 06:02:24
Hello all,

  Long time reader, but first time poster.  Smiley Anyhow, I have a question for you all.  I am working with internal frames.  I want to have the big desktop frame contain the items drawn by a Canvas.  I can successfully get the Canvas to draw when I use AWT.  To clarify my problem, here is what I am doing using AWT for drawing of the Canvas in a frame (pseudo-code):

//----------------
Canvas s = new Canvas
Frame f = new Frame
f.add(s) //add the Canvas to the Frame

while(true) s.update(...)
//-----------------

This works for me, but since I would like to add internal frames, I need to start using JDesktopPane.  How would I add the Canvas to the main JDesktopPane and have it constantly call update on the Canvas inside of it?  And when I get that up and running, after I add stuff to internal frames, how can I get it to constantly redraw itself?

Thanks in advance!!
-Mike
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.

E.R. Fleming (20 views)
2014-07-29 03:07:13

E.R. Fleming (8 views)
2014-07-29 03:06:25

pw (39 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21

Zero Volt (50 views)
2014-07-17 23:47:54

danieldean (42 views)
2014-07-17 23:41:23

MustardPeter (45 views)
2014-07-16 23:30:00
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!