Topic needs deleted.

This post has been removed!

No longer willl I be creating an RPG engine, I have taken a new direct and decided to continue the development as a game.

With the menus, I would create an Interface called Menu which I would implement in your CreditsMenu, HelpMenu etc… Then you could store the current menu you’re on:

Menu CurrentMenu

It should contain the methods that you share across all the Menu types. So in that Interface I would have:


public void update();
public void draw(Graphics g);
public void handleInput();

And instead of using If…Else If… statements, you could then just call:

CurrentMenu.update();

Each time you change menus, you set CurrentMenu to be equal to the menu you want.

That is a great Idea, I will be adding that later tonight. Thank you for your insight @Coldstream24. This will help cut down on if statements by a lot!

I am still looking for ideas folks! Hit me up with some good ones!

Found a bug when i try to run it

java.lang.IllegalArgumentException: timeout value is negative
	at java.lang.Thread.sleep(Native Method)
	at com.ChimpyGames.GamePanel.run(GamePanel.java:64)
	at java.lang.Thread.run(Unknown Source)

Doesn’t seem to be a problem thought it’s only started as negative

Thank you for your report. I am aware of this bug, and it will be fixed soon. However, it is not high on the fix list at this moment. I am currently working on a multilayer feature this is currently top priority.

I think a crash in the game loop is a pretty serious problem.

Whatever ‘multilayer’ (multiplayer?) system you’re working on is nowhere near as important.

Multiplayer, yes it was a typo. It does not crash the gameloop… The loop continues to run as scheduled however the first loop is negative after the first loop it continues with no abnormalities. The error has been fixed now, so it is irrelevant now.

I am still looking for suggestions from you guys! So please speak up, what would you like to see in this?

Have you though about using Procedural Terrain Generation?
If so you can take a look at my code.
It also has other “cool” features implemented :slight_smile:

edit:
Link to the “Game”

I would be happy to take a look at it, however I am not sure if I will be using this, as the idea for this engine is for quick and easy game design and development.

Well… if you abstracted all the hard stuff away, then wouldn’t it still be easy to use for the end user? Sounds like you don’t want to take the time to implement it because its hard, no offense! But trust me, random terrain generation would be very useful in an engine. I think not implementing because its hard is silly…

I would kill for a nice easy random terrain implementation, really…kill…try me.

It’s not that it would be hard to implement, because to be honest it wouldnt. I simply do not see much of use for it in an rpg engine where the user can directly build the map.

Would you guys like for this to be Implemented? As I stated I am only doing this to improve upon myself and grow my knowledge in java. This being said if more people than not would like this feature then I will be happy to add a terrain generator based off this one.

Also Gibbo3771, I love your signature, from now on when I don’t get the results I want from code I am going to say this to myself.

A little heads up :slight_smile:
You should not base your random terrain generation on my implementation. (It does not work properly)
You can copy these classes, they are not made by me, but i have slightly tweaked them to my liking.
Everywhere where it says something like

WorldGenerator.chunkSize // or anything from this class

you should change to your own values :slight_smile:

The worldgenerator class is quite messy, but if studied you would get some knowledge of how it works(and how it should be implemented)

When used properly this is the result of a river filled terrain
Example map
Green = Grass
Dark Green/Brown = Trees
Yellow/White = Sand
Blue = Water

EDIT
You should also implement a minimap feature like this
Something along these lines:


public void renderMap() {
    for (int x = 0; x < 30; x++)
        for (int y = 0; y < 30; y++) {
            int block = ChunkManager.getBlock(World.player.pos.x - 14 + x, World.player.pos.y - 14 + y);
            if (x == 14 && y == 14) setColor(Color.WHITE);
            else if (block == -1) setColor(Color.BLACK);
            else if (block == Resources.WATER) setColor(Color.BLUE);
            else if (block == Resources.SAND || block >= Resources.WATER_NW && block <= Resources.GRASS_W) setColor(World.worldGen.sand);
            else if (block == Resources.GRASS) setColor(World.worldGen.grass);
            else if (block == Resources.TREE) setColor(World.worldGen.tree);
            else if (block == Resources.CASTLE) (Color.CYAN);
            if (World.enemies.size() > 0)
                for (Enemy e : World.enemies.toArray(new Enemy[World.enemies.size()]))
                    if (World.player.pos.x - 14 + x == e.pos.x && World.player.pos.y - 14 + y == e.pos.y) setColor(Color.RED);
                        fillRect(mapX + (x * 3), mapY + (y * 3), 3, 3);
                        glColor3d(0, 0, 0);
                        fillRect(mapX + (x * 3) + 1, mapY + (y * 3) + 1, 1, 1);
                    }
}

@Orogamo, Thank you for your advice as well as suggestion. I will be adding a minimap feature that can be disabled as well as enabled via the server. This way the server Administator can choose if he/she would like the minimap feature in use.