Discussion related to Escape From Hell.
Escape From Hell is a modified version of Dragon Scourge (http://www.dragonscourge.com/)
Possible enchancements
- This topic has 20 replies, 3 voices, and was last updated 9 years, 2 months ago by Whizbang.
-
AuthorPosts
-
-
September 6, 2015 at 3:00 am #71ZenithParticipant
I brainstormed a list of things that might be worth adding. I realize that it would probably be overly ambitious to try to do them all, and they’re probably not all good ideas anyway. I would be willing to a lot of the coding necessary.
- General inventory system (Different types of items like weapons, potions, quest items, monster drops that can be sold to shop)
- Specific drops from certain monsters
- Common and rare drops
- Send tradeable items in mail or trade items between players
- Specific drops from certain monsters
- Graphical explore with different types of terrain
- Better questing system
- Rewrite front end using css instead of tables and center tags
- NPCs
- Talking to NPC for quests
- Trading items with NPCs
- Enterable areas: Dungeons, towns, buildings
- More finely controlled monster selection (e,g, based on terrain or specific area)
- Specific items in specific shops rather than completely random
- Buy spells from magic shop (like Final Fantasy I), or prefixes/suffixes for existing items.
- General inventory system (Different types of items like weapons, potions, quest items, monster drops that can be sold to shop)
-
September 6, 2015 at 4:10 am #72ZenithParticipant
The first thing I’d like to do is make the explore screen display the terrain of the area around the player. The only question is whether to store the map data in a file per realm (with the terrain types in a grid) or in a db table like
(realm, latitude, longitude, terrain)
, with a row for each tile.-
September 7, 2015 at 1:44 pm #79WhizbangKeymaster
I am thinking, for this, storing it in the DB, but instead of entering each coordinate individually, enter in the starting coord and then a width and height. Then just check if the user is within that area.
-
September 9, 2015 at 8:42 am #86ZenithParticipant
I have everything coded for the explore images except the part that loads the map data, as I still need a good format to store the map. There’s three main possibilities I can think of at this point: A binary bitmap-like file storing an array of terrain ids, A csv file storing an array of terrain ids, or storing the terrain ids in the database with one per row as mentioned above (storing the start and stop values in the database wouldn’t work for anything but large rectangular areas of the same terrain, as far as I can tell).
None of them seem easy to create or edit, and the database also seems inefficient when all that’s needed is to get the tiles in a contiguous range in one world.
Any ideas?
-
September 9, 2015 at 6:19 pm #95WhizbangKeymaster
One option is to store your data in a bitmap. Each color corresponds to a terrain type. Then read the pixel color using imagecolorat(). That way you can quickly fill in large areas of the map with a paintbrush.
For instance, yellow = desert. Grab a random image from the Desert folder. If you want to map specific images to specific tiles, color the tile a unique color and name an image in the maps/unique/ folder that specific color code. Then on Explore, check if a file for the current tile exists, if so display, if not, grab random terrain type image.
Make sense?
-
-
September 6, 2015 at 8:18 am #73ZenithParticipant
Second thing would probably be to make enter-able areas. Any given town, building, dungeon, or whatever other area would be stored in an
areas
table in the db, where each area has its own map (grid of terrain types) and a realm that its in. Each area would have its own latitude and longitude system. To get between areas, there would be a table of gateways (tiles that teleport the player when they walk onto them), which would have a schema something like(id, latitude, longitude, area, target_latitude, target_longitude, target_area)
. The main portion of each realm would have the same area id as the realm id, so theworld
field in theusers
table could be used for areas instead.The latitude and longitude would only be displayed in the sidebar if a player is in a realm itself (and not a sub-area), and the realm displayed in the sidebar would be the realm the player’s area is in. An area field could be added to the sidebar displaying the player’s current area (e.g. ‘Dungeon of Chaos, floor 2’).
Any thoughts?
-
September 7, 2015 at 1:59 pm #80WhizbangKeymaster
I like this. I think navigating should occur entirely within the central panel. The left-bar would still show the realm map and coordinates. The center panel would display a sub-map and coordinates. Preferrably the map would be large and detailed.
There would need to be a check to disable realm navigation if the user is in a sub-area, though.
- This reply was modified 9 years, 3 months ago by Whizbang.
-
September 7, 2015 at 11:17 pm #82WhizbangKeymaster
I am thinking the easiest way to do this is add a Parent field to the Worlds table. Then a simple teleport mod can be made to transfer the user to the sub-world based on user location. For towns and such, the world size would be fairly small. Then tie town events to location.
Is that in line with what you were thinking? The key would be detailed map images.
- This reply was modified 9 years, 3 months ago by Whizbang.
-
-
September 6, 2015 at 12:03 pm #74ZenithParticipant
After the map and area systems are done, the next step would probably be to implement objects, where objects are anything that exist on a tile in the world, like an NPC, obstacle, or treasure chest. Objects would exist in a table similar to gateways, with the area, latitude, longitude, plus fields such as the image to use, and whatever is needed for the user to be able to interact with the object in a way specific to the type of object.
Again, any thoughts?
-
September 6, 2015 at 12:53 pm #75ZenithParticipant
After objects are working, NPCs could be implemented on top of the object system, since objects would be able to define what happens when the player interacts with them. Initially NPCs would do nothing, but they could later be integrated with the inventory and quest systems.
Another thing to take into considering with respect to areas is monster fights. Random encounters shouldn’t occur when in a town, but when in a dungeon or similar area the monster fights should probably be different that in the realm as a whole (and should probably use a different method than scaling up difficulty by distance from the center). I’m not sure about the best way to implement this.
-
September 6, 2015 at 2:18 pm #76WhizbangKeymaster
Good stuff.
I’ll respond in detail Tuesday. I have a pretty full weekend.
-
September 10, 2015 at 12:22 pm #99ZenithParticipant
I’m thinking that for controlling monster encounters more finely, there would be a table of encounter regions, with a world id, a rectangular area with min and max latitude and longitude, and a monster group id specifying the monsters that are encountered in the region.
Then there would be a table of monster groups, where each group has one or monsters and each monster has a weight which determines how likely it is to be encountered. Something like:
group_id monster_id weight
1 3 5
1 7 10
1 9 2
2 12 17
2 14 3To determine which monster a player faces, the region the player is in is selected, then a random monster is selected for that region’s group based on the weights. If any of the queries return no results then no fight happens.
-
September 20, 2015 at 2:36 am #103ZenithParticipant
In regards to monster fight probabilities, I think
if(rand(0, 14)/15 < max(0,($fightsteps-1)/15))
would work, changing 14 and 15 as needed.That way the chance of fight increases linearly rather than being 50% at 13 steps and only 20% chance at 10 steps.
Side note: I’m used to languages such as javascript, python, and perl where one can generate a random float in the range 0 <= x < 1, so
rand(0, 14)/15
serves the place of that function here.Also note: I would have submitted this via the babblebox, but I was blocked by mod_security.
-
September 20, 2015 at 9:54 pm #105ZenithParticipant
Actually, I just realized that the above code can be simplified to
if(rand(1, 15) < max(1, $fightsteps))
, which I believe does the same thing. -
September 21, 2015 at 2:19 pm #108WhizbangKeymaster
I went with
if(rand(1,15-$fightsteps)==1)
This gives the first step a 1 in 15 chance of a fight (where $fightsteps = 0). The second a 1 in 14 chance. Third step is 1 in 13 chance. And so on until the 15th step is 1 in 1 chance of a fight.
I may make it 10-$fightsteps if it seems walking suddenly becomes easier. The chance was 1 in 5 for every step, previously.
- This reply was modified 9 years, 2 months ago by Whizbang.
-
September 22, 2015 at 8:30 am #112NancyParticipant
As Zenith said
if(rand(1,15-$fightsteps)==1)
doesn’t increase the chance of a fight linearly so while you are still guaranteed a monster fight after 15 steps you will be more likely that you wont get a fight before 10. I don’t mind either method but that is mostly because I like the idea of being able to walk 10 step without a monster fight. -
September 22, 2015 at 1:04 pm #113WhizbangKeymaster
As the vote stands, it is 2 to 1 for
if(rand(1, 15) < max(1, $fightsteps))
. The motion is carried.
-
-
September 21, 2015 at 8:57 pm #110WhizbangKeymaster
So, what should be worked on next, in your opinion?
- General inventory system (Different types of items like weapons, potions, quest items, monster drops that can be sold to shop)
- Specific drops from certain monsters
Common and rare drops - Send tradeable items in mail or trade items between players
Graphical explore with different types of terrain. – Done- Better questing system
- Rewrite front end using css instead of tables and center tags
- NPCs
- Talking to NPC for quests
- Trading items with NPCs
- Enterable areas: Dungeons, towns, buildings
- More finely controlled monster selection (e,g, based on terrain or specific area
- Specific items in specific shops rather than completely random
- Buy spells from magic shop (like Final Fantasy I), or prefixes/suffixes for existing items.
- Smithing items
- Enchanting items
- Training (pay to improve Strength, Dexterity, Energy, etc.)
-
September 25, 2015 at 8:32 pm #118WhizbangKeymaster
Also on the To-Do is re-work guilds to allow things like item discounts, item storage, buffs, and maybe item enchantment/smithing. Also, there is a Library mod (as players encounter different monsters, it catalogs various data in a library and notes who discovered what about which monsters) that I’ve been meaning to install. It’d be neat to give each guild a library, where members contribute to the guilds knowledge of the world.
-
September 23, 2015 at 5:44 pm #117WhizbangKeymaster
Ok. Towns now have sticky items. They are only regenerated every 12 hours. I will work next on having specific items always available.
Also to come is enchanting/smithing to add modifiers to owned items.
-
October 16, 2015 at 2:55 pm #138WhizbangKeymaster
Here’s a progress update, with added to-do items..
General inventory system (Different types of items like weapons, potions, quest items, monster drops that can be sold to shop)Done. Potions and other consumables still to come.Specific drops from certain monsters– This is already part of the game, just no entered into the DB, except for bosses.- Common and rare drops
- Send tradeable items in mail or trade items between players
Graphical explore with different types of terrain. – Done- Better questing system
- Rewrite front end using css instead of tables and center tags
- Add language files
- NPCs
- Talking to NPC for quests
- Trading items with NPCs
- Enterable areas: Dungeons, towns, buildings
- More finely controlled monster selection (e,g, based on terrain or specific area
Specific items in specific shops rather than completely random– Done. Well, shop items are sticky, anyway. The game already limits shop items to a range of level requirements. Once consumables are introduced, certain items will always appear in list (e.g. hp potion)Buy spells from magic shop (like Final Fantasy I)– Done. Not specific spells, per se, but Spell Points.- Smithing items
- Enchanting items
- Training (pay to improve Strength, Dexterity, Energy, etc.)
- Enhance Guilds to do something, anything.
- Shop discounts
- Stat boosts
- Guild Inventory
- Guild Monster Library
- Quests?
- Guild tournaments/wars?
Feedback welcome.
-
-
AuthorPosts
- You must be logged in to reply to this topic.