Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (595)
Games in Android Showcase (168)
games submitted by our members
Games in WIP (646)
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: Dropping items in in a stack on: 2014-07-16 03:00:20
Yes each block has its position stored.

The problem is, how do i subtract 1 or the amount needed from each item ABOVE the item that was removed??

2  Game Development / Newbie & Debugging Questions / Re: Dropping items in in a stack on: 2014-07-16 02:54:18
Right but in my game,

How do i shift each block down to replace the item below it?

something like:


Where y is equal to the position of the item below it?

3  Game Development / Newbie & Debugging Questions / Dropping items in in a stack on: 2014-07-16 02:48:22
I am making a game where i have items or blocks stacked on top of each other.

What i would like to do is, when the first item(or the item at the bottom of the stack) is removed, i would like to shift all the blocks above, down into the next position below it and add another block to the top of the stack.

Sort of like in a match 3 game.

Could someone provide instructions for doing this? or some type of psuedocode?

Thanks guys
4  Game Development / Game Play & Game Design / How does the game timberman work? on: 2014-07-15 13:58:57
Hey guys,

i am wondering how the game timberman works?

What do you guys think is the logic behind the programming in the game? For example,

1). how the tree and branches move down each time the player chops. How does the tree continue to move without running out? Maybe they use a really big graphic for the tree so it never runs out?

5  Game Development / Game Mechanics / Re: Assistance with Match-3 Style Game Logic on: 2014-02-24 17:14:41
Ok, so i have it semi-working with this code:

private void moveObjectsDown(int x, int y) {
      // TODO Auto-generated method stub
      for (GameObject o : gameObjects) {
         if(o.getX() == x && o.getY() == y+1){
            // Animation of an object position to the coordinates (100,200), in one second
  , Accessor.POSITION_Y, 1.0f).target(y, y).start(game.tweenManager);
            //o.setPosition(x, y);

This works flawlessly when only one item is removed from a row. But when i remove two items or more from a row, it only moves the items left in that column to the highest position.

I guess a way i could fix this would be to figure out the item with the lowest y position in that particular column and then drop the items according, but i am not sure how to do this.
6  Game Development / Game Mechanics / Re: Assistance with Match-3 Style Game Logic on: 2014-02-23 19:10:58

Nice! Thanks for that. I understand what your code does for the most part. :-)

A few questions, for the cell array, should this be a extended class of the sprite class as the data type?

And then create a method hasOccupant() in the Sprite class? Or does it have some type of other data type it should hold?

Also, how would i go about determining if a cell has an occupant?

Thanks so much man.
7  Game Development / Game Mechanics / Re: Assistance with Match-3 Style Game Logic on: 2014-02-21 13:35:56
So basically.

It first checks if a cell is empty or needs to fall. Then, if it is empty, we go up one row and move that item down to the empty position, and this will continue to happen for all the empty positions until the loop finishes? Correct?

But what if, more than 1 item is removed from a column? Or if more than 1 item is empty in column?

I ask because in my game, the user can connect as many matching sprites as possible. This means they can remove more than 1 item from a column, vs jus 3.
8  Game Development / Game Mechanics / Re: Assistance with Match-3 Style Game Logic on: 2014-02-21 13:25:45
Yes I will be using sprites.

But how do I iterate through to check if the sprite needs to be moved down?
9  Game Development / Game Mechanics / Re: Assistance with Match-3 Style Game Logic on: 2014-02-21 13:04:12
Judging from that statement I would say you need to take a step back fromd games and try to learn Java first. That is of a multi deminsional array type, which pretty much means it holds a bunch of references to blocks of memory (your objects). This is basic coding though, and I highly stress you stop trying to make a game and spend the time to learn programming first. You're only hurting yourself right now.

LOL. Actually i know java very well. I was asking what data type is it. Sprite, int, etc. ;-) I am fully aware of what an array is. This is like my 5th game. Just not sure how the match-3 thing works.

@Siesmic how do you go about updating the occupants each frame?

10  Game Development / Game Mechanics / Re: Assistance with Match-3 Style Game Logic on: 2014-02-21 11:15:49
Ah. Thank you for that. :-)

But how exactly does the cell[][] work?

Of what type is it?

And how do you go about updating the occupant?

I'm guessing get occup just returns the sprite.

Thanks a lot for your help so far!
11  Game Development / Game Mechanics / Assistance with Match-3 Style Game Logic on: 2014-02-21 04:09:52
Hi guys,

I would like to build a "connect the dots" style game.

I already know how to fill in the grid for the game and i know how to remove the objects when the user selects a pair.

The problem is, i am not sure how to fill in spaces when objects are removed.

For example, if 2 items are removed from row 1 and 1 item is removed from row 2. what would be the algorithm to drop the items in row 2 down to slots, and the items in row 1 down 1 position above where the item was removed.

I hope i exlained my question well. For this game i will be using Libgdx(which is java) so any java pseudocode will be GREAT. I will also be using sprites of libgdx and tween engine to move objects.

Thanks so much guys, hope i can find the help i need.
Pages: [1]
deepthought (47 views)
2015-06-30 15:39:44

deepthought (50 views)
2015-06-30 15:39:09

deepthought (62 views)
2015-06-30 15:36:52

Za\'Anzabar (34 views)
2015-06-29 05:44:54

TritonDreyja (46 views)
2015-06-24 17:10:40

CopyableCougar4 (46 views)
2015-06-23 00:34:45

BurntPizza (51 views)
2015-06-21 20:36:46

cookiecompiler (93 views)
2015-06-11 15:42:53

cookiecompiler (55 views)
2015-06-11 15:41:14

NegativeZero (79 views)
2015-06-11 09:49:18
How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

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 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!