Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (601)
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] 2 3 ... 7
1  Discussions / Miscellaneous Topics / Re: how many of you have ever... on: 2003-05-14 06:04:54
nothing wrong with long posts it's just that i've noticed you always write very very long posts (not just in this thread but in all the others as well) Smiley

perhaps you are using GridBaggy the wrong way? dunno what the correct way is but i usually use GB for the main big layout and add panels here and there.

i then use another layout for the panels depending on what's in then.

i've tried three aproaches in Java over the years:

1. all layouts apart from GridBagLayout since at the time i found it hard to use

2. GBL alone. this works extremely well apart from it generates a LOT of GUI code and takes time to get it right.

3. GBL and the others at the same time is what i use nowadays and it's very fast to write and i can make it look whatever i want it to look like.


i haven't tried a GUI tool in Java yet.. it's on my 20 km long todo-list though.
2  Discussions / Miscellaneous Topics / Re: how many of you have ever... on: 2003-05-14 04:33:53
GridBagLayout works just fine in apps. i usually use the null layout as layout in games.

and damn you write essay-long posts blahblahblahh Smiley
3  Game Development / Shared Code / Re: centering components on: 2003-05-11 17:06:30
hah, cool. much better
4  Java Game APIs & Engines / Java 2D / Re: using a TextField's functionality on: 2003-05-11 17:01:40
haha lol

i forgot that the default color of the caret is black and i was using a black background Smiley

i thought textField.setForeground(Color.WHITE); changed the caret as well, but it didn't! a textField.setCaretColor(Color.WHITE); did the trick
5  Java Game APIs & Engines / Java 2D / Re: using a TextField's functionality on: 2003-05-11 16:54:57
yup, same thing Smiley

i did another quick little hack:

DefaultCaret c = (DefaultCaret) textField.getCaret();
g.drawLine((int) c.getCenterX()-1, c.y, (int) c.getCenterX()-1, c.y + c.height);

this is very ugly and there must be another way, rigth?
6  Java Game APIs & Engines / Java 2D / Re: using a TextField's functionality on: 2003-05-10 12:45:54
hah! i did a little hack:

JTextField textField = new JTextField(20);
nameField.setBounds(22, 82, 250, 30);
textField.paint(g.create(22, 82, 250, 30));

it works apart from the caret isn't drawn.. ah back to experimenting!
7  Java Game APIs & Engines / Java 2D / Re: using a TextField's functionality on: 2003-05-10 12:34:49
if i use paintComponent, nothing is shown
if i use paint, it's drawn at 0,0 all the time
if i use repaint, it flickers
if i use update, same result as paint
8  Java Game APIs & Engines / Java 2D / Re: using a TextField's functionality on: 2003-05-10 12:01:10
>> have you had a look at JTextField?

yup.. but it flickers like crazy in fullscreen with BufferStrategy and i can't get rid of it. i might be using it wrong, but i've tried all kinds of stuff. at first i thought it was that the doublebuffering of Swing was out of sync with the strategy, but setting doublebuffering to false on the JTextField didn't do the trick.

any ideas?

>> Its prolly best to start from scratch

sigh, anyone does this before? is it hard? sounds boring Smiley
9  Java Game APIs & Engines / Java 2D / using a TextField's functionality on: 2003-05-10 09:33:47
i'd like to use the functionality of a TextField, but i want specify how to draw it and more important when. i don't want to rely on AWT to do the job.

most games have all kinds of nice GUI stuff like ScrollPanes (but they don't look like the do by default, of course), so how do they do it? do they write a new ScrollPane from scratch or do they use the functionality of an existing one and just rewrite the way it's drawn?

hoping for an easy solution guys! Smiley

EDIT: fixed some Jeff-writing
10  Discussions / Miscellaneous Topics / Re: how many of you have ever... on: 2003-05-10 09:29:09
... and 1.5 is coming soon as well. what are super-cool-must-have features in that release?
11  Discussions / General Discussions / Re: New Forum: GL4Java or OpenGL on: 2003-05-09 13:29:38
the first time i read "LWJGL" i thought the "GL" part was the same as in OpenGL
12  Discussions / Miscellaneous Topics / Re: how many of you have ever... on: 2003-05-09 12:33:29
yeah i remembered when they included fullscreen and bufferstrategy. i just had to try those new cool features out in my own games.
13  Java Game APIs & Engines / Java 2D / Re: Semi-transparent Image painting? on: 2003-05-08 16:15:08
sure is Smiley

14  Java Game APIs & Engines / Java 2D / Re: Semi-transparent Image painting? on: 2003-05-08 13:14:10
here's what i use...

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
public Image[] makeTranslucentImages(Image[] src) {
            Image[] transImages = new Image[src.length];
            int width = src[0].getWidth(null);
            int height = src[0].getHeight(null);
            for (int i = 0; i < src.length; i++) {
                  int[] pixels = new int[width * height];
                  PixelGrabber pg = new PixelGrabber(src[i], 0, 0, width, height, pixels, 0, width);
                  try {
                        pg.grabPixels();
                  }
                  catch (InterruptedException e) {
                        logger.error(getClass(), "Error grabbing pixels.");
                  }

                  for (int k = 0; k < pixels.length; k++) {
                        int alpha = (pixels[k] >> 24) & 0xff;
                        if (alpha != 0)
                              pixels[k] = 0x4F000000 | (pixels[k] & 0x00FFFFFF);
                  }
                  transImages[i] = Toolkit.getDefaultToolkit().createImage(new MemoryImageSource(width, height, pixels, 0, width));
            }
            return transImages;
      }
15  Java Game APIs & Engines / Tools Discussion / Re: IDE improving workflow? on: 2003-05-08 08:27:50
Quote
The IDE way of doing things is no less useful than the command line in terms of understanding what is going on, as neither one of them programs for you (yes, even the good IDEs).


Eclipse does tons of stuff for you. it does probably the same things as IDEA does. it does the ones leknor stated and more (so does IDEA). if an error is detected in the code (the code is analyzed as you write and indicates errors on the lfy), it's marked red and a little light bulb appears to the side. a mouse click (or CTRL+1) displays the suggestions Eclipse has. sometimes it's just minor stuff like spelling mistakes, but it also fixes more important stuff like casts and other stuff as well (can't think of any more right now, a bit hung over).

this can be both good and bad.

good: the user can see there is a problem and sees the solution and learns what needs to be done and why.

bad: the user can see there is a problem and sees the solution and lets the IDE fix the problem and moves on without learning anything.

comments?


Quote
Same could be said of file mangement with a GUI or via a commandline shell.  typing del or rm vs selecting a file from a list and pressing the delete key or selecting delete from a menu - it's all the same if you know that you are deleting a file and what that implies.


bad example Smiley
16  Java Game APIs & Engines / Java 2D / Re: Semi-transparent Image painting? on: 2003-05-08 07:12:15
isn't it faster if you change the bits in your image to make it translucent and then draw that image instead of using composite on the fly?

if it is, you can make all the translucent images at startup
17  Discussions / Miscellaneous Topics / Re: Has any of you thought about going back to C/C on: 2003-05-08 07:05:55
Quote
Has any of you thought about going back to C/C++?


i go back and forth. for instance, i have to write a heap manager in C and some other stuff in VB; it's up to the client.
18  Java Game APIs & Engines / Tools Discussion / Re: IDE improving workflow? on: 2003-05-06 15:02:43
Quote
I don't think beggining programmers should be allowed to use an IDE until they've passed a command line compendency test.


i agree. the first two basic courses will use emacs/vi + javac/jikes. i suggest that after those they can try an IDE.

what about improving workflow? does it make the programmers work more efficiently? or is the IDE in the way?
19  Discussions / Miscellaneous Topics / Re: PomPom in trouble on: 2003-05-06 08:47:06
monkey island 1 or 2? or even one year old games cost $10 (like return to castle wolfenstein or commanche 4)
20  Java Game APIs & Engines / Java 2D / Re: game file? on: 2003-05-05 18:22:15
lol
21  Java Game APIs & Engines / Tools Discussion / IDE improving workflow? on: 2003-05-05 16:12:12
we are (hopefully) about to replace emacs+javac at the uni with an IDE and would like to know the consequences about this, especially workflow and productivity in teams.

so, does anyone know any articles out there that touches this subject? preferably articles based on results and real life experience and not just theories.

trial and error is not that much fun so a few articles might be in order.

dunno if this belongs to "off topic"...
22  Discussions / Miscellaneous Topics / Re: PomPom in trouble on: 2003-05-05 16:00:05
i'd pay $5 for those kind of games nowadays, not $20
23  Discussions / General Discussions / Re: Content Creation on: 2003-05-05 15:57:27
i might write a gimp or blender tutorial if i can find the time (not likely :/ )

i use those programs for graphics and the best thing about them is that they are free. the second best thing about them is that they are good.
24  Game Development / Performance Tuning / Re: A* Pathfinder tutorial on: 2003-05-03 10:12:28
forgot to mention that the tutorial was very nice indeed.
25  Game Development / Performance Tuning / Re: A* Pathfinder tutorial on: 2003-05-02 11:11:39
i think this belongs to the AI section (http://www.java-gaming.org/cgi-bin/JGOForums/YaBB.cgi?board=AI)
26  Games Center / Archived Projects / Re: Tetris on: 2003-05-02 09:42:42
are you actually allowed to call it Tetris?
27  Java Game APIs & Engines / Java 2D / Re: Whats the best startup code for a java2d game on: 2003-05-02 09:33:03
this might get you up and running http://www.java-gaming.org/cgi-bin/JGOForums/YaBB.cgi?board=share;action=display;num=1036791657

28  Games Center / Archived Projects / Re: Crystals 1.30 beta on: 2003-05-01 16:44:07
"So that's not really a bug - it's a feature"

you aren't the first to use that phrase hehe
29  Games Center / Archived Projects / Re: Crystals 1.30 beta on: 2003-05-01 16:13:50
more bugs..

* when one is dead and the boms still attack, the score is decreased!

* one time when i first started a new game, a bomb that was supposed to be moving didn't move.

* one time i died, instead of the starfield, it was all grey and it said "OWEST PANE". the "start new game" message box was visible though. i can send you the screenshot if ya like.
30  Games Center / Archived Projects / Re: Crystals 1.30 beta on: 2003-05-01 16:09:13
it's easier to point out the bad stuff rather than the good stuff, just so you know Smiley

if you die and there are MOMBS (Moving bOMBS) left, they attack my innocent lil' cross behind the message box telling me i'm dead, the bastards! dunno if it's meant that way. also, the crash (?) sound is played (pretty worthless bombs if you ask me hehe, shouldn't they explode?)

Pages: [1] 2 3 ... 7
 

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 (30 views)
2014-12-15 09:26:44

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

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

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

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

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

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

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

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

toopeicgaming1999 (30 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!