Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Key

Member Since 12 Jul 2011
Offline Last Active Aug 08 2012 11:15 PM

Posts I've Made

In Topic: Help with isometric tile movement

08 July 2012 - 02:06 PM

It's hard to see what's going on.

-So how is the coordinate system set up?
-How do you handle moving animation? Does moving has some king of moving state with float coordinates? Or the player just pops into the on cell?

Your code seems overly complex.

Can't you use something like:

-snip-
? This means the player will first move diagonally, than in a straight line towards the target.


I want the sprite to move through the center of each tile. With the code you provided the sprite moves diagonally through each tile. Let me draw up some examples.

In the attached image. The thick black line is what I want to achieve, while the purple line is what your code achieves.

In Topic: Creating a camera class

04 June 2012 - 02:54 PM

Maybe it is just me, but I don't really understand your question. You are using a Vector2 class with

LWJGL and asking what the equivalent is in

LWJGL ?



I'm asking what is the Java/LWJGL equivalent of a Vector2 from C#

In Topic: Best approach to loading and saving game data?

05 April 2012 - 03:47 PM

Reasons why games are not in saved in plain text to prevent cheating, and save bytes (binary format generally takes up less space in disks than text). If saved games are human-readable, then it makes it very easy for anyone to modify it. You can, for example, change your character stats all to 100 if you present them right there in plain text format. You can still do it even in binary, but at least it'd deter enough people.


I looked into saving data into binary format but I'm not very familiar with it. Is there any way to convert values into binary format through an online application? I get things like ô SOH NUL NUL

In Topic: Nothing appears on screen when running

19 February 2012 - 02:11 AM

I have the same problem, and I tried your suggested change too but it did not fix my problem at all! I am feeling stuck! Any other tips please? Posted Image


I think the reason for my problem is that I was creating a new instance of each object in the constructors. So when Main read mainMenu = new MainMenu(); it would then read MainMenu's constructor which was main = new Main(); which would then go back and read mainMenu = new MainMenu(); creating a loop.

In Topic: Nothing appears on screen when running

19 February 2012 - 12:16 AM

I managed to get it to run, but I don't understand why it worked.

Main.cs
    public class Main : Microsoft.Xna.Framework.Game
    {
	    GraphicsDeviceManager graphics;
	    InputHandler inputHandler;
	    public SpriteBatch spriteBatch;
	    SpriteFont spriteFont;
	    MainMenu mainMenu;
	    Vector2 position;
	    Texture2D backgroundImage;
	    public Main()
	    {
		    graphics = new GraphicsDeviceManager(this);
		    Content.RootDirectory = "Content";
		    inputHandler = new InputHandler();
		    [b]mainMenu = new MainMenu(this);[/b]
		    graphics.PreferredBackBufferWidth = 1280;
		    graphics.PreferredBackBufferHeight = 720;
	    }

MainMenu.cs
    public class MainMenu
    {
	    Main main;
	    public MainMenu([b]Game game[/b])
	    {
		    [b]main = (Main)game;[/b]
	    }

The bold is what I changed. Could anyone explained to me what I did?

PARTNERS