Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (563)
Games in Android Showcase (151)
games submitted by our members
Games in WIP (604)
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 11: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 09: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.

           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 07: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 07: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 07: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 06: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:

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 06:14:41

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,
8  Game Development / Newbie & Debugging Questions / Re: blocks in a tile game on: 2013-05-06 08: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 05: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 14: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
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,
Pages: [1]
wxwsk8er (49 views)
2015-03-20 15:39:46

Fairy Tailz (42 views)
2015-03-15 21:52:20

Olo (26 views)
2015-03-13 17:51:59

Olo (29 views)
2015-03-13 17:50:51

Olo (33 views)
2015-03-13 17:50:16

Olo (40 views)
2015-03-13 17:47:07

ClaasJG (29 views)
2015-03-10 11:36:42

ClaasJG (36 views)
2015-03-10 11:33:01

Pippogeek (45 views)
2015-03-05 14:36:23

Pippogeek (37 views)
2015-03-05 13:56:12
How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27 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‑
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!