Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Moebius

#301
Personally, I'd try something using PHP.  You can use PHP to read and write to databases and you can pass values for it to write to the highscores list from GLBasic.  Then, to retrieve a high scores list you can use NETWEBGET (I think that's the one) to retrieve a PHP webpage which is just a list of the high scores.  Then, in GLBasic, you can break this up into an array of names and scores and display them using PRINTs.  Complicated, but probably a 'simple' way to do it using inbuilt web functions.  This will also work if you're using a web host.
Alternatively, if you are using your own server, you can run your own program on it which listens for requests from your app.  When your app sends high-score data to your server on a special socket/port that your server-program uses, it can write the info to a database-file.  Likewise, when the server-program receives a request it can send out the data to the device that sent the request.

I'd go with the first option because there would be less work involved, and you can use a web-host, without requiring your own server.

In terms of getting a domain name and hosting your website, if you want to do it for free I find 'co.cc' and '000webhost.com' to be a good combination.  You can get a subdomain of 'co.cc' for free (i.e. something like 'glrules.co.cc'), and you can host the website's data on 000webhost.com so that glrules.co.cc will point to your own website.

If most of what I just 'said' sounded like gibberish, let me know.  Good luck!
#302
Okay things seem to be working now - thanks for the help!
#303
I've ended up using SOCK_GETIP to convert the strings from SOCK_GETIP$ into integers, with these int ips at the front of the initial server finding udp messages.  It should be able to get the sender's IP if GLBasic uses winsock, but this method will work fine.
One last question, do all of GL's networking functions work in the same way on iOS?
#304
I think GLBasic uses Winsock, and the 'recvfrom' function (see http://msdn.microsoft.com/en-us/library/ms740120%28VS.85%29.aspx) seems to put the sender's IP address into a 'sockaddr' structure...  I think it would be best to go with putting the PC's IP addresses at the front of the UDP message.  Should I stick with "123.5.2.9|143.8.34.2|" etc. or is there a way to literally put in the IP address as a 4-byte integer at the start of the message string for SOCK_UDPSEND?
#305
Fears confirmed...  There's just one problem with sending the IP address in the message - computers can have multiple IP addresses for different networks right?  I see a SplitStr happening...  Is there a simple way to use Inline C++ or something to deal with 'sockets'?  (yes, I know I just used 'simple' and 'C++' in the same sentence :whistle:)  I'll probably be assuming 'no' and try sending the result of NETGETIP$ along with the message.  Thanks for the quick response.  If anyone at all knows a simpler way, please share it by all means   :)
#306
Hello everyone,

My question is simple - what is the easiest way to get the IP address of the computer that sent your program a UDP message?
I could get the sending program to write it's IP address at the front of the message followed by, say a '|' and use SplitStr etc. to get the byte values from a string IP address and then use binary shifts to convert it into an integer IP address, but I was wondering if there is a simpler way.

Thanks.
#307
Although OpenFeint is a great option for in-game high-score sharing, the beauty of using Facebook is that it spreads knowledge about your game, and it gets people to challenge each other.  If you see "XYZ scored 150000 in GAME" on Facebook, I think the instinctive response is to try and better their score.
#308
I stand corrected.  I'm still new to GLBasic, and a quick search (which does work for me :)) yields a lot of entity related results.  Sorry for my ignorance :S
#310
Button statuses seem to work without ShowScreen (whether you check them via MouseAxis or MouseState) but the pointer position isn't updated.
#311
okay - I was wondering whether it was a 'bug' or a 'feature' :)
I was getting my program to wait at a menu screen for the user to click on any of the buttons when I noticed this.  ShowScreen processing messages from Windows makes sense.  Thanks for the quick response.
#312
Hello,
I'm not sure if this is the right place to post this, but it seems like a 'bug' to me and none of the other pages seem to really fit this.

It seems that the position of the mouse pointer is only updated when ShowScreen is called.  I'm not sure if this is intentional, but this example demonstrates it.  Hold the left button down to use showscreen.  Run it in debug mode:

Code (glbasic) Select
SYSTEMPOINTER TRUE

mbb = 0
mba = 1

WHILE mbb = 0

DEBUG mx + " " + my + " " + mba + " " + mbb + CHR$(10)

IF mba = 1
SHOWSCREEN
ENDIF

MOUSESTATE mx, my, mba, mbb

WEND

END



In addition, if the pointer is disabled, the cursor wont move while ShowScreen isn't being called.  If you want, you can try the following example.  Again, left click enables ShowScreen.  In this one, note that movement in between turning ShowScreen on and off isn't recognised:

Code (glbasic) Select
SHOWSCREEN

WHILE mbb = 0

MOUSESTATE mx, my, mba, mbb

PRINT mx, 10, 20
PRINT my, 10, 40
PRINT "<=", mx, my-8

IF mba = 1
SHOWSCREEN
ENDIF

WEND

END



Note:  I've run these examples using Keys instead of the left-click and the same thing happens.  Cursor movement is recognised when ShowScreen is called.
#313
I'm still a user of Blitz3D.  Blitz3D has less support for advanced 3D commands than GLBasic (e.g. No inbuilt functions to load shaders), and cannot compile to multiple platforms like GLBasic.  It doesn't support inline code.  However, I've found the commands to be more intuitive and I like the entity-based system for 3D.  Overall, GLBasic has more features, but I find it easier to quickly create a program using Blitz.
#314
From what I know, any app (within reason) compiled with XCode is accepted by Apple.  The way I see it, Apple would be happy about GLBasic.  It means more developers -> more mac purchases -> more app purchases -> more money