commit a78f00d57743f34c4b50da98639f0549062435a5 Author: Kayne Ruse Date: Thu Aug 29 22:31:36 2013 +1000 Moving these into a branch in the main repo diff --git a/Notes.md b/Notes.md new file mode 100644 index 0000000..b6c9758 --- /dev/null +++ b/Notes.md @@ -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 she’s 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 diff --git a/articles/On-Permadeath-Pain-And-Loss.md b/articles/On-Permadeath-Pain-And-Loss.md new file mode 100644 index 0000000..58e093b --- /dev/null +++ b/articles/On-Permadeath-Pain-And-Loss.md @@ -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. diff --git a/images/elliot2.png b/images/elliot2.png new file mode 100644 index 0000000..9a1c38c Binary files /dev/null and b/images/elliot2.png differ diff --git a/images/mock spinner 1.png b/images/mock spinner 1.png new file mode 100644 index 0000000..ff8b1ef Binary files /dev/null and b/images/mock spinner 1.png differ diff --git a/images/screenshots/hello net.png b/images/screenshots/hello net.png new file mode 100644 index 0000000..f69a5f5 Binary files /dev/null and b/images/screenshots/hello net.png differ diff --git a/images/screenshots/menu bar 1.png b/images/screenshots/menu bar 1.png new file mode 100644 index 0000000..bfa9fc5 Binary files /dev/null and b/images/screenshots/menu bar 1.png differ diff --git a/images/screenshots/select your poison.png b/images/screenshots/select your poison.png new file mode 100644 index 0000000..303b3df Binary files /dev/null and b/images/screenshots/select your poison.png differ diff --git a/images/screenshots/the beatles.png b/images/screenshots/the beatles.png new file mode 100644 index 0000000..e168583 Binary files /dev/null and b/images/screenshots/the beatles.png differ diff --git a/images/screenshots/tileset_rearrangement_after.png b/images/screenshots/tileset_rearrangement_after.png new file mode 100644 index 0000000..3577cf1 Binary files /dev/null and b/images/screenshots/tileset_rearrangement_after.png differ diff --git a/images/screenshots/tileset_rearrangement_before.png b/images/screenshots/tileset_rearrangement_before.png new file mode 100644 index 0000000..95270d1 Binary files /dev/null and b/images/screenshots/tileset_rearrangement_before.png differ diff --git a/images/server-uml-1.png b/images/server-uml-1.png new file mode 100644 index 0000000..8cd3145 Binary files /dev/null and b/images/server-uml-1.png differ diff --git a/images/server-uml-2.png b/images/server-uml-2.png new file mode 100644 index 0000000..d7042c3 Binary files /dev/null and b/images/server-uml-2.png differ diff --git a/images/whiteboard/whiteboard-13-8-10.jpg b/images/whiteboard/whiteboard-13-8-10.jpg new file mode 100644 index 0000000..85206c4 Binary files /dev/null and b/images/whiteboard/whiteboard-13-8-10.jpg differ diff --git a/images/whiteboard/whiteboard-13-8-25-1.jpg b/images/whiteboard/whiteboard-13-8-25-1.jpg new file mode 100644 index 0000000..2a9a715 Binary files /dev/null and b/images/whiteboard/whiteboard-13-8-25-1.jpg differ diff --git a/images/whiteboard/whiteboard-13-8-25-2.jpg b/images/whiteboard/whiteboard-13-8-25-2.jpg new file mode 100644 index 0000000..9ce011b Binary files /dev/null and b/images/whiteboard/whiteboard-13-8-25-2.jpg differ diff --git a/images/whiteboard/whiteboard-13-8-4.jpg b/images/whiteboard/whiteboard-13-8-4.jpg new file mode 100644 index 0000000..0f5aae1 Binary files /dev/null and b/images/whiteboard/whiteboard-13-8-4.jpg differ diff --git a/misc/experience-script.lua b/misc/experience-script.lua new file mode 100644 index 0000000..b81cade --- /dev/null +++ b/misc/experience-script.lua @@ -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 diff --git a/misc/server-uml-1.class.violet b/misc/server-uml-1.class.violet new file mode 100644 index 0000000..1a87168 --- /dev/null +++ b/misc/server-uml-1.class.violet @@ -0,0 +1,255 @@ + + + + + + + + room list +client list --? + + + + + Constructor() +Destructor() +Init() +Loop() +Quit() +SetRunning(bool) +GetRunning() +OpenRoom(args) +CloseRoom(roomHandle) + + + + + Server Application + + + + + + x + + + 146.0 + + + + y + + + 52.0 + + + + 146.0 + 52.0 + + + + + + + + arguments +mailBox + + + + + + Constructor(args) +Destructor() +Init() +Loop() +Quit() +SetRunning(bool) +GetRunning() +GetMailBox() + + + + + + Base Room + + + + + + x + + + 343.0 + + + + y + + + 49.0 + + + + 343.0 + 49.0 + + + + + + + + input queue +output queue +input lock +output lock + + + + + PushIn(arg) +PeekIn() +PopIn() +PushOut(arg) +PeekOut() +PopOut() + + + + + Mail Box + + + + + + x + + + 489.0 + + + + y + + + 50.0 + + + + 489.0 + 50.0 + + + + + + + + Generic Room + + + + + + x + + + 284.0 + + + + y + + + 299.0 + + + + 284.0 + 299.0 + + + + + + + + Combat Room + + + + + + x + + + 419.0 + + + + y + + + 300.0 + + + + 419.0 + 300.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/misc/server-uml-2.class.violet b/misc/server-uml-2.class.violet new file mode 100644 index 0000000..37edebd --- /dev/null +++ b/misc/server-uml-2.class.violet @@ -0,0 +1,1060 @@ + + + + + + + + std::list<ClientEntry> + + + + + Client Manager + + + + + + x + + + 299.0 + + + + y + + + 214.0 + + + + 299.0 + 214.0 + + + + + + + + Network + + + + + + x + + + 299.0 + + + + y + + + 115.0 + + + + 299.0 + 115.0 + + + + + + + + Game Info +Account Info +Player Info +Map Info + + + + Database + + + + + x + + + 857.0 + + + + y + + + 36.0 + + + + 857.0 + 36.0 + + + + + + + + Terminal + + + + + + x + + + 181.0 + + + + y + + + 210.0 + + + + 181.0 + 210.0 + + + + + + + + Just an idea for +controlling the +server directly + + + + + + x + + + 44.0 + + + + y + + + 204.0 + + + + 44.0 + 204.0 + + + + + + + + std::list<AccountEntry> + + + + + Account Manager + + + + + + x + + + 769.0 + + + + y + + + 178.0 + + + + 769.0 + 178.0 + + + + + + + + std::list<PlayerEntry> + + + + + Player Manager + + + + + + x + + + 974.0 + + + + y + + + 177.0 + + + + 974.0 + 177.0 + + + + + + + + Chat Server + + + + + + x + + + 451.0 + + + + y + + + 208.0 + + + + 451.0 + 208.0 + + + + + + + + std::list<RoomHandle> + + + + + OpenRoom() +CloseRoom() + + + + + + Room Manager + + + + + + x + + + 598.0 + + + + y + + + 53.0 + + + + 598.0 + 53.0 + + + + + + + + index +statistics +equipment +inventory + + + + + + Player Entry + + + + + + x + + + 983.0 + + + + y + + + 272.0 + + + + 983.0 + 272.0 + + + + + + + + index +mail box + + + + + Init() = pure virtual +Loop() = pure virtual +Quit() = pure virtual + + + + + Base Room + + + + + + x + + + 606.0 + + + + y + + + 292.0 + + + + 606.0 + 292.0 + + + + + + + + collision map +etc. maps +player list +combat portals + + + + + World Room + + + + + + x + + + 549.0 + + + + y + + + 447.0 + + + + 549.0 + 447.0 + + + + + + + + parent room index +combatants +monsters + + + + + + Combat Room + + + + + + x + + + 678.0 + + + + y + + + 448.0 + + + + 678.0 + 448.0 + + + + + + + + lua state + + + + + Init() +Loop() +Quit() + + + + + Server Application + + + + + + x + + + 437.0 + + + + y + + + 297.0 + + + + 437.0 + 297.0 + + + + + + + + thread* +BaseRoom* + + + + + Room Handle + + + + + + x + + + 624.0 + + + + y + + + 168.0 + + + + 624.0 + 168.0 + + + + + + + + 255 + 239 + 213 + 255 + + + + + Combat rooms should be closed +when they're empty. Send the "close" +message to the parent world room +and the Room Manager. + + + + + + x + + + 817.0 + + + + y + + + 452.0 + + + + 817.0 + 452.0 + + + + + + + + Also used for +/commands + + + + + + x + + + 462.0 + + + + y + + + 147.0 + + + + 462.0 + 147.0 + + + + + + + + Attention: +Anything with "Manager" in their name is a singleton. +Anything with "Entry" in their name is a data class. + + + + + + x + + + 47.0 + + + + y + + + 422.0 + + + + 47.0 + 422.0 + + + + + + + + Undecided, +possibly SQLite3 + + + + + + x + + + 982.0 + + + + y + + + 47.0 + + + + 982.0 + 47.0 + + + + + + + + index +account index + + + + + Client Entry + + + + + + x + + + 297.0 + + + + y + + + 300.0 + + + + 297.0 + 300.0 + + + + + + + + index +client index +username +player indices + + + + + Account Entry + + + + + + x + + + 782.0 + + + + y + + + 267.0 + + + + 782.0 + 267.0 + + + + + + + + Direct connections + + + + + + x + + + 40.0 + + + + y + + + 38.0 + + + + 40.0 + 38.0 + + + + + + + + Client + + + + + + x + + + 177.0 + + + + y + + + 115.0 + + + + 177.0 + 115.0 + + + + + + + + Client + + + + + + x + + + 181.0 + + + + y + + + 27.0 + + + + 181.0 + 27.0 + + + + + + + + Client + + + + + + x + + + 301.0 + + + + y + + + 25.0 + + + + 301.0 + 25.0 + + + + + + + + Client + + + + + + x + + + 416.0 + + + + y + + + 28.0 + + + + 416.0 + 28.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +