Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
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 ... 10
1  Discussions / General Discussions / Re: What genre/artists do you listen to while coding? on: 2014-04-16 22:24:56
Pan!c at The Disco, Fallout Boy, little bit of rap, and a random assortment of others Pointing
2  Games Center / WIP games, tools & toy projects / Re: Astrofirm on: 2014-04-14 03:18:48
new Video  Grin:

https://www.youtube.com/watch?v=_mYKLg6fIQU&feature=youtu.be

<a href="http://www.youtube.com/v/_mYKLg6fIQU?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/_mYKLg6fIQU?version=3&amp;hl=en_US&amp;start=</a>
3  Game Development / Newbie & Debugging Questions / Re: Converting from Applet to JFrame on: 2014-04-14 00:52:41
try this. All I did was remove the
1  
Graphics2D
from in front of "bb"
1  
2  
3  
4  
5  
6  
  public void paint(Graphics g){
     super.paint(g);
     bb= (Graphics2D) g;
     GameLoop.stateStack.render();
     bb.drawImage(backbuffer, 0, 0, this);  
  }-


4  Game Development / Newbie & Debugging Questions / Re: Converting from Applet to JFrame on: 2014-04-13 23:07:38
try checking your paths for your files.
*facepalm*  your right. I don't know. Post the code to the classes that are throwing the exception
5  Game Development / Newbie & Debugging Questions / Re: Converting from Applet to JFrame on: 2014-04-13 23:03:55
try checking your paths for your files.
6  Game Development / Newbie & Debugging Questions / Re: Converting from Applet to JFrame on: 2014-04-13 22:31:24
So all of the exceptions I have now are where I had my Graphics variable bb that would draw stuff, such as right here

1  
Display.bb.drawImage(img, x*16, y*16, this);


How would i do that with my new setup with Graphics 2d?

Well, I guess you could change bb to a Graphics2D object then:

1  
2  
3  
4  
5  
6  
public void paint(Graphics g){
     super.paint(g);
     bb= (Graphics2D) g;
     GameLoop.stateStack.render();
     bb.drawImage(backbuffer, 0, 0, this);
  }


I haven't tried this but it might work
7  Game Development / Newbie & Debugging Questions / Re: Converting from Applet to JFrame on: 2014-04-13 22:14:07
Wait a minute... are you running this program as an applet in eclipse? Because when you change from an applet, you have to tell eclipse to run from the main method. (I think)

Press the dropdown arrow by the run button in eclipse and select "run as> Java Application" while in the GameLoop Class
8  Games Center / WIP games, tools & toy projects / Re: Another sandbox game on: 2014-04-13 22:03:43
There's a bug where if you place something over yourself and you try to move around you fall through the world.
And If you fall too fast
9  Game Development / Newbie & Debugging Questions / Re: Converting from Applet to JFrame on: 2014-04-13 22:00:15
Is it  actually cause I need to have a thread running on this? because before my display class extended my GameLoop class and the thread was in my display class
This and I think you need a main method. just make a main Method in GameLoop that looks like:
1  
2  
3  
public static void main(String args[]){
new Thread(this).start();
}


He gets the run method from implementing Runnable. The Runnable interface doesn't just work with applets.
10  Game Development / Newbie & Debugging Questions / Re: Converting from Applet to JFrame on: 2014-04-13 21:46:13
Nothing should throw that exception  Huh . Post exactly what is outputted from the console
11  Game Development / Newbie & Debugging Questions / Re: Converting from Applet to JFrame on: 2014-04-13 20:27:32
set your Display class to extend JPanel then in your class with the main method put:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
class Main extends JFrame{//whatever class holds you main method
public static JFrame frame;//public and static so other classes can access it. Might want to use a getter and setter here
public Main(){
     frame=new JFrame("frame");// Create new JFrame
    frame.add(new Display());//add the Display (this is posible because the Display class extends JPanel)
    frame.setSize(width,height);//Set the size of the window
    frame.setDefaultCloseOpperation(EXIT_ON_CLOSE);//Make sure all processes are closed when the window is closed
    frame.setLocationRelativeTo(null);//Centers window
    frame.setVisible(true);//Make the window visible
}

public static void main(String[] args){
     new Main();//instantiate the Main class, this has to happen
}

}


in your Display class, your paint method should look like this:

1  
2  
3  
4  
5  
6  
public void paint(Graphics g){//when repaint is called, this method will run
       super.paint(g);
   Graphics2D g2d = (Graphics2D) g;//Graphics2D is a better Graphics, I would recommend using it
       stateStack.render();
        g2d.drawImage(backbuffer, 0, 0, this);  
}


Hope this helps and good luck!  Wink
12  Games Center / WIP games, tools & toy projects / Re: Element X on: 2014-04-13 02:56:13
Very nice! This is pretty good.
13  Game Development / Newbie & Debugging Questions / Re: LibGDX Mouse Position While Zoomed in on: 2014-04-10 16:37:29
never mind I fixed it.
for those who want to know how:

1  
2  
   mx = ((MouseInput.GetX()*camera.zoom - camera.viewportWidth*camera.zoom/2) + camera.position.x);
   my = ((camera.viewportHeight*camera.zoom / 2 + MouseInput.GetY()*camera.zoom) + camera.position.y);
14  Games Center / Featured Games / Re: The Intergalactic Trashman - PLAYABLE ALPHA AVAILABLE!!! on: 2014-04-10 16:27:57
Unity hmm... I guess with its new 2D tools you couldn't resist. I don't blame you for making the switch   Pointing . Still, makes me happy to know that this game started out in Java.
15  Game Development / Newbie & Debugging Questions / LibGDX Mouse Position While Zoomed in on: 2014-04-10 16:24:18
Hey guys,

I'm having a problem with some bit of code that is supposed to return mouse position relative to the main Camera. This code works except when the camera is zooming in (i believe that is when the zoom value is less than 1). Here is the code:

1  
2  
        mx = ((MouseInput.GetX() - camera.viewportWidth/2) + camera.position.x);
   my = ((camera.viewportHeight / 2 + MouseInput.GetY()) + camera.position.y);


PS: This code is only used when selecting game items that are relative to the camera. For Gui I use different Mouse Coordiantes
16  Games Center / WIP games, tools & toy projects / Re: Astrofirm on: 2014-04-10 03:34:02
Working on re-doing minions:


I decided to go with a more simplistic look than before.

Also, I've added Biomes back in. Woo!
17  Games Center / WIP games, tools & toy projects / Re: Astrofirm on: 2014-04-08 21:00:27
What change made you remove biomes?  Sad
The Chunk change, I removed them for testing purposes. I have just been to lazy to add them back. They will be back though.
18  Games Center / WIP games, tools & toy projects / Re: Astrofirm on: 2014-04-08 04:54:04
I'll be honest, I haven't been working on Astrofirm (or any recreational programming for that matter) for a while. I've been a little stressed with school so I focused on that. But, since it's spring break here, I took up Astrofirm again. I still intend to finish the game.

Here is a quick update:
Astrofirm: pre-Alpha 3.0
- I took out biomes for now (due to other changes)
+ I revamped the GUI System. Astrofirm now have more responsive Buttons and Text Windows!
+ I started a chunk system for the terrain. It's not complete, but it has already improved performance by a lot!
+ New Logo that changes color each time the game is loaded (made it myself Pointing)
Screenshots:

New Logo:


New Gui is more uniform and easier to use:
19  Games Center / WIP games, tools & toy projects / Re: Astrofirm on: 2014-04-02 00:32:48
Hey guys quick "update" on the game:

Well I took a little vacation from this project for a while to just recenter my thoughts. After a few weeks, I've decided to start up again on Astrofirm. I really want to finish this game and get it released into the world.

Currently I am working on Improvements to the terrain system and other aspects to the game.

So don't give up just yet!  Pointing
20  Java Game APIs & Engines / OpenGL Development / Re: Tile based terrain lighting on: 2014-04-01 23:01:50
Assuming that you are holding your blocks in a 2d array, all you have to do is create 3 variable to hold the rgb values of the block that has been lit and then sends a reduced amount of that light to the neighbors of the lighted block and repeat until too much light is lost;

So:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
float r,g,b;
Block north,south,east,west;
public void light(){

if(r>0||g>0||b>0){
   east.r=r/4;
   east.g=g/4;
   east.b=b/4;

   west.r=r/4;
   west.g=g/4;
   west.b=b/4;
//...repeat for north and south
}
}


That's basically how I did it. It allows for colored lights that mix and create new colors.
Note:
- This does not use any rays of any kind so if you want walls to block light, this wont work
- if your game does not properly render and derender blocks, this will lag a bit.
21  Discussions / General Discussions / Re: JGO Kickstarter on: 2014-04-01 03:08:58
I can click the medals now but I couldn't at first
[edit]

But I get a server error when I do:
1  
500 Internal Server Error
22  Games Center / Showcase / Re: [Android] Bullet Jump on: 2014-04-01 02:58:50
Post more info on the game. We can't comment on a sentence and an image.  Stare
23  Java Game APIs & Engines / OpenGL Development / Re: Tile based terrain lighting on: 2014-04-01 02:52:29
Would lighting my game suffice? It's not exactly like Starbound but it is very efficient and I can tell you how I did it if you want.

http://i.imgur.com/ALQZzyJ.png

http://i.imgur.com/ALQZzyJ.png
24  Games Center / WIP games, tools & toy projects / Re: MERCury - 2d Game Engine on: 2014-03-31 04:36:16
Maybe you should integrate a console window  Like the Portal console that appears when you press the "`" key

Console cmds:
1  
2  
3  
4  
5  
pause - pauses main thread
resume- self explanatory
getScreen - takes a shot of the window with the game in it, not the console widow or any other window  
getCpuData - prints how much cpu the program is using
newInstance - creates a new instance of the program


Just some ideas  Wink
25  Game Development / Newbie & Debugging Questions / Re: making walk cycle for 2d game on: 2014-03-31 03:08:38
just create an array of images like:

Image[] sprites=new Image[2]

and then create a timer that changes a variable that just alternately switches between the two image array.

btw, that array creates two slots but they are called like sprites[0] and sprites[1] or like sprites[var] with var ranging from 0 to 1

here is some information on Swing Timers

and some information on arrays

Hope this helps at all.

26  Games Center / Showcase / Re: [WEB/Android Libgdx] To The Moon on: 2014-03-30 00:34:29
27  Game Development / Newbie & Debugging Questions / Re: Ship Building Games? on: 2014-03-28 13:55:21
If the particles coordinate are relative to the world coordinates (not the ships) and the emission force is mapped to the rotation of the ship, you shouldn't have to increase anything with the particles because the trail will get bigger as the ship moves faster and should make a nice trail behind it.
28  Games Center / WIP games, tools & toy projects / Re: Spam The Spacebar Rouge/rpg/hack&slash on: 2014-03-28 02:58:12
Looks nice! unfortunately the adfly link sends me to an nonexistent page so I can't down load it. Please fix because I kinda wanna play this.  Pointing
29  Game Development / Newbie & Debugging Questions / Re: Ship Building Games? on: 2014-03-24 02:32:41
Yep pretty much  Wink
30  Game Development / Newbie & Debugging Questions / Re: Ship Building Games? on: 2014-03-24 02:28:00
For the ship building, I would make some kindof system that allows the user to build off of specific nodes or faces in a 2D array in the master class: "Craft". As for the thrust, I'm sure Box2D has a way to add force to an object.

[Disclaimer]
Never actually used Box2D!
Pages: [1] 2 3 ... 10
 

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 (18 views)
2014-04-15 18:08:23

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

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

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

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

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

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

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

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

CJLetsGame (187 views)
2014-04-01 02:16:10
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

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