Show Posts
|
|
Pages: [1]
|
|
2
|
Game Development / Newbie & Debugging Questions / *rawr* Core JApplet file
|
on: 2009-03-31 06: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.
|
|
|
|
|
4
|
Game Development / Newbie & Debugging Questions / ??? Switching Between "Map Screens" and Layering GUI Layouts
|
on: 2009-03-30 21:34:15
|
Hello~! I have a new question. ^^ Question 1: Switch between Map ScreensWhat 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 LayeringWhat 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 18:50:38
|
Hmm, worked a couple of minutes before - maybe you broke it  Ahh, works again... You are welcome. Usually java-gaming.org is an extremly friendly and helpfull community. Btw. interesting video blog  HAHAHAHAHAHHAHA yea, im a little cooky  I should really take that off there >.< but it still makes people laugh, so I suppose it's going to stay up 
|
|
|
|
|
6
|
Game Development / Newbie & Debugging Questions / Re: Player Inventory
|
on: 2009-03-30 18: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  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 tocylab & 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 06: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
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|