Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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 ... 5
1  Game Development / Game Play & Game Design / Re: Shooting a Fireball on: 2012-03-23 03:29:06
Why is your name DeafTV? 
2  Game Development / Newbie & Debugging Questions / Re: Finding a path to nearest walkable tile, of a nonwalkable tile on: 2012-03-21 03:51:30
After the A* calculations are done you have a closed list.  This is the list of all the tiles that you can reach.  cycle through those and find the one that is closest to the destination (aka: your tree).  You can use a simple calculation to figure out how close it is to the destination like Math.abs(nX - dX) + Math.abs(nY - dY);
3  Game Development / Newbie & Debugging Questions / Re: Finding a path to nearest walkable tile, of a nonwalkable tile on: 2012-03-20 06:16:11
Here's how I would do it, in somewhat pseudo code:

A Node has an x, y, cost, and parentNode.  parentNode is the Node that got you to this Node.
Create a 2d array Node nodeMap[][]; equal to the width and height of the map (in tiles).
Create an ArrayList<Node> openList = new ArrayList<Node>();
Create another ArrayList<Node> path = new ArrayList<Node>();
Add your starting tile to the nodeMap in the X and Y coordinate, set the x and y, cost = 0 and parentNode = null;
Add it to the openList, openList.add(nodeMap[ x ][ y ]);
Now your loop while(!openList.isEmpty()){
   for(int n = 0; n < openList.size(); n++){
      examine the possible reachable neighbors of openList.get(n)
      if this node already has data (check the parent value), see if your cost is better and update it.
      add them to the nodeMap and fill in the values
      Then add that entry to the openList.
      remove the current tile from the openList, openList.remove(n);
   }
}
When you've gotten to this point you've mapped out all reachable tiles.
If the nodeMap[destinationX][destinationY].parent is null, you can't reach the tile
   so scan through your nodeMap and find the tile that is closest to the destination and assign it as the destination.
Otherwise we'll start at the destination.
Work your way back, from destination parent (in nodeMap) to parent to parent until you've reached the start node.
Using 0 as the index will ensure it gets placed at the beginning of the list, path.add(0, thisNode.parent);
Now you have an arraylist that is traceable from start to the destination (or close as you can get to the destination).
4  Game Development / Newbie & Debugging Questions / Re: Finding a path to nearest walkable tile, of a nonwalkable tile on: 2012-03-20 05:40:17
If you can't reach the tree, it shouldn't be in your open list.
5  Game Development / Newbie & Debugging Questions / Re: Finding a path to nearest walkable tile, of a nonwalkable tile on: 2012-03-20 05:00:40
Examine the tiles in the closed list, calculate the distance to the destination and pick the one that has the least.
6  Game Development / Game Play & Game Design / Re: smoother x/y-axis increments on: 2012-03-18 04:03:19
If you're using any sort of timer that updates (or allows updating) of the sprite position when time's up, then you can just use the speed of the sprite to calculate the new timer time.  Each sprite would need it's own timer, but that's normal.
7  Game Development / Game Play & Game Design / Re: game balance, costs & benefits on: 2012-03-18 03:59:02
I completely understand what 65k is saying.  I thought about this in a Street Fighter scenario.  Maybe your custom character starts out with flat speed, strength, etc...  As you progress you can better fit your character to your style of game play, Increasing one aspect at the penalty of another (each level up, allows you to move x aspect points).  Some prefer fast players with combo moves, others the big brutes, and then there's the lamers who prefer sitting in a corner throwing shuriken the whole time.

I think it's a good idea, as long as it doesn't become a game of rock-paper-scissors (strength beats speed, speed beats stamina, stamina beats strength).
 
8  Discussions / General Discussions / Re: Anyone want to help test my Voxel Editor? on: 2012-03-16 06:33:45
Works fine here with Ubuntu 10.10, however you failed to mention that arrow keys moves and rotates the camera.
9  Game Development / Newbie & Debugging Questions / Re: Could someone explain this line of code? on: 2012-03-13 18:59:32
>> 8 gives you green, because green starts at the 8th bit (it's address, if you will).  >> shifts in bits,  so to get red it's >> 16 (3rd byte) and so on.
10  Discussions / Miscellaneous Topics / Re: Statistics project: Please take a few seconds to answer! :) on: 2012-03-13 14:32:22
33, Caucasian, Male, heavy metal & techno.


11  Game Development / Newbie & Debugging Questions / Re: Override what? on: 2012-03-12 01:54:09
This whole time I was passing 'this' to it, saving it as 'that'.  I never knew I could use that.createImage().  Thank you for the pointer.
12  Discussions / General Discussions / Re: ZOVE is [seeking volunteer] java programmers! on: 2012-03-06 21:18:20
Yeah, the website could use a lot of work. Reminds me of my first website. I was so silly. Smiley

Edit: Was about to post the link to my old website from 2007 from the way back machine, but I looked it over and it was too embarrassing, lol.
Oh My.  I didn't know this existed...  Time to usurp Zove's post:
http://web.archive.org/web/20041206233914/http://gbeebe.com/index.php?date=2004-08-11 When I aspired to do a web comic.
http://web.archive.org/web/20030803062838/http://www.gbeebe.com/ Hey, my old logo!
13  Discussions / Miscellaneous Topics / Re: Single atom transistors! on: 2012-03-06 20:29:26
That was meant as a joke, actually, I think everyone understood that.  I was going to reference Microsoft in the joke, but figured not everyone has the hatred that I do towards them.

Yeah, it's not like you split atoms when you break a glass.
I'm going to go break glass over and over until I split an atom. Just to prove you wrong!
The look on your face when you actually do it... oh, wait...
14  Game Development / Game Play & Game Design / Re: What makes a Good RPG? Your thoughts/opinion. on: 2012-03-06 17:11:50
Story line/Plot, Mini/side quests, Rare Items with cool powers.  I've played some decent RPGs that didn't have great sound or music.
I also think that if you can keep the player involved, for say 50 total hours, until the game is won, you've done a good job.
15  Discussions / Miscellaneous Topics / Re: Single atom transistors! on: 2012-03-05 06:07:07
And what happens when you get some Read/Write access error, due to some bad multi-thread programming.  Could you accidentally split the atom?
16  Java Game APIs & Engines / Java 2D / Re: Getting rid of trails? on: 2012-03-05 02:22:42
where is g.clearRect(0, 0, width, height); ?
17  Discussions / General Discussions / Re: The nD on: 2012-03-04 05:02:28
... As long as it's not another Phantom Console.
18  Game Development / Newbie & Debugging Questions / Re: Using JScrollPane as the camera for a top-down shooter on: 2012-03-01 04:55:19
but it's working fine... maybe it's an OpenJVM thing.  I have to try it on a windows machine.
19  Game Development / Newbie & Debugging Questions / Re: Using JScrollPane as the camera for a top-down shooter on: 2012-03-01 04:35:21
I had setIgnoreRepaint(true); then called repaint(); in the main loop each frame.  Kinda' the same thing, I guess.
20  Game Development / Newbie & Debugging Questions / Re: Using JScrollPane as the camera for a top-down shooter on: 2012-02-29 06:58:45
My Paint method looks, like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
public void paint(Graphics g) {
     
      Graphics2D b = (Graphics2D) bufferStrategy.getDrawGraphics();
       //b.clearRect(0, 0, WIDTH, HEIGHT);
      b.drawImage(imgDbl, 0, 0, screenWidth, screenHeight, null);
       //b.drawImage(imgAll, 0, 0, null);
      b.dispose();
       bufferStrategy.show();
     
   }


Note:  My main class extends Frame, and a canvas is added to it.
21  Game Development / Newbie & Debugging Questions / Re: Using JScrollPane as the camera for a top-down shooter on: 2012-02-29 05:53:47
Well, IMHO, I think they're wrong.
22  Game Development / Newbie & Debugging Questions / Re: Using JScrollPane as the camera for a top-down shooter on: 2012-02-29 05:42:35
To center a player (or any "Followable") in the middle of the screen:

1  
g2.translate(-following.getX() + screenWidth/2, -following.getY() + screenHeight/2);


Yea, I was just being cheap.
23  Game Development / Newbie & Debugging Questions / Re: Using JScrollPane as the camera for a top-down shooter on: 2012-02-29 05:37:30
I would do something to what ra4king is saying, but I would make a Followable interface with .getX() and .getY().  Have any class that you want to be able to follow implement the interface.  You then could do something like this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
//Your variable
Followable following;

//Somewhere else:
following = player1;

public void paint(Graphics g) {
    Graphics2D g2d = (Graphics2D) g;
   
    g2d.translate(following.getX(), following.getY());
   
    //draw stuff


You could then have fancy stuff, like a Camera class that can be followed.  It could move over to where something is going on, and then move back to Player1.  etc... 

It's java, so it's all up to your imagination.
24  Discussions / General Discussions / Re: This ever happen to you? on: 2012-02-24 05:39:46
Hmm, I'd add in something about not aging while in the bubble.

Yea, I've thought about that too, but then I get into the physics behind it and deem it all impossible with the electricity outside being paused in time and not being able to reach the computer to make it work.
25  Discussions / General Discussions / Re: This ever happen to you? on: 2012-02-24 05:17:54
I love it when the alarm clock goes off waking me up early, walk towards the bathroom to take a shower, pause for a sec... run back to the bedroom, grab my cellphone, pull up the calendar...  Today is my day off!   And I'm up before the kids are.  Time to get in some decent programming hours.  I love that feeling.  But then the wife comes down stairs shortly after and asks "Have you been on that thing all night long?"  

I do the whole laying in bed, plotting the next couple of procedures and coming up with solutions to problems, I've even coded in my sleep.  I remember waking up in the middle of the night thinking "that would totally work", but I never get up to type the code... If only I could type in my sleep.

When I was younger, I used to gauge what day it was based on the amount of code that I had.  I remember the feeling of sadness when a 3 day weekend was over and it seemed that I had accomplished squat.  Getting home from school and opening my math book to pull out a quiz that I had jotted pseudo code on the back of, to implement it.  A lot of my coding is done this way now.   I'll bring home, from work, drawings, diagrams, formulas, pseudo code, game maps, etc on blank paper swiped from the fax machine.  When the wife and kids are in bed it's code time.  Sometimes it'll be midnight and I tell myself "I can wrap this last bit up in a couple of minutes before bed" then when I get it done it's like 3:00.

I assume that I'm not alone, when deciding on a super power, I'd pick the ability to create a bubble around me with about a 6 foot radius.  Everything on the inside would work as normal, everything on the outside would be paused in time.  I could code forever and sleep as much as I want, and still have time to do the things that I must do.
26  Game Development / Performance Tuning / Re: Fast Collision Detection on: 2012-02-22 04:58:09
If you already know how to tell if 2 images at given coordinates overlap, then scan the overlapping pixels in each image in that box, using Image.GetRGB().  If both overlapping pixels contain a solid color then the images have collided.  You could speed this up by making an array of 1's and 0's for each image prior to playing and checking those for collision.  I haven't done this in Java, but from my experiences in other languages, pixel perfect collision is very costly, especially if you have lots of blank pixels in your image, and many on screen images to check.  There are other shortcuts that that aren't as costly, such as bounding vectors (an array of points that outline your shape).  Do you necessarily need pixel perfect collision?
27  Games Center / Featured Games / Re: Pixel Towers - Android / Desktop Game on: 2012-02-21 17:00:14
It's an onboard video card in my linux machine Sad    I installed in on my Acer A500 tablet, it works great on it.  My 5yo son likes it.  A few questions though:  When the people move, the appear to be "animated" so they aren't 1x3 pixel sprites are they?  What does it mean when it says "slow down"?  Did I manage to get a power up, or is it telling me I'm going too fast?
28  Games Center / Featured Games / Re: Pixel Towers - Android / Desktop Game on: 2012-02-21 02:24:05
meh, new error:
Quote
Not a directory: ../pixeltower-android/assets/gfx
Exception in thread "LWJGL Application" java.lang.NullPointerException
   at com.thegreystudios.pixeltower.screen.SplashScreen.present(SplashScreen.java:86)
   at com.thegreystudios.pixeltower.Game.render(Game.java:38)
   at com.thegreystudios.pixeltower.PixelTower.render(PixelTower.java:26)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:163)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:113)
29  Games Center / Featured Games / Re: Pixel Towers - Android / Desktop Game on: 2012-02-21 02:08:35
Can't play in linux?
Quote
java PixelTowers.1.0.4.jar
Exception in thread "main" java.lang.NoClassDefFoundError: PixelTowers/1/0/4/jar
Caused by: java.lang.ClassNotFoundException: PixelTowers.1.0.4.jar
   at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: PixelTowers.1.0.4.jar. Program will exit.
30  Game Development / Newbie & Debugging Questions / Re: Override what? on: 2012-02-17 05:03:16
It needs to have Component so i can use createImage(), and didn't want to rename some of the methods, but that's what I'll do.
Pages: [1] 2 3 ... 5
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (25 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (43 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

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

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

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
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!