Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (687)
Games in Android Showcase (198)
games submitted by our members
Games in WIP (759)
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  
  Game scoreboard  (Read 2219 times)
0 Members and 1 Guest are viewing this topic.
Offline cgru2

Junior Newbie





« Posted 2005-10-19 08:33:41 »

Hi..

Im making this Mario Brother's dtyle game and im looking to add a high score board at the end of each game.

I want it to appear on top of the graphics in the main screen.

Anyone has any documentation or ideeas on how it could be done?

Cheers
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 112
Projects: 15


★★★★★


« Reply #1 - Posted 2005-10-19 09:39:34 »

what are you using to render your graphics java2d, opengl or something else?
Offline Jeff

JGO Coder




Got any cats?


« Reply #2 - Posted 2005-10-19 21:41:51 »

Typically such things are done in games by using the same render engine yo uuse for your "sprites".  The Scorebaord is a big sprite, and each digit is a 'sprite' on top of it.

Alternately, you could draw the scoreboard offline into an offscreen buffer and display the whole thinsgas  one sprite within your engine.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cgru2

Junior Newbie





« Reply #3 - Posted 2005-10-20 02:59:39 »

Im using java 2d
Offline g666

Junior Devvie





« Reply #4 - Posted 2005-10-26 20:09:48 »

you could do it by communicating  with a php script writing to a flat text file. Ill post sample code if u want.

desperately seeking sanity
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #5 - Posted 2005-10-27 02:19:10 »

I actually made a networked Mario back in the day.  Cool

Here was my method for drawing the score on the top of the screen. Is this what you were looking for?

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
private void drawScore(Graphics g)
   {
      g.setColor(Color.WHITE);
      g.setFont(new Font("Courier New", Font.BOLD, 22));
      g.drawString("MARIO", 10 + getWidth()/4 * 0, 22);
      g.drawString("COINS", 10 + getWidth()/4 * 1, 22);
      g.drawString("WORLD", 10 + getWidth()/4 * 2, 22);
      g.drawString("TIME" , 10 + getWidth()/4 * 3, 22);
      g.drawString("  " + mario.score(), 10 + getWidth()/4 * 0, 40);
      g.drawString("  " + mario.coins(), 10 + getWidth()/4 * 1, 40);
      g.drawString(" " + level.toString(), 10 + getWidth()/4 * 2, 40);
      g.drawString(" " + level.timeLeft(), 10 + getWidth()/4 * 3, 40);
   }

See my work:
OTC Software
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 
roseslayer (634 views)
2016-08-06 11:43:29

roseslayer (587 views)
2016-08-06 09:43:11

xTheGamerCodes (660 views)
2016-08-04 15:40:59

xTheGamerCodes (651 views)
2016-08-04 15:40:24

orrenravid (999 views)
2016-07-16 03:57:23

theagentd (1078 views)
2016-07-11 14:28:54

Hydroque (1190 views)
2016-07-06 05:56:57

Hydroque (1105 views)
2016-07-03 08:52:54

GrandCastle (916 views)
2016-07-01 09:13:47

GrandCastle (655 views)
2016-07-01 09:09:45
Rendering resources
by Roquen
2016-08-08 05:55:21

Rendering resources
by Roquen
2016-08-08 05:52:42

Rendering resources
by Roquen
2016-08-08 05:50:38

Rendering resources
by Roquen
2016-08-08 05:49:53

Rendering resources
by Roquen
2016-08-08 05:32:39

Making a Dynamic Plugin System
by Hydroque
2016-06-25 00:13:25

Java Data structures
by BinaryMonkL
2016-06-13 21:22:09

Java Data structures
by BinaryMonkL
2016-06-13 21:20:42
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!