Jump to content

  • Log In with Google      Sign In   
  • Create Account

gchewood

Member Since 30 Aug 2012
Offline Last Active Jul 19 2014 08:24 AM

#5097119 Contents of the board not moving down after a scoring move

Posted by gchewood on 26 September 2013 - 06:11 PM

Well your physics is updating, it's just the visuals that aren't!
Your problem is that when you call the dropDownSquares() function, it sets the deleted square equal to the one above it (which includes its rectangles X and Y values). 

 

Here's a quick fix, you might wanna find a prettier one, given that the rest of your code is nicely organised:

 

New dropDownSquares:

public void dropDownSquares(int row)
        {
            for (int i = row; i > 0; i--)
            {
                for (int j = 0; j < boardCols; j++)
                {
                  
                    moveCell(i, j, board[i - 1, j]);
                    deleteCell(i - 1, j);
                }
            }
        } 

where the moveCell function is just the fillCell with the changed Y value added:

public void moveCell(int row, int col, Square sq)
        {
            board[row, col] = sq;
            if(sq!=null)board[row, col].square.Y += 16;
        }



#5086493 Simple question about tiled games

Posted by gchewood on 16 August 2013 - 09:43 AM

Assuming you're targeting modern smart phones, I doubt you'll need to worry that much about performance with a top down 2D styled game!

 

If I were you, I'd definitely go for the smallest grid size possible, for collisions, events etc as well as graphics. The main reason I can think of is that for some of your

bigger environment objects, you might want different parts to have different properties. So for example, if you store a tree as a collection of smaller tiles, you'll be able to

make it so the character can go beneath the top part of the tree but collides with its base. I imagine there'll be lots of other similar examples too.

 

A good idea might be to have a quick look at one of the RPG makers, they've pretty much perfected this type of thing: http://www.rpgmakerweb.com/




#5079513 Rendering models with transparent parts

Posted by gchewood on 22 July 2013 - 01:17 AM

Well I've solved it. Not entirely sure what was going on but the behaviour of these transparent parts made had me speculating that there was just some simple material options that could fix it (and I was right).

I'm working in 3ds max. Separated the model into opaque and transparent models. Applied the same texture (in 2 dif instances) to each model and then recombined them. Problem solved, works fine.

I'm guessing this forced XNA to interpret the model as having 2 ModelMeshParts instead of 1?

Thanks for the input all the same!




#5027803 Best way to do terrain?

Posted by gchewood on 01 February 2013 - 05:04 AM

This is my first time working on a large open terrain-type level (not skyrim large, just bigger than any indoor scene would ever be) and I'm struggling to find the right way to do the terrain visuals.

 

My game is low-poly, handpainted textured (WoW style sort of). At the moment I'm using a standard heightmap based terrain with an RGBA mask that stores texture-splatting weights. This is an easy enough approach (and is the one that is favoured by my physics engine - the game is very reliant on physics). This approach seems to incur the following limitations (please correct me if I'm wrong here):

 

1) restrictions on level geometry (e.g I'd like to have a rock arch, some sharp ledges and a hollowed-out volcano)

2) wasted vertices on areas that need less detail (e.g flat beach)

3) texture splatting means restricted texturing detail. Increasing the vertex count would help this but would be bad for rendering and bad for physics.

 

So instead, I'm thinking of going for something more akin to the mario galaxy type levels: (http://images1.fanpop.com/images/image_uploads/Super-Mario-Galaxy-Screens-super-mario-galaxy-815698_1280_720.jpg)

 

Using regular models for the terrain would solve the first 2 problems above (I think?) but I'm not clear how it's best to texture such a level. Obviously a lot of the texturing needs to be repeated tiles (before I was only using 4 256x256 textures). But at the same time, if you want the model to have the right texture coordinates in order to repeat a small texture many times, you need those extra vertices! So it seems to be a bit of a trade-off.

 

Advice?

 

Thanks in advance.

 




PARTNERS