I am developing a neat little browser based RPG in jquery mobile.
The best way I can describe it is by referencing, "Archmage - The Reincarnation. (or essentially, the grandfather of Farmville)." The game takes place entirely through text and images, similarly to Rage of the Bahamut. Your actions are controlled via "Turns" which you accumulate over time, mixed with some management of gold/mana/population. You raise up large army's and seek to steal resources from other players to raise your rank.
IMO, its a REALLY fun genre which deteriorated with the simplicity and anti-competitive nature of games like Farmville.
Anyway, I am to the point where I need to implement a Newsfeed. Essentially, a little widget that I can throw on the page that lists all recent actions taken upon that character: such as,
being attacked
attacking
recruiting
land management (destroy / build / etc)
buffs running out
warnings of negative economy regen
etc
Now I have an idea as to what I will do, but I know this has been done before, and I want to make sure im doing it the right way. Anyone have experience in this area in regards to designing the Database?
My current thoughts is:
Table1: Messages
message_id
message
Table2: Messagebridge
mb_id
message_id
user_id
variable1
variable2
variable3
variable4
Something like the above. Where variable 1 - 5 would contain specific information pertaining to the message which would be sorted out in PHP functions.
i.e.
Message:
1. You have recruited <#units>, <#unit type>
Variable 1: normal int
Variable 2: pull unit info from unit_tbl via 'unit_id'<- which is what is stored
It seems cumbersome, and I am usually not too fond of serializing. Though I can see a slight benefit in doing so.
Anyone have some suggestions or recommendations?