Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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: *rawr* Core JApplet file on: 2009-03-31 06:37:21
thats exactly what i was looking for, thank you~!
i knew it was something fairly "simple" to achieve, im just not very familiar with Applets (hence why I want to learn more about using them)
thanks again  Cheesy
2  Game Development / Newbie & Debugging Questions / *rawr* Core JApplet file on: 2009-03-31 04:14:56
I would very much like to create a "core" file as the basis of my game, displayed in an applet

Basically, I need 2 files (see below)

Core.java - contains methods:
stop()
run()
init()
gameLoop()
update()

Manager.java - contains methods (and some others, but these are the methods im having issues with)
setMode()
getGraphics()
update()

I'm using ScreenManager.java as my guide
(from Chapter 2 of Developing Games in Java - I book I've recently purchased and am totally in love with)
The problem is, I want to learn how to make full screen games, but I also want to learn how to implement this code into a JApplet (not a full screen window) and I'm having some trouble making the connection.
(I have another 30 Chapter book on just Java, and only 1 Chapter covers Applets. Not to mention the author of Developing Games in Java assumes the reader is only interested in Full Screen Windows)

Think you can help, but haven't read the Book?
Seriously, it's an awesome book, and I recommend it to anyone who's new to game programming in Java. The source code for ScreenManager.java is found in Chapter 2.
You can visit the author's website and take a look at the code in the book here.

Think you can help, but you don't know what the heck I'm talking about?
That's ok, I'm a little cooky. I appreciate any help you can give me. Basically I want to make a JApplet without drawing graphics using:
1  
2  
3  
4  
5  
public void paint ( Graphics g )
{
   super.paint ( g );
   g.drawString( "Hello World~!", 25, 25 );
}

If you decide to grant me some of your code, I thank you in advance; however I do request that the code you write is VERY VERY VERY simple. I do not want to steal anyone else's code. I really want to read it, understand it, and then expand on it using my own brain.

Thanks in advance.
3  Game Development / Newbie & Debugging Questions / Re: ??? Switching Between "Map Screens" and Layering GUI Layouts on: 2009-03-30 21:12:08
ah I didn't even think about using a cardLayout - that makes so much sense!
I actually tried using a cardLayout to achieve the layering effect, but that didn't work (naturally) :,(

ill def. do some more research on active rendering, thanks for the tips~!
4  Game Development / Newbie & Debugging Questions / ??? Switching Between "Map Screens" and Layering GUI Layouts on: 2009-03-30 19:34:15
Hello~!

I have a new question. ^^  Grin

Question 1: Switch between Map Screens
What is the most effective way to switch through "Screen Types" (eg: Area Map, World Map, Battle Screen)?

I was thinking of using something similar to a JTabbedPane, but without the tabs.

Instead, switching between the "tabs" would be initiated through invisible events that executed when the player is standing on the tile.
psedocode-ish==> "event.setLocation( mapType, mapID, playerLocation[][] )"
Where mapType would be "Area Map", "World Map", "Menu Screen", or "Battle Screen" etc
mapID would call the Map class to paint the map on the current "tab"
and set the avatar at playerLocation[ x ][ y ] on the map

What should I be using to achieve "screen switching"? I don't really think a JTabbedPane would be my best option, considering I'd most likely need another JTabbedPane-ish inside the Menu Screen.

Question 2: Layout Layering
What is the best way to lay out each Screen in each "tab"?
I was thinking of using a MixedLayout in order to achieve a layering effect.
Or is there an easier way to create layers?

For Example:
Layer 1 - Background Layer containing the tiled map
Layer 2 - Objects on the tiled map (eg: a box, a table, a bed)
Layer 3 - Player and Events (eg: treasure, NPCs, exit-map-events)
Layer 4 - Player Information (eg: health bar, help menu, etc)

5  Game Development / Newbie & Debugging Questions / Re: Player Inventory on: 2009-03-30 16:50:38
Hmm, worked a couple of minutes before - maybe you broke it Wink Ahh, works again...

You are welcome. Usually java-gaming.org is an extremly friendly and helpfull community.

Btw. interesting video blog Wink

HAHAHAHAHAHHAHA yea, im a little cooky Tongue
I should really take that off there >.< but it still makes people laugh, so I suppose it's going to stay up Cheesy
6  Game Development / Newbie & Debugging Questions / Re: Player Inventory on: 2009-03-30 16:06:48
Wow, thank you all so much for the tips and linkies~!
I wasn't expecting so much help so quickly, much appreciated

BTW
Welcome to Java game programming.
Java2D is fine for games if your not expecting to do a lot of alpha effects or particles. Otherwise I suggest using a library that supports such things.

This tut should help you:http://fivedots.coe.psu.ac.th/~ad/jg/
Thanks for the warm welcome~! Have a /cupcake Cheesy

I'm actually familiar with this website (and have purchased the book, void of CD, so I have to refer to this site continuously, considering the author doesn't have a single page in the book that "reviews" the code for that chapter - goodness me)

The website is currently experiencing a page load error (perhaps they're simply doing maintenance) so if any curious readers hop into this thread and click the link - it isn't broken.

tyvm 4 all ur help!

Hi!
It is only your opinion based on prejudices. Some people here (at least me) think that Java is the best fitted language for cross-platform game programming.

Look at JCRPG, it is really impressive:
http://jcrpg.blogspot.com/
I concur with you, I've also previously seen JCRPG (and I've been told Runescape was created in Java by a 15 year old boy). The only problem is, of the 8709816-238162-93861-9236-1` million websites devoted to game programming, only ~200 are written in java, and only 3 are RPGs (previously exaggerated example).
So, yes, I suppose my opinion is based on prejudices and Chapter 1 of Killer Game Programming in Java. :\

I do think Java has AMAZING capabilities (that's for sure) - after all my online bank allows me to scan my paycheck straight into my checking account (that's pretty awesomesauce imo)
And I would LOVE to learn more about the language and how I can apply it to creating games (regardless if i currently think I could create a game much easier in C++ or visual basic, or the XNA studio, or any of the microsoft visual studio programs... but probably best to stick with C++)

Also Many Thanks to
cylab & zammbi for collaborating on the best way for me to go about creating an inventory. many /cupcakes to you two~!
7  Game Development / Newbie & Debugging Questions / Player Inventory on: 2009-03-30 04:28:47
Hello~!

I'm new to Game Programming using Java, and I'm sort of kind of just playing around with various tutorials to grasp the concepts of using Java to create Games.
There is one thing I'm having a little trouble with, and I was hoping someone could shed some light for me.

First
Are there any tutorials specifically to learn how to create RPG games using Java?
I've tried to use Google, but of the 1928390182630916208 billion websites on game programming, only about 200 are written in Java, and of those 200, only about 3 are specific to RPG games >.< (common sense, and yes, im exaggerating)

Disclaimer: Yes, I do realize Java is already not the best option for creating games, let alone RPGs. I simply enjoy the challenge; and yes, I do have knowledge of the Java (and many other) language(s).

Second
I realize that's a TON of code (well, at least a good chunk), so I won't ask anyone to "code for me", but can someone perhaps give me a detailed, step by step explanation on how I should go about creating an inventory class that is easy and effective?

I suppose I could create an inventory method:
inventory( ADD, "Herb", 1); //add or delete, name, quantity

To add the item, I would create an object of class Item:
Item item = new Item( "Herb", "Description of Herb", 50, 200, 0  ); //name, description, buy value, baseValue, type

How would I go about deleting that?
Item item = new Item( "", "", 0, 0, 0 ); <== override object item?
^ that wouldn't delete it though right? If I were to view the player's inventory, I think I'd just see a blank line. rawr

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.

BurntPizza (12 views)
2014-09-21 02:42:18

BurntPizza (11 views)
2014-09-21 01:30:30

moogie (13 views)
2014-09-21 00:26:15

UprightPath (23 views)
2014-09-20 20:14:06

BurntPizza (27 views)
2014-09-19 03:14:18

Dwinin (40 views)
2014-09-12 09:08:26

Norakomi (70 views)
2014-09-10 13:57:51

TehJavaDev (96 views)
2014-09-10 06:39:09

Tekkerue (49 views)
2014-09-09 02:24:56

mitcheeb (70 views)
2014-09-08 06:06:29
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!