mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 11:34:05 +09:00
Added water tex, now blue water actually makes you (and your glow) look blue-tinted, coloured light will affect colour of your glow altogether.
Former-commit-id: 95de1367817249d84dbc8add5e19e63846bc94e6 Former-commit-id: ab4bb16681c53105e43763547833e49f86bf4718
This commit is contained in:
@@ -49,6 +49,17 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##*=- What feeling do you want to convey to the player?
|
||||||
|
|
||||||
|
|
||||||
|
== Always think WHY would you want to add _something_ on the game
|
||||||
|
- e.g. Why you are adding RPG leveling system?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
See also:
|
||||||
|
HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS
|
||||||
|
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
|
|
||||||
@@ -58,6 +69,21 @@
|
|||||||
- Hard to actually die, but once you die, you're done.
|
- Hard to actually die, but once you die, you're done.
|
||||||
+ Config: imtooyoungtodie for easy mode
|
+ Config: imtooyoungtodie for easy mode
|
||||||
|
|
||||||
|
- Genre: Adventure, Open world (towns in RPG, building, town managing (conquer existing one or
|
||||||
|
you build one and persuade existing people to move in) -> See Dwarf Fortress and Animal Crossing)
|
||||||
|
|
||||||
|
* Adventure: adventure this vast—5,5 km wide—world, discover new (and good/horrible) things
|
||||||
|
|
||||||
|
* Open world:
|
||||||
|
- Building: building your own houses, structures, etc.
|
||||||
|
- Town managing:
|
||||||
|
1. Build your own little hamlet and manage it
|
||||||
|
or-
|
||||||
|
2. Conquer existing one and become a ruler
|
||||||
|
The town is a special hamlet that can be tailored for your taste
|
||||||
|
- Survival:
|
||||||
|
mobs will trying to attack your assets (yourself, your hamlet, your people)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* Side view
|
* Side view
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -13,7 +13,7 @@ Gold: Hue 43, low Saturation
|
|||||||
Aurichalcum: Hue 43, mid-high Saturation
|
Aurichalcum: Hue 43, mid-high Saturation
|
||||||
Copper: Hue 33,
|
Copper: Hue 33,
|
||||||
Copper rust: Hue 160
|
Copper rust: Hue 160
|
||||||
Iron rust: Hue 15
|
Iron rust: Hue 21
|
||||||
|
|
||||||
|
|
||||||
* Size variation
|
* Size variation
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 78 KiB |
@@ -49,6 +49,17 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
##*=- What feeling do you want to convey to the player?
|
||||||
|
|
||||||
|
|
||||||
|
== Always think WHY would you want to add _something_ on the game
|
||||||
|
- e.g. Why you are adding RPG leveling system?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
See also:
|
||||||
|
HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS
|
||||||
|
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
|
|
||||||
@@ -58,6 +69,21 @@
|
|||||||
- Hard to actually die, but once you die, you're done.
|
- Hard to actually die, but once you die, you're done.
|
||||||
+ Config: imtooyoungtodie for easy mode
|
+ Config: imtooyoungtodie for easy mode
|
||||||
|
|
||||||
|
- Genre: Adventure, Open world (towns in RPG, building, town managing (conquer existing one or
|
||||||
|
you build one and persuade existing people to move in) -> See Dwarf Fortress and Animal Crossing)
|
||||||
|
|
||||||
|
* Adventure: adventure this vast—5,5 km wide—world, discover new (and good/horrible) things
|
||||||
|
|
||||||
|
* Open world:
|
||||||
|
- Building: building your own houses, structures, etc.
|
||||||
|
- Town managing:
|
||||||
|
1. Build your own little hamlet and manage it
|
||||||
|
or-
|
||||||
|
2. Conquer existing one and become a ruler
|
||||||
|
The town is a special hamlet that can be tailored for your taste
|
||||||
|
- Survival:
|
||||||
|
mobs will trying to attack your assets (yourself, your hamlet, your people)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* Side view
|
* Side view
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class PBFSigrid {
|
|||||||
|
|
||||||
p.inventory = new ActorInventory((int) p.actorValue.get("encumbrance"), true);
|
p.inventory = new ActorInventory((int) p.actorValue.get("encumbrance"), true);
|
||||||
|
|
||||||
p.setPosition(2048 * 16, 300 * 16);
|
p.setPosition(4096 * 16, 300 * 16);
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,5 +31,6 @@ public class SetBulletin implements ConsoleCommand {
|
|||||||
*/
|
*/
|
||||||
public void send(String[] message) {
|
public void send(String[] message) {
|
||||||
((Bulletin) (Terrarum.game.bulletin.getUI())).sendBulletin(message);
|
((Bulletin) (Terrarum.game.bulletin.getUI())).sendBulletin(message);
|
||||||
|
System.out.println("sent bulletin");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,14 +113,14 @@ public class Game extends BasicGameState {
|
|||||||
debugWindow = new UIHandler(new BasicDebugInfoWindow());
|
debugWindow = new UIHandler(new BasicDebugInfoWindow());
|
||||||
debugWindow.setPosition(0, 0);
|
debugWindow.setPosition(0, 0);
|
||||||
|
|
||||||
/*bulletin = new UIHandler(new Bulletin());
|
bulletin = new UIHandler(new Bulletin());
|
||||||
bulletin.setPosition(
|
bulletin.setPosition(
|
||||||
(Terrarum.WIDTH - bulletin.getUI().getWidth())
|
(Terrarum.WIDTH - bulletin.getUI().getWidth())
|
||||||
/ 2
|
/ 2
|
||||||
, 0
|
, 0
|
||||||
);
|
);
|
||||||
bulletin.setVisibility(true);
|
bulletin.setVisibility(true);
|
||||||
*/
|
|
||||||
|
|
||||||
UIHandler msgtest = new UIHandler(new Message(400, true));
|
UIHandler msgtest = new UIHandler(new Message(400, true));
|
||||||
String[] msg = {"Hello, world!", "안녕, 세상아!"};
|
String[] msg = {"Hello, world!", "안녕, 세상아!"};
|
||||||
@@ -199,7 +199,6 @@ public class Game extends BasicGameState {
|
|||||||
, -MapCamera.getCameraY() * screenZoom
|
, -MapCamera.getCameraY() * screenZoom
|
||||||
);
|
);
|
||||||
|
|
||||||
MapDrawer.render(gc, g);
|
|
||||||
actorContainer.forEach(
|
actorContainer.forEach(
|
||||||
actor -> {
|
actor -> {
|
||||||
if (actor instanceof Visible) {
|
if (actor instanceof Visible) {
|
||||||
@@ -207,6 +206,14 @@ public class Game extends BasicGameState {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
actorContainer.forEach(
|
||||||
|
actor -> {
|
||||||
|
if (actor instanceof Glowing) {
|
||||||
|
((Glowing) actor).drawGlow(gc, g);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
MapDrawer.render(gc, g);
|
||||||
|
|
||||||
// Slick's MODE_COLOR_MULTIPLY is clearly broken... using GL11
|
// Slick's MODE_COLOR_MULTIPLY is clearly broken... using GL11
|
||||||
LightmapRenderer.renderLightMap();
|
LightmapRenderer.renderLightMap();
|
||||||
@@ -219,14 +226,6 @@ public class Game extends BasicGameState {
|
|||||||
GL11.glDisable(GL11.GL_BLEND);
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
g.setDrawMode(Graphics.MODE_NORMAL);
|
g.setDrawMode(Graphics.MODE_NORMAL);
|
||||||
|
|
||||||
actorContainer.forEach(
|
|
||||||
actor -> {
|
|
||||||
if (actor instanceof Glowing) {
|
|
||||||
((Glowing) actor).drawGlow(gc, g);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
uiContainer.forEach(ui -> ui.render(gc, g));
|
uiContainer.forEach(ui -> ui.render(gc, g));
|
||||||
debugWindow.render(gc, g);
|
debugWindow.render(gc, g);
|
||||||
consoleHandler.render(gc, g);
|
consoleHandler.render(gc, g);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Gold: Hue 43, low Saturation
|
|||||||
Aurichalcum: Hue 43, mid-high Saturation
|
Aurichalcum: Hue 43, mid-high Saturation
|
||||||
Copper: Hue 33,
|
Copper: Hue 33,
|
||||||
Copper rust: Hue 160
|
Copper rust: Hue 160
|
||||||
Iron rust: Hue 15
|
Iron rust: Hue 21
|
||||||
|
|
||||||
|
|
||||||
* Size variation
|
* Size variation
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.Torvald.Terrarum.MapDrawer;
|
package com.Torvald.Terrarum.MapDrawer;
|
||||||
|
|
||||||
|
import com.Torvald.Terrarum.*;
|
||||||
import com.Torvald.Terrarum.Actors.Player;
|
import com.Torvald.Terrarum.Actors.Player;
|
||||||
import com.Torvald.Terrarum.Terrarum;
|
|
||||||
import com.Torvald.Terrarum.Game;
|
|
||||||
import com.Torvald.Terrarum.GameMap.GameMap;
|
import com.Torvald.Terrarum.GameMap.GameMap;
|
||||||
import com.Torvald.Terrarum.GameMap.MapLayer;
|
import com.Torvald.Terrarum.GameMap.MapLayer;
|
||||||
import com.jme3.math.FastMath;
|
import com.jme3.math.FastMath;
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.newdawn.slick.*;
|
import org.newdawn.slick.*;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -67,7 +67,7 @@ public class MapCamera {
|
|||||||
private static final byte ICE_NATURAL = 29;
|
private static final byte ICE_NATURAL = 29;
|
||||||
private static final byte ICE_MAGICAL = 30;
|
private static final byte ICE_MAGICAL = 30;
|
||||||
|
|
||||||
private static final Byte[] TILES_CONNECT_SELF = {
|
private static Byte[] TILES_CONNECT_SELF = {
|
||||||
COPPER
|
COPPER
|
||||||
, IRON
|
, IRON
|
||||||
, GOLD
|
, GOLD
|
||||||
@@ -77,7 +77,7 @@ public class MapCamera {
|
|||||||
, ICE_MAGICAL
|
, ICE_MAGICAL
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final Byte[] TILES_DARKEN_AIR = {
|
private static Byte[] TILES_DARKEN_AIR = {
|
||||||
STONE
|
STONE
|
||||||
, DIRT
|
, DIRT
|
||||||
, GRASS
|
, GRASS
|
||||||
@@ -85,13 +85,26 @@ public class MapCamera {
|
|||||||
, GRAVEL
|
, GRAVEL
|
||||||
, SNOW
|
, SNOW
|
||||||
, ICE_NATURAL
|
, ICE_NATURAL
|
||||||
|
, (byte)224, (byte)225, (byte)226, (byte)227, (byte)228, (byte)229, (byte)230, (byte)231
|
||||||
|
, (byte)232, (byte)233, (byte)234, (byte)235, (byte)236, (byte)237, (byte)238, (byte)239
|
||||||
|
, (byte)240, (byte)241, (byte)242, (byte)243, (byte)244, (byte)245, (byte)246, (byte)247
|
||||||
|
, (byte)248, (byte)249, (byte)250, (byte)251, (byte)252, (byte)253, (byte)254, (byte)255
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tiles that half-transparent and has hue
|
||||||
|
* will blend colour using colour multiplication
|
||||||
|
* i.e. red hues get lost if you dive into the water
|
||||||
|
*/
|
||||||
|
private static Byte[] TILES_BLEND_MUL = {
|
||||||
|
(byte)224, (byte)225, (byte)226, (byte)227, (byte)228, (byte)229, (byte)230, (byte)231
|
||||||
|
, (byte)232, (byte)233, (byte)234, (byte)235, (byte)236, (byte)237, (byte)238, (byte)239
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param map
|
* @param map
|
||||||
* @param tileSize
|
|
||||||
*/
|
*/
|
||||||
public MapCamera(GameMap map, int tileSize) throws SlickException {
|
public MapCamera(GameMap map) throws SlickException {
|
||||||
this.map = map;
|
this.map = map;
|
||||||
|
|
||||||
tilesWall = new SpriteSheet("./res/graphics/terrain/wall.png"
|
tilesWall = new SpriteSheet("./res/graphics/terrain/wall.png"
|
||||||
@@ -209,6 +222,9 @@ public class MapCamera {
|
|||||||
int thisTileX = nearbyTilesInfo;
|
int thisTileX = nearbyTilesInfo;
|
||||||
int thisTileY = thisTile;
|
int thisTileY = thisTile;
|
||||||
|
|
||||||
|
|
||||||
|
if (isBlendMul((byte) thisTile)) setBlendModeMul();
|
||||||
|
else setBlendModeNormal();
|
||||||
drawTile(TERRAIN, x, y, thisTileX, thisTileY);
|
drawTile(TERRAIN, x, y, thisTileX, thisTileY);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -220,6 +236,7 @@ public class MapCamera {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tilesetBook[mode].endUse();
|
tilesetBook[mode].endUse();
|
||||||
|
setBlendModeNormal();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getGrassInfo(int x, int y, int from, int to) {
|
private static int getGrassInfo(int x, int y, int from, int to) {
|
||||||
@@ -403,4 +420,18 @@ public class MapCamera {
|
|||||||
private static boolean isDarkenAir(byte b) {
|
private static boolean isDarkenAir(byte b) {
|
||||||
return (Arrays.asList(TILES_DARKEN_AIR).contains(b));
|
return (Arrays.asList(TILES_DARKEN_AIR).contains(b));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean isBlendMul(byte b) {
|
||||||
|
return (Arrays.asList(TILES_BLEND_MUL).contains(b));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setBlendModeMul() {
|
||||||
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
|
GL11.glBlendFunc(GL11.GL_DST_COLOR, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setBlendModeNormal() {
|
||||||
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
|
Terrarum.appgc.getGraphics().setDrawMode(Graphics.MODE_NORMAL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class MapDrawer {
|
|||||||
mapTileMap = new SpriteSheet("./res/graphics/terrain/terrain.png", TILE_SIZE, TILE_SIZE);
|
mapTileMap = new SpriteSheet("./res/graphics/terrain/terrain.png", TILE_SIZE, TILE_SIZE);
|
||||||
wallTileMap = new SpriteSheet("./res/graphics/terrain/wall.png", TILE_SIZE, TILE_SIZE);
|
wallTileMap = new SpriteSheet("./res/graphics/terrain/wall.png", TILE_SIZE, TILE_SIZE);
|
||||||
|
|
||||||
new MapCamera(map, TILE_SIZE);
|
new MapCamera(map);
|
||||||
|
|
||||||
System.gc();
|
System.gc();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public class Bulletin implements UICanvas {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(GameContainer gc, Graphics g) {
|
public void render(GameContainer gc, Graphics g) {
|
||||||
/*if (isShowing) {
|
//if (isShowing) {
|
||||||
int lineHeight = Terrarum.gameFontWhite.getLineHeight();
|
int lineHeight = Terrarum.gameFontWhite.getLineHeight();
|
||||||
|
|
||||||
g.setColor(uiColour);
|
g.setColor(uiColour);
|
||||||
@@ -65,7 +65,9 @@ public class Bulletin implements UICanvas {
|
|||||||
+ (i * lineHeight)
|
+ (i * lineHeight)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}*/
|
//}
|
||||||
|
|
||||||
|
System.out.println("arst");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user