Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (416)
games submitted by our members
Games in WIP (307)
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 ... 35
1  Game Development / Networking & Multiplayer / Re: Images over java? on: 2013-02-19 22:50:22
I know what forms data can take.  Roll Eyes

I was just giving an idea of what he could do; which is send the image's pixels in the form of an integer and interpret them on the client as an integer.

Anyways, I don't think sending images from the client to the server is a great idea unless they're being cached/saved somewhere where they can be re-loaded, and if you plan on having those same images change then somehow a way to check if they're the same version as the servers. (Like a CRC check or something.)

Since this is in the context of gaming, I'll agree with you. I can think of multiple instances where I'd like to send image information over a network with java though.  Smiley
2  Game Development / Networking & Multiplayer / Re: Images over java? on: 2013-02-19 22:29:47
I don't think you understand. Data never take any form, other than bytes. You decide how to interpret these bytes though.

You can send the bytes of an image over the network, and interpret those bytes as an image when you recieve them.
Example:
I can send 32 bits over the network, in a packet. When I receive them, I can interpret them as an integer, representing one huge number.
However, I can also interpret them as a coordinate set composed of two shorts (16 bit each). Yet again, I can interpret them as four letters (4 bits per letter).
Then again, I can interpret them as three letters, and a number between -127 and 127. It's the same data I'm sending though.

This is what protocols are for. You have to decide how you interpret the data you're sending over the network. It's the same reason you can open any file-type with any software in Windows. It's all the same data, but different software make different expectations to it, and interpret it a specific way.

3  Discussions / Miscellaneous Topics / Re: java-gaming.org blocked in Google? on: 2013-02-19 22:09:22
Yeah screw Bing.

I was never too sure if the crawlers actually respect and adhere to whats written in the robots.txt  Cheesy

The ones that do aren't the ones you have to worry about, like Googlebot.
4  Discussions / Miscellaneous Topics / Re: java-gaming.org blocked in Google? on: 2013-02-19 17:07:31
I checked it, and it seems the google crawler has changed. It used to hit the server at roughly 0.1Hz - 1Hz, but according to my logs, it sometimes peaked at 10Hz for over a minute, which my flood-control code (rightfully) deemed a Denial of Service attack. After 10 of these 'attacks', the IP was banned it for 3 days.

Ah. Well, there we go. Why would Google crawl enough to be recognized as a DDoS?
5  Games Center / WIP games, tools & toy projects / Re: Oldschool Snake on: 2013-02-17 23:05:20

I can't do anything about that, with no stack-dumps or anything. Sorry.

I have updated the OP to contain only a link to the android version. Cheers.
6  Discussions / General Discussions / Re: New feature: picture of the day on: 2013-02-17 22:59:30
I'm curious about the PotD today... It's from you Riven, did you create that world generator? looks very impressive!

I second this. You should've linked us somewhere.  Smiley
7  Discussions / Miscellaneous Topics / Re: Legend of Zelda: Look into item dropping algorithms on: 2013-02-17 22:46:43
NES games had to be packed super small, so having a feature-rich game was hard, because of the limits. Not only is it probably obfuscated and compressed to hell, but it was probably written in a way to not make it any bigger that it had to be. Kind of like how intense J4K games are sometimes written in an odd non-obvious way.  Smiley

The first zelda game only takes up 129 kb, on my end.
8  Games Center / Showcase / Re: Fleet Game on: 2013-02-17 22:40:01

I'd go with vector graphics, sure. I'm fairly sure ray tracing is quite different, though.
9  Games Center / Showcase / Re: Fleet Game on: 2013-02-17 21:51:04
[...] the style of old ray traced games.

Wait wait wait! I don't think thaat's what ray-tracing means.

Nice game though. Smiley
10  Games Center / WIP games, tools & toy projects / Re: Operation Santa on: 2013-02-13 11:40:37
Very cute. I didn't make it through the entire game though - just enough to try it.
It seems to run much slower underground for some reason. This could be Java2D's fault.

You had some problems with laying out the correct tiles, based on neighbors? I assume you fixed that.
Else, I'd have asked if you're familiar with bitwise tilemapping. Smiley

Nice, well polished game. Could do with some sounds, and it wouldn't be too much work. Bfxr is your friend. Smiley
11  Games Center / WIP games, tools & toy projects / Re: Oldschool Snake on: 2013-02-13 11:28:56
Huh I downloaded snake.jar but it wouldn't load up for me.

What system are you on?
12  Game Development / Newbie & Debugging Questions / Re: Scrolling Tile Map with Slick2D on: 2013-02-12 22:38:48
Just have an int specify an offset, and draw the map at that offset.
To scroll the map, you just increase that int at the scroll speed, each frame.  Smiley
13  Discussions / General Discussions / Re: Java 7.10 Plugin blocked on Mac on: 2013-02-12 22:02:38
Another patch due 19th February!

I was about to post something about Google and search engines. That comment felt like a punch in the face.
We're back on track!
14  Game Development / Game Mechanics / Re: Easy lightning (and chunk system) on: 2013-02-12 21:50:03
Could your give me some more information about the .5f?

Thanks!
-RoseSlayer

It's a floating point. You can (in most API's) specify a color using three or four floating point values, representing the red, green, blue and sometimes alpha component of a color. They range between 0 and 1. 1 means full blown power of that color, and 0 means no color.

For instance,
1  
0f, 0f, 1f
gives a nice blue color.

1  
0f, 1f, 1f
gives a margenta color.

The last floating point (the alpha one), specifies how transparent the color is - also ranging between 0 and 1. 1 for no transparency, and 0 for full transparency.
1  
0f, 0f, 1f, 0.5f
gives a nice see-through blue color.

This is just a way to specify color though. If you tint your images like I described above, it'll tint everything you draw thereafter with the color you specified.

The same call again, with parameters
1  
0f, 0f, 0f

will reset this, and you can continue drawing your sprites without having to worry about tinting.
15  Game Development / Game Mechanics / Re: Easy lightning (and chunk system) on: 2013-02-12 21:42:54
It looks like you are just drawing a semi transparent black square over the tiles.

It does look that way! Stop doing that, though. You can tint the sprite in Slick2d using
1  
Color.grey.bind();

and in LibGDX using
1  
spriteBatch.setColor(Color.grey);

16  Game Development / Newbie & Debugging Questions / Re: [libgdx]Editable tiled map on: 2013-02-12 21:38:13
Have mine!

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  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
public class TileMap {
   
   private int width, height;
   
   private Tile[][] map;
   
   public TileMap(int width, int height) {
      this.width = width;
      this.height = height;
      initializeTiles(width, height);
   }
   
   private void initializeTiles(int width, int height) {
      map = new Tile[width][height];
      for(int i = 0; i < width; i++) {
         for(int k = 0; k < height; k++) {
            map[i][k] = new Tile();
         }
      }
   }
   
   public void setTile(Tile tile, int x, int y) {
      map[x][y] = tile;
   }
   
   public Tile getTile(int x, int y) {
      if (x < 0 || x >= width || y < 0 || y >= height) {
         return null;
      }
      return map[x][y];
   }
   
   public int getWidth() {
      return width;
   }
   
   public int getHeight() {
      return height;
   }
}


The Tile class can be anything you'd want, and it's easy to get the Tile for altering, or you can make an entirely new Tile, in any cell.
I've always designed in a way where the Tile itself doesn't know it's position, but that's personal preference and a design choice.
You can render this fella easily, by simply looping through each cell.
17  Game Development / Game Mechanics / Re: Camera zooming on specific point on: 2013-02-12 21:31:28
That is what I was doing, and I'm confident I can make it work now.
I think my only problem was that I did not update the camera after zooming it. Obviously, project/unproject isn't going to work, if it's not updated.

Thanks again.
18  Game Development / Game Mechanics / Re: Camera zooming on specific point on: 2013-02-12 18:35:52
Orthographic projections don't have a real zoom...you can only scale & translate.

I'm quite aware. I think you can see through that flaw in my statement, to help me though. Smiley
I think you know what I meant with the original question.
19  Discussions / General Discussions / Re: History of JGO? on: 2013-02-12 17:55:12
I know that the site didn't start out as this forum. It was supposed to be something else (a games portal, or something).
I vaguely remember seeing the design of the old webpage some time ago. I think it was because Riven found it on the server, somewhere. It was hilariously ugly.

I remember seeing ChrisM's posts on here, but it must be years ago when I was just new to the forum. I haven't seen his posts in ages though.

The forum got a lot better in the time I've been around. I can't remember exactly how it was, but dang.. We have so many amazing features now. The wiki, showcase, my files, projects, thanks Riven.  Pointing

I do remember that each board used to have it's own moderators. Markus Persson was a moderator in the "Performance Tuning" category, as well as "Networking and Multiplayer". Kevin Glass was a moderator in "Physics".

Ah. They had the green stars. The times. Cheesy

EDIT: I actually remember that a lot of our more dominant personalities had responsible positions on the forum. Like moderators and banhammers. I won't post their names though. Smiley Oh, this is with the exception of ra4king. I remember the day he joined. It was a beautiful day.
20  Game Development / Game Mechanics / Re: Camera zooming on specific point on: 2013-02-12 15:09:14
This is my attempt at it. Needless to say, it doesn't work as expected.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
public void zoomMaintainPoint(int x, int y, float zoom, OrthographicCamera camera) {
      Vector3 pointToMaintain = new Vector3(x, y, 0);
      camera.project(pointToMaintain);
      camera.zoom = zoom;
      Vector3 pointNewPos = new Vector3(pointToMaintain);
      camera.unproject(pointNewPos);
      int deltaX = (int) (pointNewPos.x - pointToMaintain.x);
      int deltaY = (int) (pointNewPos.y - pointToMaintain.y);
      camera.translate(deltaX, deltaY);
   }
21  Game Development / Game Mechanics / Camera zooming on specific point on: 2013-02-12 14:17:11
I'm using LibGDX, and I'd very much like to zoom in on something specific in my game.
Using the OrthographicCamera, changing the zoom field works wonders, but it zooms in on the center of the screen.

I'd like to move the camera while zooming, so that the point I'm zooming in on, remains on the same window-coordinate.

This would require some magic, figuring out how much I need to move the camera and in what direction, based on a point.
22  Games Center / WIP games, tools & toy projects / Oldschool Snake on: 2013-02-11 19:52:41
Hey! Smiley

This is a simple snake game I made while learning the ways of LibGDX.
This was created in less than 24 hours, and it's been fun.

You can play this on your android.

I hope the controls are intuitive.

If any of you have any tricks as to how to make it run better on android, please do tell.

Feedback is much appriciated.  Pointing

23  Discussions / Miscellaneous Topics / Re: Java 4-Ever on: 2013-02-10 20:35:28
How did William Windows win two golden dukes? Shocked
I want a tatoo like that guy in the movie, except I want it on my buttocks instead of the chest.
24  Games Center / WIP games, tools & toy projects / Re: Pixely Adventure-thing on: 2013-02-10 18:23:19
Don't need to do any translating, just some ezpz logic

If you aren't translating, then the screen view won't move. Undecided

Depends how you view it. The soft libs, like Slick2D lets you specify rendering coordinates, so it doesn't feel like you're translating.
25  Games Center / WIP games, tools & toy projects / Re: Wizards of Yore (second try) on: 2013-02-08 09:12:50
This looks cool. Smiley You're progressing really fast with this. Quite exciting.

What happended to World of Yore?  Pointing
26  Games Center / WIP games, tools & toy projects / Re: Pixely Adventure-thing on: 2013-02-07 11:11:40
I won't go into too much detail here, but here's how it works in this instance:
The player has a speed at which he can move. This is a value determining how many tiles he can move per second.
The wait-period between each move is calculated accoridng to this.

I also have a camera, which is really just a set of world-coordinates. The game is always rendered so that these world-coordinates is always at the center of the screen.
Now, the camera also has a speed at which it can move - also a tiles/second value. The difference is that the cameras position is updated every frame according to this.

Therefore, the camera and the player moves at exactly the same speed.

I previously tried to have the camera move much faster, but it ruined the game feel, because it stopped to wait on the player every move. If the camera stops, the game feels like it's not flowing right anymore - even if the player can move wicked fast.

Now, the player actually moves pretty slowly and I don't think it feels bad at all. Sure, moving is a little clunky, but it's flowing.
27  Game Development / Game Play & Game Design / Re: Favorite Window Size on: 2013-02-05 23:01:57
I deploy with a resizable window. Grin

Same here.

I wonder why so many games don't do that. It requires one line of code for LWJGL and -1 lines of code for Java2D.

I think it's because people per code place elements at hard positions, within the game window. It's easy for me to make a nice HUD that works wonders, if I can assume that my game is always the same resolution.
I just like to do grab the window dimensions every game update, and work from there Smiley
28  Game Development / Game Play & Game Design / Re: Favorite Window Size on: 2013-02-05 11:37:36
I deploy with a resizable window. Grin
29  Games Center / WIP games, tools & toy projects / Re: Blue Saga on: 2013-02-04 13:31:56
I'd really to see the window resizable. It's a pet peeve of mine. persecutioncomplex

EDIT: I found a really easily fixed bug.

Notice the particles are in front of the GUI.
30  Games Center / WIP games, tools & toy projects / Re: Blue Saga on: 2013-02-04 11:42:54
This is beginning to feel really great! I remember when you first started this project Smiley Came a long way.
I will definitely play this once I get home. I'd play this, even if it wasn't from JGO. Looks really interesting!  Pointing

Good job!
Pages: [1] 2 3 ... 35
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
mrbenebob (14 views)
2013-06-19 14:55:23

BrassApparatus (23 views)
2013-06-19 08:52:37

NegativeZero (26 views)
2013-06-19 03:31:52

NegativeZero (29 views)
2013-06-19 03:24:09

Jesse_Attard (33 views)
2013-06-18 22:03:02

HeroesGraveDev (69 views)
2013-06-15 23:35:23

Vermeer (68 views)
2013-06-14 20:08:06

davedes (70 views)
2013-06-14 16:03:55

alaslipknot (62 views)
2013-06-13 07:56:31

Roquen (87 views)
2013-06-12 04:12:32
Smoothing Algorithm Question
by UprightPath
2013-05-28 02:58:26

Smoothing Algorithm Question
by UprightPath
2013-05-28 02:57:33

Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38
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!