User Tag List

Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 21

Thread: Sharing files using a Lacewing Web server...

  1. #11
    Clicker Multimedia Fusion 2 DeveloperInstall Creator Pro

    Join Date
    May 2010
    Posts
    536
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sharing files using a Lacewing Web server...

    Hey, Mathias!

    Here's my question, though...

    For the sake of argument, let's suppose that there is only one high score at present. By default, then, that one high score is the highest score (in first place).

    Then a second player plays and beats that old high score. The formerly high score is now in second place.

    If I were to only send that game's high score, then the player who now is in second place is entirely lost because his score is overwritten by the new winner.

    So, I figured what I had to do before recording the new high score was take the player name/score/hit ratio from the first place slot and enter that into the second place slot; once that was completed, then write the information for the new first place winner.

    Now let us assume that all ten high score placements are taken, and a new player beats all of them. Theoretically, then, only the existing tenth place holder loses out, and all the others get moved down one slot. So, theoretically, I would need to be prepared to write all ten slots at once.

    Granted, not every high-score placement will win first place, but may fall somewhere lower. For those placements which are not changed for a game, I presently have it set up for those strings/values to replace themselves (thereby not changing).

    Is there a better way to handle how to configure this?

    Thank you for your input!



    Most graciously...

    RGBreality

  2. #12
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sharing files using a Lacewing Web server...

    No, you send the score and then the server works out where to put it in the highscores list. So the old 2nd place wouldn't be lost, the server would shift it down to 3rd (like it sounds like you do on the client now).

  3. #13
    Clicker Multimedia Fusion 2 DeveloperInstall Creator Pro

    Join Date
    May 2010
    Posts
    536
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sharing files using a Lacewing Web server...

    I see. So let me ask you this...

    On the Web server side, at the Start Frame condition, I would need the Named Variable object to open a local file on the computer hosting the Web server. This file would server as a back-up as well as the source data when the Web server/computer is shut down.

    If I were to save the game data as an encrypted NVO file, would the Named Variable object be able to parse which array elements correspond to which named variable (assuming that the encrypted NVO file was written from proper data from an earlier game)? Or would I need to specify "named variable 'Player Name 1' is 'this array element'"?

    On a somewhat related matter, I seem to be having a hard time properly writing the Get object's POST data content. I know that I am successfully hitting the Web server (in that I see "<hostname> submit" on the Web server list box), but I don't see a list of POST data from the Web server, nor does an INI file get written afterwards from the server.

    So, I'm wondering if I am properly writing these POST data commands. Here is an example (two actions from the Get object):

    - Get URL "http://localhost/submit" (commment: both server and client are running on the same computer)
    - Add POST data "Score 1" = Str$(GetValue from Player 1's Score)

    Do I enter the connection URL before or after the POST data?

    Thank you again for helping such a newbie!



    Most appreciatively...

    RGBreality

  4. #14
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sharing files using a Lacewing Web server...

    You add the post data first.

  5. #15
    Clicker Multimedia Fusion 2 DeveloperInstall Creator Pro

    Join Date
    May 2010
    Posts
    536
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sharing files using a Lacewing Web server...

    Thank you again for all your help, folks! It really IS helping!

    Okay, I'm at a point where I have the Web server ready... I've moved the conditional statements and actions that determine how the high scores are placed away from the client side to the server side. Likewise, from the client side I am only sending the current player name/high score/hit ratio from that game (rather than sending all strings and values).

    I have two problems now:

    1.) Looking at the Web server log, I am successfully requesting the scores from the Web server using a Get object. However, I don't know how to parse all this Get data so that Text Blitter objects can read and display them.

    2.) On the server-side, I cannot update server-side values if I include the condition:

    - Request_URL$(Lacewing server) = "Submit"

    Even though the "submit" is included at the end of the URL on the client-side. If I remove this condition, then values properly update on the server. So, I wonder how I can adjust this expression so that not any POST request tries to make adjustments to the score values?

    Thank you again for all the great community help!


    Most graciously...

    RGBreality

  6. #16
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Sharing files using a Lacewing Web server...

    I don't think you can have spaces in the POST data names with the Get object.

    If this isn't the problem, you'll need to upload the MFAs - there's just not enough information to work out the problem from what you posted


  7. #17
    Clicker Multimedia Fusion 2 DeveloperInstall Creator Pro

    Join Date
    May 2010
    Posts
    536
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sharing files using a Lacewing Web server...

    Hey, Jamie!

    I think the problem is not in the POST data from the Get object (on the client-side), but is on the server side.

    I have uploaded my Web server application here:

    View MFA


    Notice how in the conditions determining which placement in the high scores the POST data is to be placed, there are no expressions regarding the "Submit" in the URL. But in testing as the MFA is now, the information is changed successfully.

    Thank you for having a look at it.


    Most graciously...

    RGBreality

  8. #18
    No Products Registered

    Join Date
    Jun 2006
    Location
    UK.
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sharing files using a Lacewing Web server...

    Hi.
    Is this what you want?
    Attached files Attached files

  9. #19
    Clicker Multimedia Fusion 2 DeveloperInstall Creator Pro

    Join Date
    May 2010
    Posts
    536
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sharing files using a Lacewing Web server...

    Hey, Korjon! Thank you for putting in the effort to put your demo together for me! I really appreciate it! I apologize for not getting back to you sooner, as I was spending time wracking my brain understanding how you did your looping!

    Your demo was indeed very much what I had in mind. I've been able to leverage it for both my client- and server-side applications.

    I am still puzzled, though, exactly how your "Insert" Fastloop works. Could you explain that to me?

    Here's another tid-bit you might be able to help me with:

    Suppose that the final score for a game is the same as an existing high score slot. To determine which player is awarded the one slot, the player with the lowest "shot to hit" ratio gets it (implying that his shots were more accurate). So, how would I incorporate that into your "Insert Fastloop?

    I took a stab at it. I copied your existing condition comparing the final score to that within the loop index, then added another condition:

    (Global Variable) "Shots to Hit Ratio" < Val(Left$(GetString("High Score" Named Variable object) "Hit"), 1))

    (Since the "Hit Ratio" statistic is kept as a string (since I add the phrase " to 1" at the end of the global variable), the number itself has to be extracted.

    Beyond that, your demo was awesome! I very much appreciate the time and effort you put into creating that for me.

    I hope you have a great day!


    Most appreciatively...

    RGBreality

  10. #20
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Sharing files using a Lacewing Web server...

    It might be easier if you add the "to 1" only when you display the scores, instead of before you submit.

Page 2 of 3 FirstFirst 1 2 3 LastLast

Similar Threads

  1. Sharing data with C++ via LaceWing
    By Iceman in forum Android Export Module Version 2.0
    Replies: 1
    Last Post: 29th June 2013, 11:25 PM
  2. Basic Lacewing server/Serveur Lacewing basique
    By samcool_129 in forum File Archive
    Replies: 4
    Last Post: 24th April 2013, 05:50 AM
  3. Lacewing Web Server
    By DJFuego in forum Lacewing
    Replies: 1
    Last Post: 11th March 2011, 05:17 PM
  4. Lacewing server? Just a little help.
    By Gibbon in forum Lacewing
    Replies: 12
    Last Post: 16th December 2010, 06:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •