Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (578)
games submitted by our members
Games in WIP (499)
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  Games Center / Showcase / Re: New Project (So early in development I have no name for it) on: 2012-12-09 17:06:30
Are you planning on developing this in Java? Have you started writing any code for it?
2  Game Development / Game Play & Game Design / Re: Game Engine library development on: 2012-12-09 17:05:07
@Theagentd
Alright, thanks.

@Geemili
Nice find, thank you.
3  Games Center / Showcase / Re: New Project (So early in development I have no name for it) on: 2012-12-09 01:16:32
Good job, loving the pixel art.
4  Game Development / Game Play & Game Design / Re: Game Engine library development on: 2012-12-09 00:11:03
Yes, you mean like adding a JPanel to it and painting to that component, right? If not please explain, thank you.
5  Game Development / Game Play & Game Design / Re: Game Engine library development on: 2012-12-08 06:32:00
Ok, you confused me. I am using all that, this is not my issue. Stated in the first post. Thanks.
6  Game Development / Game Play & Game Design / Re: Game Engine library development on: 2012-12-07 04:36:40
You say JFrames aren't usually used for games? What do you recommend then? An Applet?
7  Game Development / Game Play & Game Design / Re: Game Engine library development on: 2012-12-07 04:24:08
Thanks for the replys, I understand that theagentd. Could you give me an example of a library that just holds making a JFrame ?
8  Game Development / Game Play & Game Design / Game Engine library development on: 2012-12-07 00:19:22
Alright so I was wondering how would you begin to develop a library around a game. I understand what a library is, but I've never attempted to make one. So how would you start off with making the window in the library so you can easily call it in your game without all the lines necessary to make a JFrame or what ever you needed. Hopefully that makes sense and maybe you clarify how simple it maybe, I usually over think things.
9  Game Development / Newbie & Debugging Questions / Tile Map(XML) system - SOLVED on: 2012-12-05 20:36:08
I was wondering how you guys may go about programming the map loading process. This is what my xml output is, it's basic for right now.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
root of xml file 'map'
==========================
x: 0
y: 0
id: 1
x: 0
y: 32
id: 1
x: 0
y: 64
id: 1
x: 0
y: 96
id: 1
x: 0
y: 128
id: 1


My XML file. X and Y are ovb, id is the image. Since I was only working with 1 tile they are all 0, representing it on the spritesheet.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
<?xml version="1.0" encoding="UTF-8"?>
<map>
   <tile>
       <x>0</x>
       <y>0</y>
       <id>0</id>
   </tile>
   <tile>
       <x>0</x>
       <y>32</y>
       <id>0</id>
   </tile>
   <tile>
       <x>0</x>
       <y>64</y>
       <id>0</id>
   </tile>
   <tile>
       <x>0</x>
       <y>96</y>
       <id>0</id>
   </tile>
   <tile>
       <x>0</x>
       <y>128</y>
       <id>0</id>
   </tile>
</map>


Alright so I understand the basic way to implement a map system with the int[][]. I just cant get my head around how to do it with preset coords rather than in the loop it just multiples its position in the array by the tile size and inside of the int[][] you have a character representation of tiles.

@Edit
For demonstration
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
int[][] map = { {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, },
                     {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, },
                     {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, },
                     {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }};


@Edit
Got it, was overthinking it to much.
10  Game Development / Newbie & Debugging Questions / Re: JFrame issue on: 2011-10-11 22:21:39
I see, thanks for the reply bud. I appreciate it.
11  Game Development / Newbie & Debugging Questions / JFrame issue on: 2011-10-11 22:06:58
Alright, so I'm a beginner in Java programming and I'm not quite sure what do about this problem I'm having. So I hope someone will be able to help. Anyways, when I make a Jframe, it seems to be working properly.



As you can see, the Jframe appears and has its default grey background. You may also notice
1  
2  
3  
         public void paint(Graphics g){
      g.drawString("Testing", 320, 240);
   }
is commented out.

When it isn't commented out and I run it, the Jframe loses it's background color, becomes transparent. Then freezes with what ever it was over as the background, but as you can see it still draws my string "Testing" (red box around it).



Alright, so I commented out drawString and it goes transparent, but does not freeze a background.



Any suggestions?
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.

xsi3rr4x (27 views)
2014-04-15 18:08:23

BurntPizza (24 views)
2014-04-15 03:46:01

UprightPath (39 views)
2014-04-14 17:39:50

UprightPath (21 views)
2014-04-14 17:35:47

Porlus (37 views)
2014-04-14 15:48:38

tom_mai78101 (61 views)
2014-04-10 04:04:31

BurntPizza (120 views)
2014-04-08 23:06:04

tom_mai78101 (220 views)
2014-04-05 13:34:39

trollwarrior1 (187 views)
2014-04-04 12:06:45

CJLetsGame (194 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!