Moving these into a branch in the main repo

This commit is contained in:
Kayne Ruse
2013-08-29 22:31:36 +10:00
commit a78f00d577
19 changed files with 1625 additions and 0 deletions
+242
View File
@@ -0,0 +1,242 @@
## Notes
The server holds the ultimate version of the world. The server has to handle log ons, logoffs, and world simulation. To do this, the server needs some sort of database system. I'd like to use something that is quick and efficient, which means that I'd probably end up using SQLite or something similar.
Monster AI/other world effects should be controlled with customizable scripts/specific file formats.
Should the server program have a UI? Or at least allow some sort of input at the terminal?
#### Template Item Information:
* item type index
* name
* effect...
#### Template Item Information:
* item index
* item type
* quantity
#### Equipment
Equipment should be items, but should the item object be placed in the equipment slot when it's equiped? Or should the slot gain certain traits, and the item is removed from the game?
#### Scratchings
* active time vs wait time battle system
* the terrain you fight on affects the strength of spells and attacks
Server Room:
* constructor
* destructor
* roomIndex
* game map
* player list
* monster list
* combat entrance list
Multithreading the network packets:
* queue
* function to push to the queue
* function to retreive from the queue
* Get the client running first
I read in an article about magic being affected by the environment. What if in the ATB system, magic was affected by what type of terrain you were fighting on? Like, if you were in a volcano, fire magic was more powerful, but ice magic was weaker?
Unless you had an ice crystal to draw magic from, which makes up for the lack of ice magic sources, but the crystals only had limited amount of uses?
-------------------------
source: http://www.gamasutra.com/blogs/EvanJones/20130701/195361/Fewer_Options_More_Meaningful_Choices.php
Compare the tension created by this dynamic to that of the lack of drama inherent in the item system of most Final Fantasy titles. In those games, characters can suffer from a variety of status impairments that last for many battles (poison, blindness, silence, etc.) Each ailment has its own respective curative item that can cure no other ailments. Because the player is not limited by inventory space, she can always carry a wide selection of curative items at all times. Status ailments never feel particularly threatening: removing them is simply a chore to be dealt with rather than an interesting decision to be made. This also reduces the impact of items that can cure any ailment - why should a player be excited to gain access to these panaceas when shes always had the ability to easily cure any ailment? The choice of what items to bring is rendered unimportant by the large amount of available inventory space.
So I'm thinking about Boss Battles for the game. The game will have a drop in-drop out battle system, where if at least one person is still fighting the battle continues, but the people who drop out usually give something up in return (i.e. no exp, lose exp or gold, etc.) This will make permadeath easier on the players.
Anyway, for Boss battles, I want to encourage several people to take on a boss at once. one way to do this is to make the boss super strong, but I don't really want to rely on that. Another idea was to have several "minion" creatures that the boss uses.
i.e. You're fighting the Frog King, who summons four Frog Knights at the beginning of the battle. Every time a Frog Knight dies, a new one is summoned, so you're never fighting less than five creatures at once. The battle ends when the Frog King is dead, but the king never attacks you directly, instead summoning new Frog Knights, as well as healing and buffing the knights already on the field.
To defeat the Frog King, you can't just focus on him, since letting the Frog Knights attack you will almost always result in your death. So to defeat the knights and the king, the best strategy is to stun, incapacitate or draw the attention of the knights to other players, while one person attacks the king directly.
Now, although this would take a lot of mid level players to bring down, I could scale the number of knights being summoned in addition to the stats of the creatures for when there's only one or two players in the fight. With the drop in-drop out mechanic, I can scale the combat to match the number of players as well.
Anyway, this is ages away. I just wish development could go faster than it is right now. Making a video game is hard work, doubly so when you're doing it solo.
P.S. I need to add this post to the GDD.
-------------------------
## Overall Requirements
An unmodified client must be able to connect to any server, be it vanilla, custom or modded.
A server must allow the client to operate correctly.
If any information causes issues, it must be resolved.
If the source of the issue is the vanilla software, than that is the developer's responsibility to bring the software into line with the expected features.
If however, the problem is caused by modified software or assets, than it is the responsibility of the server operator to resolve the issue.
-------------------------
## Server Requirements
The server needs to handle the following content.
* server name
* server version (including host name & modification status)
* maximum player count
* logon/logoff protocol
* maintaining the client list (handling dropouts)
* persistent player data (in a database or custom format)
#### Game Resource Distribution
If the client lacks a resource, the server needs to transmit that resource to the client upon connection.
Resources transmitted include but are not limited to:
* map data
* graphical assets
* tilesets
* sprites
* audio assets
* sound effects
* background music
* scripts
* AI scripts
* locational triggers
#### World Maps
The maps on a server are called rooms. For the data format, See [Map File Format](wiki/Map-File-Format).
This is an example of the structure that a server's world can have. This isn't a requirement, but it can offer the easiest solutions.
* a singular "overworld", connecting different locations
* dungeons, possibly instanced
* player owned locations, like pirate ships, depending on a server's theme
* any number of possible rooms running at the same time
* each room is it's own little world
#### Game Events
This is an ambiguous section, covering several situations.
* instanced dungeons
* player combat
* timed events
* locational events
#### Active Entities
All entities on the server have a unique, unsigned index.
* players
* monsters
* combat instances
* pirate ships/vehicles
* loot drops
-------------------------
## Server Architecture
#### Modules
* server metadata
* server name
* version
* distribution (official vs custom/name of the owner)
* major.minor.patch
* available map packs, resources, etc.
* player count
* maximum player count
* global client list
* global player list
* global room list
* global combat list -?
#### Client Information
* client index
* player index
* channel/address
* last contact time (ping/keep alive)
* ping count (number of times this client has been pinged, disconnect if it's
too high)
#### Player Information
* player index
* client index
* handle
* avatar
* current location (room, coords)
* inventory list
* equipment list
* friends list
#### Room Information
* room index
* map data
* player list
* monster list
* combat list
* loot drop list
#### Combat Information
* combat index
* room index
* player list
* monster list
-------------------------
## Client Requirements
The client needs to handle the following content.
* user settings (name, avatar, etc.)
* logon/logoff protocol
* resource downloading/loading
* user input
* drawing to the screen
* playing the correct information
* client index
* player index
* room data
* player list
* monster list
* etc.
-------------------------
## Client Architecture
#### Scenes
* SplashScreen
* start of the program
* load the boilerplate resources
* display the kr-studios logo
* MainMenu
* program hub
* OptionScreen
* custom config saved on exit
* Lobby
* find available servers
* broadcast to the network
* phone home -?
* InWorld
* the player is in a room
* walk around the map
* communicate with others on the map
* InCombat
* the player is in combat
* return to the original room when finished
#### Modules
* map system
* players
+19
View File
@@ -0,0 +1,19 @@
My game Tortuga will have permadeath; it's actually one of the first design decisions I made. How to implement it, however, is another decision all together.
A while ago, before the implementation of hardcore mode, I was playing on a Minecraft server that boasted something close to permadeath: your account would be banned for 15 days, so long that it's almost unavoidable that you'd lose all of your hidden items. This was a brutal server; the further you went from spawn, the more dangerous it became, not less. If the natural hazards didn't kill you, another player would.
I loved it.
Although I haven't been back to that server since I died for the last time, the experience will stay with me forever. I'd played and died on that server a few times, each time I had to wait for my ban to clear. I never really lost much, since I never survived for very long. Even today, in a single player world, I'm likely to die on the first night.
After playing for a while, I began to understand the mentality needed to survive there. Always fear other people, never take risks, and never hoard valuable items if they could be better spent keeping you alive. One day, the last day I played, I found a hole in the ground that someone was obviously using as a "hidden" base. I tried to get in, always careful not to trigger any traps. However, while I was trying to get in, the owner came home.
I was suddenly attacked from behind, I barely had enough sense to dig down, since they were wearing enchanted diamond armour. I had no chance against them. I thought I was safe, digging 10, 20, 30 meters down, but no, they poured lava down the hole and plugged it up. I was a gonner, and I knew it. I was futilely digging and thrashing around in what was now my tomb, about to lose my life. I'd survived for so long, only to lose it all by not keeping a lookout.
When the game over screen flashed up, I screamed. I screamed, and screamed, and screamed. For 5 minutes, my mind was blank, nothing but hatred and pain and loss. I'm sure you've seen the video of the angry German kid who died in WoW, but have you ever actually experienced that pain? Have you ever worked so hard, and lost it all?
For days afterwards, that loss was all I could think about. Even now, that experience stays with me. What about that game, that server, invoked so much pain that I almost lost consciousness from screaming? Me of all people, who thought he was invincible?
I've played games that have moved me, terrified me, made me fall in love and fight for the people that I care about. But never have I played a game that has made me feel pain and loss like that. I died that day. Me.
Pain and loss are part of life, but not games. Permadeath seems like the obvious choice for creating a sense of loss for the player, but there are so few games with permadeath, and even fewer multiplayer games. Pain and loss can be conveyed in other ways, I'm sure anybody who's played Final Fantasy 7 knows that, and some games are especially well suited to delivering that message. However, for a player to feel like they are the one who's died, that is a challenge.
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

+49
View File
@@ -0,0 +1,49 @@
function CalcExp(base, mod, level)
return math.floor(base * mod ^ level)
end
function CalcSumExp(base, mod, level)
local ret = CalcExp(base, mod, level)
if (level > 1) then
return ret + CalcSumExp(base, mod, level-1)
else
return ret
end
end
function CalcExpTables(base, mod, levelCap)
local exp = {}
local sum = {}
for i = 1, levelCap do
exp[i] = CalcExp(base, mod, i)
sum[i] = CalcSumExp(base, mod, i)
end
return exp, sum
end
--the variables
base = 1000
mod = 1.14
levelCap = 20
--calc the tables
exp, sum = CalcExpTables(base, mod, levelCap)
--output the data
io.write("Level\t\tExp\t\tTotal\t\tLaps\n")
for i = 1, 60 do io.write("-") end
io.write("\n")
for i = 1, levelCap do
if i % 5 == 0 then
sep = "\t---\t"
else
sep = "\t\t"
end
io.write(i,
sep, exp[i],
sep, sum[i],
sep, math.floor(sum[i] / sum[1] * 10) / 10, --rounded
-- sep, sum[i] / sum[1], --real
"\n")
end
+255
View File
@@ -0,0 +1,255 @@
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.7.0_21" class="java.beans.XMLDecoder">
<object class="com.horstmann.violet.ClassDiagramGraph">
<void method="addNode">
<object class="com.horstmann.violet.ClassNode" id="ClassNode0">
<void property="attributes">
<void property="text">
<string>room list
client list --?</string>
</void>
</void>
<void property="methods">
<void property="text">
<string>Constructor()
Destructor()
Init()
Loop()
Quit()
SetRunning(bool)
GetRunning()
OpenRoom(args)
CloseRoom(roomHandle)</string>
</void>
</void>
<void property="name">
<void property="text">
<string>Server Application</string>
</void>
</void>
</object>
<object class="java.awt.geom.Point2D$Double" id="Point2D$Double0">
<void class="java.awt.geom.Point2D$Double" method="getField">
<string>x</string>
<void method="set">
<object idref="Point2D$Double0"/>
<double>146.0</double>
</void>
</void>
<void class="java.awt.geom.Point2D$Double" method="getField">
<string>y</string>
<void method="set">
<object idref="Point2D$Double0"/>
<double>52.0</double>
</void>
</void>
<void method="setLocation">
<double>146.0</double>
<double>52.0</double>
</void>
</object>
</void>
<void method="addNode">
<object class="com.horstmann.violet.ClassNode" id="ClassNode1">
<void property="attributes">
<void property="text">
<string>arguments
mailBox
</string>
</void>
</void>
<void property="methods">
<void property="text">
<string>Constructor(args)
Destructor()
Init()
Loop()
Quit()
SetRunning(bool)
GetRunning()
GetMailBox()
</string>
</void>
</void>
<void property="name">
<void property="text">
<string>Base Room</string>
</void>
</void>
</object>
<object class="java.awt.geom.Point2D$Double" id="Point2D$Double1">
<void class="java.awt.geom.Point2D$Double" method="getField">
<string>x</string>
<void method="set">
<object idref="Point2D$Double1"/>
<double>343.0</double>
</void>
</void>
<void class="java.awt.geom.Point2D$Double" method="getField">
<string>y</string>
<void method="set">
<object idref="Point2D$Double1"/>
<double>49.0</double>
</void>
</void>
<void method="setLocation">
<double>343.0</double>
<double>49.0</double>
</void>
</object>
</void>
<void method="addNode">
<object class="com.horstmann.violet.ClassNode" id="ClassNode2">
<void property="attributes">
<void property="text">
<string>input queue
output queue
input lock
output lock</string>
</void>
</void>
<void property="methods">
<void property="text">
<string>PushIn(arg)
PeekIn()
PopIn()
PushOut(arg)
PeekOut()
PopOut()</string>
</void>
</void>
<void property="name">
<void property="text">
<string>Mail Box</string>
</void>
</void>
</object>
<object class="java.awt.geom.Point2D$Double" id="Point2D$Double2">
<void class="java.awt.geom.Point2D$Double" method="getField">
<string>x</string>
<void method="set">
<object idref="Point2D$Double2"/>
<double>489.0</double>
</void>
</void>
<void class="java.awt.geom.Point2D$Double" method="getField">
<string>y</string>
<void method="set">
<object idref="Point2D$Double2"/>
<double>50.0</double>
</void>
</void>
<void method="setLocation">
<double>489.0</double>
<double>50.0</double>
</void>
</object>
</void>
<void method="addNode">
<object class="com.horstmann.violet.ClassNode" id="ClassNode3">
<void property="name">
<void property="text">
<string>Generic Room</string>
</void>
</void>
</object>
<object class="java.awt.geom.Point2D$Double" id="Point2D$Double3">
<void class="java.awt.geom.Point2D$Double" method="getField">
<string>x</string>
<void method="set">
<object idref="Point2D$Double3"/>
<double>284.0</double>
</void>
</void>
<void class="java.awt.geom.Point2D$Double" method="getField">
<string>y</string>
<void method="set">
<object idref="Point2D$Double3"/>
<double>299.0</double>
</void>
</void>
<void method="setLocation">
<double>284.0</double>
<double>299.0</double>
</void>
</object>
</void>
<void method="addNode">
<object class="com.horstmann.violet.ClassNode" id="ClassNode4">
<void property="name">
<void property="text">
<string>Combat Room</string>
</void>
</void>
</object>
<object class="java.awt.geom.Point2D$Double" id="Point2D$Double4">
<void class="java.awt.geom.Point2D$Double" method="getField">
<string>x</string>
<void method="set">
<object idref="Point2D$Double4"/>
<double>419.0</double>
</void>
</void>
<void class="java.awt.geom.Point2D$Double" method="getField">
<string>y</string>
<void method="set">
<object idref="Point2D$Double4"/>
<double>300.0</double>
</void>
</void>
<void method="setLocation">
<double>419.0</double>
<double>300.0</double>
</void>
</object>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
<object class="com.horstmann.violet.BentStyle" field="HVH"/>
</void>
<void property="startArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/>
</void>
</object>
<object idref="ClassNode0"/>
<object idref="ClassNode1"/>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
<object class="com.horstmann.violet.BentStyle" field="HVH"/>
</void>
<void property="startArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/>
</void>
</object>
<object idref="ClassNode1"/>
<object idref="ClassNode2"/>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
<object class="com.horstmann.violet.BentStyle" field="VHV"/>
</void>
<void property="endArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
</void>
</object>
<object idref="ClassNode3"/>
<object idref="ClassNode1"/>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
<object class="com.horstmann.violet.BentStyle" field="VHV"/>
</void>
<void property="endArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
</void>
</object>
<object idref="ClassNode4"/>
<object idref="ClassNode1"/>
</void>
</object>
</java>
File diff suppressed because it is too large Load Diff