Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
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]
1  Game Development / Newbie & Debugging Questions / Re: movement key press on: 2013-10-31 12:01:58
this is how I had it originally, but this allows players to move in diagonal lines... and that is now what I want... I need it to move in only one direction at a time
2  Game Development / Newbie & Debugging Questions / movement key press on: 2013-10-31 10:53:41
Hi all,

My question is how do I make a character move in only the direction of the last arrow key input.

So if you press up the character moves upward and then press left without letting go of the up arrow, the character stops moving up and then moves left instead. I have tried and I presume the solution is incredibly simple but it just doesn't want to reveal itself to me.

Here is the code I currently tried, it works but only in one of the axis, when moving up or down the character will change direction if you press either the left or right keys. However if you start with the left or right keys, then the character doesn't change when you press the up or down.

1  
2  
3  
4  
           if(input.left.isPressed()) mx--;
      else if(input.right.isPressed()) mx++;
      else if(input.up.isPressed()) my--;
      else if(input.down.isPressed()) my++;


I have also tried to make it that when you press one of the arrow keys all the other keys are released and that had the same result as this code, one axis it works and the other it does not.

Sorry if it is difficult to understand the question, my brain is fried from trying to figure this out, the quality of the question could be ruined because of that.
3  Game Development / Newbie & Debugging Questions / Re: Appending Perlin maps on: 2013-10-15 09:51:42
is there an example on how to do this, linear hash border thing?
4  Game Development / Newbie & Debugging Questions / Re: Appending Perlin maps on: 2013-10-15 09:43:52
well I suppose to give the question a but more of a standing point... minecraft generates its terrain in chunks of 16x16 blocks, right.  I am only interested in how they managed that, I doubt they made a massive map and just portioned it off... and I realise they probably use many layers of noise but I only want to know that top piece with the sea beach, land, grass and all that...
5  Game Development / Newbie & Debugging Questions / Re: Appending Perlin maps on: 2013-10-15 09:30:28
yeah I read another article on this site that said perlin noise is often mistaken by value noise... However I really cannot tell the difference... fractal noise, value noise and perlin noise all look the same to me...
6  Game Development / Newbie & Debugging Questions / Appending Perlin maps on: 2013-10-15 08:23:45
Hey everyone, got a bit of a question.

I am using a perlin noise function to generate a map of some form, i don't mean to be vague but I am such a newbie with noise generation that I don't actually know how to explain the question in full...

My perlin noise code comes from this site if it helps any: devmag.org.za/2009/04/25/perlin-noise/

My question is, how can I make a tiled noise (i know it's been asked but every one they assume "tiled" means to make it copy paste side by side...) as in I make a map with say 100 width and 100 height... but I want to make another 100x100 map to append to either one of the 4 sides and make it seem as though it was always meant to be a 200x100 map...

sorry if my explanation is not 100% right but hopefully you can help me at least with starting off in the right direction.

Note: I don't want to make 1 tile that just repeats over and over, I want to make tiles that merge with the one next to it, like the left map which has half a lake will have the other half on the right map

hope that's clear enough, thanks everyone anyways oh and also I can't put pictures or code or links because I am using my phone to post this.
7  Game Development / Newbie & Debugging Questions / Game Versioning or Numbering on: 2013-05-07 08:14:41
Hi JGO,

I've done a bit of searching and I know this might seem like a bit of a dull question but... how do you decide on version numbers? For example using a 3 stage version number (if thats the right way to say it) like X.X.X how do you decide which one do increment?

Thanks for the help,
James
8  Game Development / Newbie & Debugging Questions / Re: blocks in a tile game on: 2013-05-06 10:10:05
well that didn't work... and then it did work...

I removed "blocks" and just made the sign an entity and now everything is working as I wanted it too. Thanks Zhon for the help.
9  Game Development / Newbie & Debugging Questions / Re: blocks in a tile game on: 2013-05-03 07:47:46
That doesn't sound like a bad idea, I might need to make a blockManager class then to determine which block it is and what action to take when the player uses that block... like it would see that the block is a fence and then it would run a use method to open or close the fence but only change the data on that instance of fence... I'll have to just try and see  Grin thanks for the help I'll let you know if I managed to get it working. I'm trying to keep it as simple as programmably possible.
10  Game Development / Newbie & Debugging Questions / blocks in a tile game on: 2013-05-02 16:27:03
Hi all,

What is the best way of implimenting blocks into a tile oriented game? blocks like fences, sign posts, chairs maybe and generally things that have unique data to each block. for example each sign post has unique text attached to each one. The way I have it implimented now is giving me trouble with the unique block.

I've got it implimented in the same way my tiles are, the tile class initiates all the tiles. Heres a code snippit of what I mean.
FROM Block.class
1  
2  
3  
4  
5  
6  
7  
public class Block{
   private static SpriteSheet spriteSheet = new SpriteSheet("/spriteSheets/block_sheet.png");

   public static Block[] blocks = new Block[256];
   public static Block empty = new blockVoid      (spriteSheet, 0xFF00FF00, 0);
   public static Block fence = new blockFence      (spriteSheet, 0xFFFF0000, 1);
   public static Block sign = new blockSign      (spriteSheet, 0xFF, 2);


this doesn't really allow for individual setup because if you change it there then it changes for all of the objects.

Thanks for the help,
James
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.

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

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

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

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

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

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

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

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

Riven (29 views)
2014-07-23 20:56:16

ctomni231 (60 views)
2014-07-18 06:55:21
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

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!