Admin Tools

by calbert 1/31/2008 12:22:00 AM

I spent some time working on admin tools tonight for Perenthia. All the tools I am building will be web based rather than a mix of windows and web, which is what  have for the current beta 1 version of Perenthia. The current version has some web based admin stuff for content and items but the main beast is a windows application for drawing out the maps and terrain. I decided to rebuild this into a web based component so I can admin Perenthia from anywhere. 

The tools I have so far are:

  • Place/Map Editor - Add/edit rooms, exits
  • Connection Viewer - View active connected players
  • Online/Offline Toggle - To shutoff access to the game engine for maintenance, etc.
  • Item Template Editor - To add item templates, from which items are generated or created
  • Log Viewer - View error, chat, etc. logs
  • Content Editor - For news, pages, etc.

Tools I plan to add as I go:

  • NPC Editor - To add/edit NPCs
  • Quest Editor - Add quests, set key NPCs, set rewards, etc. 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Game Development | Perenthia PBBG

Place Manager

by calbert 1/30/2008 5:19:00 PM

In my previous post Memory Management I was talking about storing character and room data in server memory.

For the Character memory management I basically just use a DateTime value that gets updated each time a request is made by the connected player. If the DateTime exceeds a certain limit such as 20 minutes then the character data is saved and removed from memory. If the player just has a long pause between requests their character data will be reloaded if they make another request after the cleanup.

For the Room or Place data I've though about doing the same thing, just store a DateTime value and update it whenever a player performs an action in the room. I am not sure this is the best approach since the only commands that reference the Place object are movement, looking, some inventory and buying commands. Other actions such as casting spells, viewing stats, private chat, etc. do not reference the Place object. Of course, I guess if you are not accessing the Place object no need to have it in memory but once a player attempts to move again I would need to reload the Place. I might just maintain a list in the Place object of all the players currently located there and only remove the object once those references have been removed. I'll try a few things and record what I find.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Game Development | Perenthia PBBG

Memory Management

by calbert 1/29/2008 5:59:00 PM

For Perenthia I am planning on utilizing server memory as much as possible without crippling the web server. To do that I am going to be maintaining player data and room data in memory for fast access and quicker responses from the interface.

The basic idea is that players login, choose a character and begin playing. This character information will be loaded into memory and persisted to the database when the data is changed, such as when commands are executed. As players move around the rooms they enter will also be persisted into memory to make loading and re-loading rooms faster.

The trick will be effective management of these resources. Character data will be removed after inactivity but I haven't figured out a good scheme for removal of the room data. Hope to have that working before too long though.

Anyway, that is the plan, we'll see how it works out. :) 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Game Development | Perenthia PBBG

Adventures in LINQ to SQL

by calbert 1/25/2008 10:14:00 PM

I've been playing around a little with LINQ to SQL for Perenthia and wanted to share a kind of nasty query I just wrote. In Perenthia the typical RPG classes are called Professions. To track these professions I have the following database tables:

The players table links over to the rad_ProfessionLevels table via the ProfessionLevelId foreign key. The rad_ProfessionLevels table also links over the rad_Levels table on the LeveId foreign key. This layout allows me to have professions, define custom names for the levels and give certain levels titles.

When loading up a player record I need to go and get the level number, level name, profession name and title prefix and suffix values from the database. Since I am using LINQ to SQL for my entity classes I wrote the following query to retrieve this information:

 

var titleQuery = from pl in db.ProfessionLevels
join p in db.Professions on pl.ProfessionId equals p.ProfessionId
join plt in db.ProfessionLevelTitles on pl.ProfessionLevelId 
equals plt.ProfessionLevelId into profLevels
from x in profLevels.DefaultIfEmpty()
join t in db.Titles on x.TitleId equals t.TitleId into titles
from y in titles.DefaultIfEmpty()
join l in db.Levels on pl.LevelId equals l.LevelId into levels
from z in levels.DefaultIfEmpty()
where pl.ProfessionLevelId == avatar.ProfessionLevelId
select new { p.ProfessionName, z.LevelNumber, pl.LevelName, y.Prefix, y.Suffix };
 

It's kind of a nasty beast but produces the following SQL query:

 

SELECT [t1].[ProfessionName], 
[t4].[LevelNumber] AS [LevelNumber], 
[t0].[LevelName], [t3].[Prefix] AS [Prefix], 
[t3].[Suffix] AS [Suffix]
FROM [dbo].[rad_ProfessionLevels] AS [t0]
INNER JOIN [dbo].[rad_Professions] AS [t1] 
ON [t0].[ProfessionId] = [t1].[ProfessionId]
LEFT OUTER JOIN [dbo].[rad_ProfessionLevelTitles] AS [t2] 
ON [t0].[ProfessionLevelId] = [t2].[ProfessionLevelId]
LEFT OUTER JOIN [dbo].[rad_Titles] AS [t3] 
ON [t2].[TitleId] = [t3].[TitleId]
LEFT OUTER JOIN [dbo].[rad_Levels] AS [t4] 
ON [t0].[LevelId] = [t4].[LevelId]
WHERE [t0].[ProfessionLevelId] = @p0
 

The @p0 value is the ProfessionLevelId value stored with the player record.

The LINQ query is nasty because of the three outer joins I have to perform because not all profession levels have titles. It doesn't look pretty but it does work; as I get into more LINQ writing I will probably find a better way to write this but at least I got my data. :)

Currently rated 4.5 by 2 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Game Development | General | Perenthia PBBG

Advanced Physics with Farseer

by calbert 1/24/2008 4:41:00 PM

Andy Beaulieu has posted another great article about Advanced Physics with Silverlight and Farseer. His demo allows you to draw objects that are then associated with a Farseer Physics Body. Andy mentions me in his post and references the code I created to render a Path based on Vertices. Andy's first tutorial "Getting Started with Farseer Physics and Silverlight" was key in helping me understand how to get Farseer working with Silverlight.

 

Thanks Andy! 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , ,

Game Development | Silverlight Games

Silverlight Pirates! Prototype

by calbert 1/23/2008 3:29:00 PM

The Silverlight Pirates! prototype is online!

Keep in mind that this is a very early prototype and about the only thing you can do is destroy that other ship that is sitting there. I didn't get the enemy AI quite where I wanted it but it will fire on you if you get close. You can sail around and dock at ports, although you can't buy anything yet. Once your ammo runs out you will have to refresh the page to reload the game. You will also have to refresh if the enemy ship kills you.

On my TODO list are:

  • boundaries to keep you from sailing on forever
  • merchant ships to attack
  • better enemy AI so the merchants will run and man-o-war will chase
  • sea monsters
  • whirlpools
  • storms, which should be a big challenge
  • menu for when you are at port to buy ammo or repair your ship
  • gold and/or ammo drops from enemy ships

If you find any funky bugs please let me know and of course, you will need Silverlight 1.1 in order to run the prototype.

Silverlight Pirates! Prototype 

BlogEngine 1.3

by calbert 1/17/2008 5:17:00 PM
I finally got everything updated for BlogEngine.Net 1.3 so now my comments should work :)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

General

Silverlight Pirates!

by calbert 1/13/2008 3:17:00 PM

I'm going to put up the Silverlight Pirates prototype in another day or so. The prototype will only include one enemy ship. I was going to get the port menus completed so you could buy ammo and repair your ship but I think I am going to wait until the Silverlight 2.0 beta is released. 

I'm not competely happy with the enemy ship AI but I have time to work it out. Once I finish the prototype I am going to wait for Silverlight 2.0 to finish out the game.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Game Development | Silverlight Games | Silverlight Pirate Game

Ship AI

by calbert 1/4/2008 1:06:00 AM

I got the cannons firing on the pirate ship tonight and started making my notes for the NPC ship AI. I plan on having "merchant" and "man-o-war" ships. The man-o-war ships will be the navy that patrols around and attempts to attack the pirate. The merchant ships will be prey for the pirate. :)

Anyway, I started on the man-o-war AI tonight and as soon as I get something workable I will put up a prototype of the game so you can run like mad from the man-o-war!

 

Silverlight Pirates! 

Some Additional Silverlight Pirates! Screenshots

by calbert 1/2/2008 11:30:00 PM

The first screenshot is just sailing around. I was working on positioning the cannons and making sure the mini map was working as planned.

 

 Silverlight Pirates!

 

The second screenshot is me docked at the port of this island. Ports will be places to repair your ship, buy cannons, cannon balls and rum.

 

Silverlight Pirates!

 

Powered by BlogEngine.NET 1.3.1.0
Theme by Mads Kristensen

About the author

I am Senior Software Engineer specializing in the Microsoft .NET Framework and PBBG development.

E-mail me Send mail

Calendar

<<  December 2008  >>
MoTuWeThFrSaSu
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

Recent posts

Recent comments