LodeScape RPG

Java 7 + Mac + LWJGL = BAD
Java 6 + Mac + LWJGL = GOOD

It’s Apple’s fault. It’s always Apple’s fault.

That is a very glitchy game.

  • Couldn’t pick up the rock.
  • Walked through EVERYTHING including the walls inside the house.
  • When I exited the house I was no longer in the centre of the screen.

I would focus on making it work properly before implementing new features.

The graphics are okay.

Thats odd HeroesGraveDev, rocks should be fully functional, I have implemented zero collision detection so far so that is not a problem and you should be centered in the screen after you exit, that is something I added

Just went and downloaded the version I posted and took a look at it. You have to be holding down b to pick up a rock, you may just be pressing it. I noticed the text says “Press B to Pick Up Stone”. I will be sure to change it to “Hold B to Pick up Stone” in the next update! Thank you for that. Also when I exit the house I am in the center of the screen, so it is odd that you are not

I like the style of the character did you make him yourself?

I don’t know if this is intentional but when you pick up the rock it is an all or nothing kind of thing… you press b and the rock gets smaller until it is gone into the inventory, but if you stop pressing b before its completed the rock jumps back to full size and you have to start again.

I didn’t make the character myself :persecutioncomplex: I am not very good at making people…

Also that is intentional, I did it that way because It reminded me of the minecraft method of destroying blocks where it is very similar to this: If you start breaking it and you stop midway through the breaking process it resets to not being broken at all. I think it makes sense to do, what do you think?

I think if the rock is getting smaller then you should get some in your inventory, each chunk added per time… or perhaps if you want it to be after hitting it a number of times with a pickaxe like in runescape maybe change it to a rock that is the same size but cracked… then turned to rubble.

Hmmm interesting ideas I will think about it, I may use that fancy new java program Spine to create some animations

Just added a mob class that allows a specified image (animal, monster, etc) to roam the map in random movements (finally figured out a simple way to do this). Eventually you may be able to obtain food from an animal or a monster may attack you or something like that but for now “I’m a mob” is drawn when you come close to the mob. This screenshot doesn’t truly give it some justice but anyhow here it is:

The current mob image is pretty bad (stolen from minecraft :persecutioncomplex:) It will be changed as soon as i figure out what i want it to be

Hi, mind sharing the simple way to make an AI move?
thanx

Sure! It turned out to be pretty simple using libgdx. Ill just go ahead and share the whole class:


package com.reed.birdseye;

import java.util.Random;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public class Mob {
	// Class defines a randomly moving "mob" (animal, monster, etc)

	final int distanceFromMob = 100;
	Random r = new Random();
    //defines the x and y position where the "mob" is
	int x = 500;
	int y = 500; // set to random

	int direction = r.nextInt(5) + 1; // 0 = up, 1 = down, 2 = left, 3 = right,
										// 4 = no movement
	float mobTime = r.nextInt(3) + 1;
	// defines time left for movement - set to random int below 3 (will move around at MOST for three seconds then switch directions)
	final int speed = 1;

	
    //draws the mob, and the text
	void draw(SpriteBatch batch, BitmapFont font) {
		batch.draw(Assets.creeper, Level.levelX + x, Level.levelY + y);
		if (closeEnough())
			font.draw(batch, "I'm a mob", 50, 100);
	}
    //Moves the mov in whatever direction it is set at
	void movement() {
		// constantly decrease the mobTime
		mobTime -= Gdx.graphics.getDeltaTime();
		if (direction == 0 && mobTime > 0) {
			y += speed;//increasing speeds should be changed to some frame independent method using Gdx.graphics.getDeltaTime() ....
		} else if (direction == 1 && mobTime > 0) {
			y -= speed;
		} else if (direction == 2 && mobTime > 0) {
			x -= speed;
		} else if (direction == 3 && mobTime > 0) {
			x += speed;
		} else if (direction == 4 && mobTime > 0) {
			// 4 means no movement
		} else {
        //Reset the values for a new direction and duration
			mobTime = r.nextInt(3) + 1;
			direction = r.nextInt(5) + 1;
		}
	}

    //limits the areas the mob can go so it doesn't wander endlessly off the screen
	void boundingArea(int xCord, int yCord, int width, int height) {
		if (x > xCord + width)
			direction = 2;
		if (x < xCord)
			direction = 3;
		if (y > yCord + height)
			direction = 1;
		if (y < yCord)
			direction = 0;
	}
    //detects how close you are to the mob these variables may be a little hard to understand but all it is, is a distance formula
	boolean closeEnough() {
		return (Math.sqrt((Level.levelX + x - Level.middleX)
				* (Level.levelX + x - Level.middleX)
				+ (Level.levelY + y - Level.middleY)
				* (Level.levelY + y - Level.middleY)) < distanceFromMob);
	}
}

If you have any questions about this feel free to ask

Just finished implementing a simple crafting system (not exactly crafting yet but the concept is all there) that is available in the updated download.
This download includes: new Mob ai, crafting menu (can be accesed by pressing z during gameplay), farm and house have been excluded from this update until some small bugs are fixed.
here is a screenshot of the crafting menu:

The mob is viewable in the bottom left area of the map. Please report any bugs / problems, enjoy!

Download link: http://goo.gl/rf79e

For everyone who was having trouble with opening this on a Mac I will do little tutorial to help you out.

  1. Open up terminal
  2. type java -jar (drag the JAR file to the Terminal window)
  3. Make sure you have a space between -jar and the file you dragged into the window
  4. Press enter and enjoy!

Just spent some time recently to add a new “Mining Robot” which basically goes around collecting a single ore every minute. Eventually you will need to supply it with coal to keep it going but for now it works. Also I added a new iron and copper ore. Copper will be needed to build electronics (such as the mining robot) and iron is used for structures. The top bar of items / amounts has been removed and replaced with a blank bar which eventually will contain tools to use to make a particular task faster / easier. Since there are currently no tools it is blank. You can view your inventory by clicking the box with the slashes in it.
Here is the mining robot and its simple GUI.

At the moment its pretty simple but as I said above it will gain more features soon.
Also here are the new ores and the new Inventory system.

the left ore is copper and the right is iron

Eventually I think I will add pictures to the inventory / robot gui so you know which is which. Here is the updated download: http://goo.gl/RYovl

Looking great so far :smiley: Do you have any plans to procedurally generate content? (presuming so far you’re using a fixed grid owtte).
I always find it hard in rpg projects to keep code as clean as possible X) Good luck!

What font is that?

Eventually I do plan on setting up a randomly generated terrain, right now it is not set in a fixed grid however.

The cooler looking one in the menus? or the one that is drawn when you go over an object?

Just created and added a super cool tree falling animation made with Spine :smiley:

The animation doesn’t completely give it justice so go ahead and download the updated game here: http://goo.gl/f0xAw
If you run out of trees to place just go ahead and click z and place a new tree through the craft menu. If you have any suggestions for more animations to add or anything about the game in general feel free to leave a comment

argh late reply by me
meant the one in the menus