Bug fix in LightmapRenderer — Now water attenuates sunlight, new creature attribution: religion sphere

Former-commit-id: fd200afabaf318bec060a8fea9eb82da6f105aad
Former-commit-id: e035368f4d6d589bdb6822301fee763eb00df984
This commit is contained in:
Song Minjae
2016-02-25 01:28:00 +09:00
parent 19630e2147
commit c56e09505b
19 changed files with 209 additions and 171 deletions

View File

@@ -1,163 +1,130 @@
== CHALLENGING, NOT PUNISHING https://www.youtube.com/watch?v=ea6UuRTjkKs
1. CONSISTENT RULES
- No arbitrary unstoppable death
== CHALLENGING, NOT PUNISHING == https://www.youtube.com/watch?v=ea6UuRTjkKs
2. Player's skill involved
- Can play around, not restart
1. CONSISTENT RULES
- No arbitrary unstoppable death
3. Usability of in-game tools
- Players should be able to 'regret' their strategy and adjust.
2. Player's skill involved
- Can play around, not restart
4. Comfortable control
3. Usability of in-game tools
- Players should be able to 'regret' their strategy and adjust.
5. Make players overcome the challenge, not defeating them
4. Comfortable control
6. Let players have "aha" moment when they failed.
- Make them hungry to retry with new strategies.
- Some small things they've could done differently
- e.g. "One-big-hit didn't worked, may I should've picked up high DPS one"
5. Make players overcome the challenge, not defeating them
6. Let players have "aha" moment when they failed.
- Make them hungry to retry with new strategies.
- Some small things they've could done differently
- e.g. "One-big-hit didn't worked, may I should've picked up high DPS one"
== MORE DEPTH, LESS COMPLEXITY https://www.youtube.com/watch?v=jVL4st0blGU
== MORE DEPTH, LESS COMPLEXITY == https://www.youtube.com/watch?v=jVL4st0blGU
1. Memorise less!
- Less burden to, even starting the game
- Start with gentle learning curve, getting slowly steep
- Intuitive UX (UI, control, ...)
- Good tutorial = lessens complexity
1. Memorise less!
- Less burden to, even starting the game
- Start with gentle learning curve, getting slowly steep
- Intuitive UX (UI, control, ...)
- Good tutorial = lessens complexity
2. Intuitive!
2. Intuitive!
3. Calculations per second
- reduce!
3. Calculations per second
- reduce!
4. Players have to know everything to even begin the play == FAIL (irreducible complexity)
- Make them get familiar with rules of the game
- Dwarf Fortress failed this!
4. Players have to know everything to even begin the play == FAIL (irreducible complexity)
- Make them get familiar with rules of the game
- Dwarf Fortress failed this!
== Lots of things players play with (aka don't make them bored)
== Lots of things players can play with (aka don't make them bored) ==
- Combat, battle, building, mechanics, adventure, dungeon explore, spelunking
- Not scaled; easy combat, tough combat, tedious combat, etc.
== Achieving perfect imbalance https://www.youtube.com/watch?v=e31OSVZF77w
== Achieving perfect imbalance == https://www.youtube.com/watch?v=e31OSVZF77w
- Make sure no matter how you skilled, your playable character cannot be good at everything
- Give players __wide pool of options__ to solve problem
(kill the boss, defend their adobe, fast transportation, etc.)
##*=- What feeling do you want to convey to the player?
-=*## What feeling do you want to convey? ##*=-
== Always think WHY would you want to add _something_ on the game
- e.g. Why you are adding RPG leveling system?
== Always think WHY you want to add _something_ on the game ==
- e.g. Why are you adding RPG leveling system? What it would do to the players? How would they play with?
See also:
HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS
See also: HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS
====================================
* Friendlier version of Dwarf Fortress Adventure mode
- Yet _lots of fun_
- Add Fortress mode features by 'make your own settling'
- Hard to actually die, but once you die, you're done.
+ Config: imtooyoungtodie for easy mode
== Friendlier version of Dwarf Fortress Adventure 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)
- Yet _lots of fun_
- Add Fortress mode features by 'make your own settling'
- Hard to actually die, but once you die, you're done.
+ Config: imtooyoungtodie for easy mode
* Adventure: adventure this vast—5,5 km wide—world, discover new (and good/horrible) things
- 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)
* 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)
* 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 ==
* Interact menu w/ mouse right
== Interact menu w/ mouse right ==
* Pixelated sprites
== Pixelated sprites ==
- Use 2x sprites if rotating does not work well
== User experience ==
### User experience ###
* Indicative mouse cursor
* Indicative mouse cursor
== Game mechanics ==
### Game mechanics ###
* 24 pixels == 1 metre
* 24 pixels == 1 metre
== Purpose of the game ==
### Purpose of the game ###
* Boss
- Will be mentioned/shown as absolute _evil_.
- But actually is not.
* Boss
- Will be mentioned/shown as absolute _evil_.
- But actually is not.
* Theme
- Is an evil really really is what we think?
- Is there a thing as 'absolute evil'?
* Theme
- Is an evil really really is what we think?
- Is there a thing as 'absolute evil'?
* Boss character
- From debugger character
- Name key: "Sigriðr hinn Dróttningin" (can be changed)
* Little setting
- A ruler, hated by people
* Boss character
- From debugger character
- Name key: "Sigriðr hinn Dróttningin" (can be changed)
* Little setting
- A ruler, hated by people
* Mechanics
- Beating boss does not ends the game, but grants an ability to
create new character as it.
* Mechanics
- Beating boss does not ends the game, but grants an ability to
create new character as it.
### Making sprite ###
* Layers
- (Optional) Hair foreground
- Right arm dress
- Right arm body
- Dress
- Boot right
- Boot left
- Body
- (Optional) Hair accessory
- Hair
- Head
- Left arm dress
- Left arm body
- (Optional) SFX
* Size
- Regular sprite 'height' (hitbox height) : 40 px
- Apparent height may vary
### Chargen ###
* Select hair, colours, then compile them into single spritesheet
* NO gender distinction, but have masculine/neutral/feminine designs (in clothing, hairstyles, etc.)
* Colour: 4096 colours (12-bit 0x000 - 0xFFF)
* Base mass: 60 kg

View File

@@ -1,45 +1,96 @@
* Weapon tier
== Weapon tier ==
Natural / Common Stone -> Copper -> Iron -> Silver -> Titanium
Forging --------------> Steel --------^
Exotic ('elven') Glass Aurichalcum
Special (something 'adamant') ??? (Use material spec of CNT, tensile strength 180 GPa)
Natural / Common Stone -> Copper -> Iron -> Silver -> Titanium
Forging --------------> Steel --------^
Exotic ('elven') Glass Aurichalcum
Special (something 'adamant') ??? (Use material spec of CNT, tensile strength 180 GPa)
= Metal graphics
- Gold: Hue 43, low Saturation
- Aurichalcum: Hue 43, mid-high Saturation
- Copper: Hue 33,
- Copper rust: Hue 160
- Iron rust: Hue 21
* Metal graphics
== Size variation ==
Gold: Hue 43, low Saturation
Aurichalcum: Hue 43, mid-high Saturation
Copper: Hue 33,
Copper rust: Hue 160
Iron rust: Hue 21
Race base weapon/tool size <- 10 [kg]
Size tolerance <- (50% * str/1000), or say, 20%
If the size is bigger than tolerable, weapon speed severely slows down, tools become unusable
if use time >= 0.75 second, the weapon/tool cannot be equipped.
Small weapons/tools gains no (dis)advantage
When drawing: scale by (craftedWeaponSize / baseWeaponSize)
Crafted tool/weapon size is dependent to the baseRaceMass.
* Size variation
== Gemstone tier ==
Race base weapon/tool size <- 10 [kg]
Size tolerance <- (50% * str/1000), or say, 20%
If the size is bigger than tolerable, weapon speed severely slows down, tools become unusable
if use time >= 0.75 second, the weapon/tool cannot be equipped.
Small weapons gains no (dis)advantage, tools become unusable
Crafted tool/weapon size is dependent on the baseRaceMass.
Topaz -> R·G·B -> Diamond·Amethyst
* Gemstone tier
== Colouring ==
Topaz -> R·G·B -> Diamond·Amethyst
* Colouring
Natural: Use 4096
Magical/Surreal: Use 24 Bits
Natural: Use 4096
Magical/Surreal: Use 24 Bits
= Colouring of potion
- Randomised, roguelike fashion
- Choose Col(R40, G40, B40) from set of finite cards:
39, 39, 19, 19, 0, 0
- MULTIPLY blend chosen colour with white texture
== Roguelike identity ==
= Randomised things
- E.g. potion
Lime-coloured potion
First play: "Potion (???)"
After drank: "Potion (Healing)" is revealed.
Second (new) play: "Potion (???)"
After drank: "Potion (Neurotoxin)" is revealed.
== Making sprite ==
* Layers
- (Optional) Glow
- (Optional) Hair foreground
- Right arm dress
- Right arm body
- Dress
- Boots
- Body
- (Optional) Hair accessory
- Hair
- Head
- Left arm dress
- Left arm body
- (Optional) SFX
* Size
- Regular sprite 'height' (hitbox height) : 40 px
- Apparent height may vary
== Chargen ==
* Select hair, colours, then compile them into single spritesheet
* NO gender distinction, but have masculine/neutral/feminine looks (in clothing, hairstyles, etc.)
* Colour: 4096 colours (12-bit 0x000 - 0xFFF)
* Base mass: 60 kg
== Custom pattern making ==
- Players can create their own décors (hang on wall), dresses.
- Two looms (216 colour mode, 4096 colour mode)

View File

@@ -1,4 +0,0 @@
* Drawing
- Players can create their own décors (hang on wall), dresses.
- Two looms (216 colour mode, 4096 colour mode)

View File

@@ -0,0 +1,17 @@
# An adjacency matrix of religion sphere relationship
# 0: neutral, 1: amicable (welcoming), -1: hostile (will not barter == explicit neutrality)
# -2: enemy (this is the holy war! WAAAGH!!)
# war: WAAAGH!!
# randomness: All hail the Random Number God!
# strength: tranees; disciplinants
# brute: mostly "brute" wild mobs, or spheres that fond of bruteness
"↓from to→";"strength";"harmony";"war";"randomness";"wealth";"brute";"helix"
"strength" ; "1"; "1"; "-1"; "0"; "0"; "-1"
"harmony" ; "0"; "1"; "-1"; "-1"; "0"; "0"
"war" ; "-2"; "-2"; "1"; "-2"; "-2"; "-2"
"randomness"; "0"; "0"; "0"; "1"; "0"; "0"
"wealth" ;
"brute" ;
"helix" ;
Can't render this file because it contains an unexpected character in line 8 and column 17.

View File

@@ -5,10 +5,15 @@ import java.util.Random;
/**
* Created by minjaesong on 16-02-03.
*/
public class Fudge3 {
public class Fudge3 extends FudgeDice {
public FudgeDice create(Random rand) {
return new FudgeDice(rand, 3);
/**
* Define new set of fudge dice with three dice.
* @param randfunc java.util.Random or its extension
*/
public Fudge3(Random randfunc) {
super(randfunc, 3);
}
}

View File

@@ -12,7 +12,7 @@ public class FudgeDice {
/**
* Define new set of fudge dice with given counts.
* @param randfunc
* @param randfunc java.util.Random or its extension
* @param counts amount of die
*/
public FudgeDice(Random randfunc, int counts) {
@@ -21,8 +21,8 @@ public class FudgeDice {
}
/**
* Roll dice and get result. Range: [-3, 3] for three dice
* @return
* Roll dice and get result.
* @return Normal distributed integer [-N , N] for diceCount of N. 0 is the most frequent return.
*/
public int roll() {
int diceResult = 0;
@@ -34,7 +34,7 @@ public class FudgeDice {
}
/**
* @return random [-1, 0, 1]
* @return integer randomly picked from {-1, 0, 1}
*/
private int rollSingleDie() {
return (randfunc.nextInt(3)) - 1;

View File

@@ -51,18 +51,16 @@
(kill the boss, defend their adobe, fast transportation, etc.)
-=*## What feeling do you want to convey to the player? ##*=-
-=*## What feeling do you want to convey? ##*=-
== Always think WHY would you want to add _something_ on the game ==
== Always think WHY you want to add _something_ on the game ==
- e.g. Why you are adding RPG leveling system?
- e.g. Why are you adding RPG leveling system? What it would do to the players? How would they play with?
See also:
HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS
See also: HEARTS, CLUBS, DIAMONDS, SPADES: PLAYERS WHO SUIT MUDS
====================================

View File

@@ -76,7 +76,7 @@ public class CreatureBuildFactory {
for (String s : elemSet) {
float baseValue = jsonObject.get(s).getAsFloat();
// roll fudge dice and get value [-3, 3] as [0, 6]
int varSelected = new Fudge3().create(new HQRNG()).roll() + 3;
int varSelected = new Fudge3(new HQRNG()).roll() + 3;
// get multiplier from json. Assuming percentile
int multiplier = jsonObject.get(s + "variable").getAsJsonArray().get(varSelected).getAsInt();
float realValue = baseValue * multiplier / 100f;
@@ -121,7 +121,7 @@ public class CreatureBuildFactory {
for (String s : elemSet) {
float baseValue = 1f;
// roll fudge dice and get value [-3, 3] as [0, 6]
int varSelected = new Fudge3().create(new HQRNG()).roll() + 3;
int varSelected = new Fudge3(new HQRNG()).roll() + 3;
// get multiplier from json. Assuming percentile
int multiplier = jsonObject.get(s).getAsJsonArray().get(varSelected).getAsInt();
float realValue = baseValue * multiplier / 100f;

View File

@@ -1,5 +1,6 @@
package com.Torvald.Terrarum.Actors;
import com.Torvald.Rand.Fudge3;
import com.Torvald.Terrarum.Actors.Faction.Faction;
import com.Torvald.Terrarum.GameControl.EnumKeyFunc;
import com.Torvald.Terrarum.GameControl.KeyMap;
@@ -57,7 +58,7 @@ public class Player extends ActorWithBody implements Controllable, Pocketed, Fac
private final int TSIZE = MapDrawer.TILE_SIZE;
private char LUMINANCE_RGB = 31960;
private char LUMINANCE_RGB = 31399;
private HashSet<Faction> factionSet = new HashSet<>();

View File

@@ -254,19 +254,21 @@ public class LightmapRenderer {
char thisTileOpacity = TilePropCodex.getProp(thisTerrain).getOpacity();
char sunLight = Terrarum.game.map.getGlobalLight();
// MIX TILE
// open air
if (thisTerrain == AIR && thisWall == AIR) {
lightLevelThis = sunLight;
}
// luminous tile transparent (allows sunlight to pass)
else if (thisWall == AIR && thisTileLuminosity < COLOUR_DOMAIN_SIZE) {
else if (thisWall == AIR && thisTileLuminosity > 0) {
char darkenSunlight = darkenColoured(sunLight, thisTileOpacity);
lightLevelThis = screenBlend(darkenSunlight, thisTileLuminosity);
}
// luminous tile (opaque)
else {
else if (thisWall != AIR && thisTileLuminosity > 0) {
lightLevelThis = thisTileLuminosity;
}
// END MIX TILE
// mix lantern
for (LightmapLantern lantern : lanterns) {

View File

@@ -32,7 +32,7 @@
"27";"TILE_SNOW" ; "8205"; "6"; "0"; "N/A"; "1"; "1"; "0"; "27"; "0";"16"
"28";"TILE_ICE_FRAGILE" ; "3282"; "1"; "0"; "N/A"; "1"; "0"; "0"; "28"; "0";"16"
"29";"TILE_ICE_NATURAL" ; "6564"; "25"; "0"; "N/A"; "1"; "1"; "0"; "29"; "0"; "8"
"30";"TILE_ICE_CLEAR_MAGICAL" ; "8205"; "25"; "0"; "N/A"; "1"; "1"; "4967"; "30"; "0"; "8"
"30";"TILE_ICE_CLEAR_MAGICAL" ; "8205"; "25"; "0"; "N/A"; "1"; "1";"14949"; "30"; "0"; "8"
# see scandinavian name set female of this tile id!
"31";"TILE_PLATFORM_STONE" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "31"; "0";"16"
"32";"TILE_PLATFORM_WOODEN" ; "0"; "0"; "0"; "N/A"; "0"; "0"; "0"; "32"; "0";"16"
Can't render this file because it contains an unexpected character in line 1 and column 12.

View File

@@ -27,4 +27,5 @@ def intFromCol(r, g, b):
def colFromNum(raw):
return getR40(raw), getG40(raw), getB40(raw)
print(intFromCol(19,39,0))
print(intFromCol(9,13,29))
print(colFromNum(31399))