Search Results

Search found 8 results on 1 pages for 'daemonfire300'.

Page 1/1 | 1 

  • RPG Monster-Area, Spawn, Loot table Design

    - by daemonfire300
    I currently struggle with creating the database structure for my RPG. I got so far: tables: area (id) monster (id, area.id, monster.id, hp, attack, defense, name) item (id, some other values) loot (id = monster.id, item = item.id, chance) spawn (id = area.id, monster = monster.id, count) It is a browser-based game like e.g. Castle Age. The player can move from area to area. If a player enters an area the system spawns, based on the area.id and using the spawn table data, new monsters into the monster table. If a player kills a monster, the system picks the monster.id looks up the items via the the loot table and adds those items to the player's inventory. First, is this smart? Second, I need some kind of "monster_instance"-table and "area_instance"-table, since each player enters his very own "area" and does damage to his very own "monsters". Another approach would be adding the / a player.id to the monster table, so each monster spawned, has it's own "player", but I still need to assign them to an area, and I think this would overload the monster table if I put in the player.id and the area.id into the monster table. What are your thoughts? Temporary Solution monster (id, attackDamage, defense, hp, exp, etc.) monster_instance (id, player.id, area_instance.id, hp, attackDamage, defense, monster.id, etc.) area (id, name, area.id access, restriction) area_instance (id, area.id, last_visited) spawn (id, area.id, monster.id) loot (id, monster.id, chance, amount, ?area.id?) An example system-flow would be: Player enters area 1: system creates area_instance of type area.id = 1 and sets player.location to area.id = 1 If Player wants to battle monsters in the current area: system fetches all spawn entries matching area.id == player.location and creates a new monster_instance for each spawn by fetching the according monster-base data from table monster. If a monster is fetched more than once it may be cached. If Player actually attacks a monster: system updates the according monster_instance, if monster dies the instance if removed after creating the loot If Player leaves the area: area_instance.last_visited is set to NOW(), if player doesn't return to data area within a certain amount of time area_instance including all its monster_instances are deleted.

    Read the article

  • Does REGEX differ from PHP to Python

    - by daemonfire300
    hi there, I found this post: http://stackoverflow.com/questions/118143/python-regex-vs-php-regex but I actually did not get if Python's REGEX syntax matches PHP's REGEX syntax. I started to convert some of my old PHP code to python (due to g's appengine etc.), and now I would like to know whether the regex is 100% convertable, by simple copy & paste. regards,

    Read the article

  • C#, Display plain text in a form

    - by daemonfire300
    I ve made this simple drawing to explain my needs: Plain Text in C# I can only find rather "complex" functions, like RTF Text box etc. I couldn't figure out how to display "plain text" in a Form1.cs (I do not talk about HTML to WinForm) (Search did not return any useful results)

    Read the article

  • WindowsForms difference to simple Console App

    - by daemonfire300
    I currently started to "port" my console projects to WinForms, but it seems I am badly failing doing that. I am simply used to a console structure: I got my classes interacting with each other depending on the input coming from the console. A simple flow: Input -> ProcessInput -> Execute -> Output -> wait for input Now I got this big Form1.cs (etc.) and the "Application.Run(Form1);" But I really got no clue how my classes can interact with the form and create a flow like I described above. I mean, I just have these "...._Click(object sender....)" for each "item" inside the form. Now I do not know where to place / start my flow / loop, and how my classes can interact with the form.

    Read the article

  • C#, WindowsForms difference to simple Console App

    - by daemonfire300
    Hi there, I currently started to "port" my console projects to WinForms, but it seems I am badly failing doing that. I am simply used to a console structure: I got my classes interacting with each other depending on the input coming from the console. A simple flow: Input -> ProcessInput -> Execute -> Output -> wait for input Now I got this big Form1.cs (etc.) and the "Application.Run(Form1);" But I really got no clue how my classes can interact with the form and create a flow like I described above. I mean, I just have these "...._Click(object sender....)" for each "item" inside the form. Now I do not know where to place / start my flow / loop, and how my classes can interact with the form. thanks and regards daemonfire

    Read the article

  • WebServices does not interact with App

    - by daemonfire300
    I got a Silverlight App with-in a Web Project Web Silverlight The web contains a service: [WebService(Namespace = "svChat")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. //[System.Web.Script.Services.ScriptService] public class GetIPService : System.Web.Services.WebService { public GetIPService () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public string GetIp() { return HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; } } And I got a class in my Silverlight App using the Service: public class Client { private string ip; private string created; #region Properties public string Ip { get { return ip; } set { ip = value; } } public string Created { get { return created; } set { created = value; } } #endregion public Client() { } public void SetIp() { ServiceReference1.GetIPServiceSoapClient scIpClient = new svChat.ServiceReference1.GetIPServiceSoapClient(); scIpClient.GetIpCompleted += new EventHandler<svChat.ServiceReference1.GetIpCompletedEventArgs>(IpService_Completed); scIpClient.GetIpAsync(); } private void IpService_Completed(object sender, ServiceReference1.GetIpCompletedEventArgs e) { this.ip = e.Result; } } After Client is created, SetIp() is called, and Client.Ip is added to a text box. Nothing happens. Ip = null. Service itselfs works, tested it. Getting Ip by the above code works. Gettings Ip via service through Silverlight App does not work. <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="GetIPServiceSoap" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="None" /> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://localhost:2090/svChat.Web/GetIPService.asmx" binding="basicHttpBinding" bindingConfiguration="GetIPServiceSoap" contract="ServiceReference1.GetIPServiceSoap" name="GetIPServiceSoap" /> </client> </system.serviceModel> </configuration> Any ideas? regards,

    Read the article

  • Add string to another string

    - by daemonfire300
    Hi there, I currently encountered a problem: I want to handle adding strings to other strings very efficiently, so I looked up many methods and techniques, and I figured the "fastest" method. But I quite can not understand how it actually works: def method6(): return ''.join([`num` for num in xrange(loop_count)]) From source (Method 6) Especially the ([numfor num in xrange(loop_count)]) confused me totally.

    Read the article

  • Server-based Chat

    - by daemonfire300
    Described on this scheme "Server Clients Scheme" I try to create a Silverlight / Server Application which has EventHandler/Triggers, which can do the following: Notice whether a message was sent to "it" (the server) Notice that the sent message is new "to all" "except" "the sender" Send "to all" ("except...") "new message can be downloaded" / or even the new messages How could this be done by using: ASP.NET and Silverlight?

    Read the article

1