worldgen tweaks
This commit is contained in:
@@ -23,7 +23,7 @@ public class WorldCreator {
|
||||
Level l;
|
||||
|
||||
// first level
|
||||
l = LevelGenerator.build(rand.nextLong(), 30, LevelGenerator.DUNGEON_THEME); //
|
||||
l = LevelGenerator.build(rand.nextLong(), 5, LevelGenerator.DUNGEON_THEME); //
|
||||
w.addLevel(l);
|
||||
|
||||
w.createPlayer(0);
|
||||
|
||||
@@ -5,7 +5,6 @@ import mightypork.rogue.world.Coord;
|
||||
import mightypork.rogue.world.entity.Entity;
|
||||
import mightypork.rogue.world.entity.EntityData;
|
||||
import mightypork.rogue.world.entity.renderers.PlayerRenderer;
|
||||
import mightypork.rogue.world.level.Level;
|
||||
import mightypork.rogue.world.tile.Tile;
|
||||
|
||||
|
||||
|
||||
@@ -29,12 +29,9 @@ public class LevelGenerator {
|
||||
// start
|
||||
map.addRoom(ROOM_SQUARE);
|
||||
|
||||
for (int i = 0; i < 1+complexity/4 + rand.nextInt(3 + complexity); i++) {
|
||||
for (int i = 0; i < 1+complexity/2 + rand.nextInt((int) (3 + complexity*1.5)); i++) {
|
||||
map.addRoom(ROOM_SQUARE);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 1 + complexity/8 + rand.nextInt(1 + complexity); i++) {
|
||||
map.addRoom(DEAD_END);
|
||||
if(rand.nextInt(4)>0) map.addRoom(DEAD_END);
|
||||
}
|
||||
|
||||
map.buildCorridors();
|
||||
|
||||
@@ -125,16 +125,16 @@ public class ScratchMap {
|
||||
|
||||
switch (rand.nextInt(4)) {
|
||||
case 0:
|
||||
center.x += 2 + rand.nextInt(6);
|
||||
center.x += 1 + rand.nextInt(4);
|
||||
break;
|
||||
case 1:
|
||||
center.x -= 2 + rand.nextInt(6);
|
||||
center.x -= 1 + rand.nextInt(4);
|
||||
break;
|
||||
case 2:
|
||||
center.y += 2 + rand.nextInt(6);
|
||||
center.y += 1 + rand.nextInt(4);
|
||||
break;
|
||||
case 3:
|
||||
center.y -= 2 + rand.nextInt(6);
|
||||
center.y -= 1 + rand.nextInt(4);
|
||||
}
|
||||
|
||||
final RoomDesc rd = rb.buildToFit(this, theme, rand, center);
|
||||
@@ -266,7 +266,7 @@ public class ScratchMap {
|
||||
Coord start = nodes.get(0);
|
||||
Set<Coord> starts = new HashSet<>();
|
||||
|
||||
for (int i = 0; i < 1+rooms.size()/8; i++) {
|
||||
for (int i = 0; i < 2 + rooms.size() / 5; i++) {
|
||||
if (!starts.contains(start)) {
|
||||
for (int j = 0; j < nodes.size(); j++) {
|
||||
buildCorridor(start, nodes.get(j));
|
||||
|
||||
@@ -28,7 +28,7 @@ public class SimpleRectRoom implements RoomBuilder {
|
||||
map.border(min, max, theme.wall());
|
||||
map.protect(min, max);
|
||||
|
||||
for (int i = 0; i <= 2 + rand.nextInt(4); i++) {
|
||||
for (int i = 0; i <= rand.nextInt(6); i++) {
|
||||
final Coord door = min.copy();
|
||||
switch (rand.nextInt(4)) {
|
||||
case 0:
|
||||
|
||||
@@ -2,9 +2,7 @@ package mightypork.rogue.world.tile.models;
|
||||
|
||||
|
||||
import mightypork.rogue.world.tile.Tile;
|
||||
import mightypork.util.math.color.COMMODORE;
|
||||
import mightypork.util.math.color.Color;
|
||||
import mightypork.util.math.color.PAL16;
|
||||
import mightypork.util.math.color.RGB;
|
||||
|
||||
|
||||
|
||||
@@ -3,10 +3,8 @@ package mightypork.rogue.world.tile.models;
|
||||
|
||||
import mightypork.rogue.world.tile.Tile;
|
||||
import mightypork.rogue.world.tile.renderers.DoorRenderer;
|
||||
import mightypork.util.math.color.COMMODORE;
|
||||
import mightypork.util.math.color.Color;
|
||||
import mightypork.util.math.color.PAL16;
|
||||
import mightypork.util.math.color.RGB;
|
||||
|
||||
|
||||
public class SimpleDoor extends AbstractTile {
|
||||
|
||||
@@ -2,7 +2,6 @@ package mightypork.rogue.world.tile.models;
|
||||
|
||||
|
||||
import mightypork.rogue.world.tile.Tile;
|
||||
import mightypork.util.math.color.COMMODORE;
|
||||
import mightypork.util.math.color.Color;
|
||||
import mightypork.util.math.color.RGB;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user