Page 1 of 3 1 2 3 LastLast
Results 1 to 30 of 64

RELEASE: netlib

This is a discussion on RELEASE: netlib within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Hey everyone, I have created a small function library in Lua that will allow anyone with knowledge in Lua to ...

  
  1. #1
    Points: 24,247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    texas
    Posts
    2,803
    QJ Pts
    24,247
    Level
    94
    Downloads
    0
    Uploads
    0

    Lightbulb RELEASE: netlib

    Hey everyone, I have created a small function library in Lua that will allow anyone with knowledge in Lua to make their game be online multiplayer.
    It uses simple commands such as netsend(id,data,abtribute ) and netget(id).
    The idea of the id is say if I made a game, the id could be "samsgame". Then, I could do netsend("samsgame","sam is at level 1","a"). If the abtribute is "a", it will add to the data, if it is "w", it will replace the data. Then another PSP would do something like
    otherlevel = netget("samsgame")

    Sending data takes .3 seconds, recieving data takes 1 to 3 seconds.

    I do ask that if you use this, dont abuse it. Dont make programs that sit there and make hundreds of useless ID's just to spam. I also ask that if you are done with an id, delete it using netdelete(id). If an id does not exist, netsend will create it.

    Also, please don't change the source if you include it in your programs. Please email/pm me with bugs and suggestions.

    (I wonder when they will put this on the front page...emailed them yesterday)

    BUGS:
    -On release file, I put "r" adds to file, I meant "a".
    -I need a new server because Yeldarbs domain's IP doesnt work... this will fix most freezes.

    NEW: I have created a sample chat program.
    Controls:
    Square to refresh
    Start to quit
    Cross to enter message:
    up/down to change letter
    left is backspace, right is next letter
    cross is send


    Attached Files Attached Files
    Last edited by youresam; 02-23-2006 at 05:40 PM.
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  2. #2
    Suicide Silence
    Points: 21,012, Level: 91
    Level completed: 33%, Points required for next Level: 338
    Overall activity: 0%

    Join Date
    Sep 2005
    Location
    New Jersey
    Posts
    2,163
    QJ Pts
    21,012
    Level
    91
    Downloads
    0
    Uploads
    0

    Default

    Hey thanks, i know a couple devs that could use this, including myself

  3. #3
    Points: 24,247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    texas
    Posts
    2,803
    QJ Pts
    24,247
    Level
    94
    Downloads
    0
    Uploads
    0

    Default

    Wow.... I wonder why its not front-paged...
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  4. #4
    QJ Gamer Gold
    Points: 18,914, Level: 87
    Level completed: 13%, Points required for next Level: 436
    Overall activity: 0%

    Join Date
    Jul 2005
    Posts
    984
    QJ Pts
    18,914
    Level
    87
    Downloads
    0
    Uploads
    0

    Default

    It's a very worthy program, great job. I'm sure it will get on the front page soon =)

  5. #5
    Developer
    Points: 8,545, Level: 62
    Level completed: 32%, Points required for next Level: 205
    Overall activity: 0%

    Join Date
    Aug 2005
    Posts
    472
    QJ Pts
    8,545
    Level
    62
    Downloads
    0
    Uploads
    0

    Default

    Now this could come in handy! I may use it in Monopoly! I still need to dl and see its availabitlities and limitations though...

    Its prob not front paged, because no mod ( that can post on front page ) has seen it.

    PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude
    http://www.cools.biaklan.com
    Currently Working on ?????

    Quote of the Week

  6. #6
    Quality Haxing Since 1991
    Points: 29,255, Level: 99
    Level completed: 55%, Points required for next Level: 745
    Overall activity: 0%

    Join Date
    Oct 2005
    Location
    Pennsylvania, USA Fi
    Posts
    6,206
    QJ Pts
    29,255
    Level
    99
    Downloads
    0
    Uploads
    0

    Default

    Just send them an email about it, and they'll probably post it. Seems really nice, and I will definitely use it once i start developing a new lua game that I'm not quite sure what it is yet...
    Quote Originally Posted by Noriko
    I would call you gay but I love you.


    Wait ...huh.



  7. #7
    QJ Gamer Gold
    Points: 18,914, Level: 87
    Level completed: 13%, Points required for next Level: 436
    Overall activity: 0%

    Join Date
    Jul 2005
    Posts
    984
    QJ Pts
    18,914
    Level
    87
    Downloads
    0
    Uploads
    0

    Default

    I know you sent an email before, but I sent another one in case they overlooked it :P

  8. #8
    QJ Gamer Green
    Points: 40,380, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Join Date
    Apr 2006
    Location
    Grand Line
    Posts
    5,996
    QJ Pts
    40,380
    Level
    100
    Downloads
    0
    Uploads
    0

    Default

    hey yoursam, could i work with you later after i get the engine of my game down (naruto adventure) to maybe add some Co-op (ad-hoc, maybe online) and some Vs ( ad-hoc maybe online)?
    [CENTER][IMG]http://img130.imageshack.us/img130/1640/acefcbanner2wo9.gif[/IMG]
    [SIZE=1][B]I'm soo hot[/B][/SIZE]
    [/CENTER]
    [SIZE=2][CENTER][/SIZE][/CENTER]
    [center]Sorry. No Advertising[/center]

  9. #9
    Points: 24,247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    texas
    Posts
    2,803
    QJ Pts
    24,247
    Level
    94
    Downloads
    0
    Uploads
    0

    Default

    Well, all this is is luaplayer code, I'm not sure what your program is in (download link expired), but I also dont think I will have time to work on this for a while (thats why I was rushing a release, finished in 2 hours).

    Yup, thats right! report cards come tomorrow. cya everyone.
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  10. #10
    QJ Gamer Gold
    Points: 18,914, Level: 87
    Level completed: 13%, Points required for next Level: 436
    Overall activity: 0%

    Join Date
    Jul 2005
    Posts
    984
    QJ Pts
    18,914
    Level
    87
    Downloads
    0
    Uploads
    0

    Default

    I assume it's GPL so that others can improve upon it in your absence?

  11. #11
    Points: 24,247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    texas
    Posts
    2,803
    QJ Pts
    24,247
    Level
    94
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by TheKnightInHell
    Hey thanks, i know a couple devs that could use this, including myself
    How?
    2.6, no GTA....
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  12. #12
    Points: 24,247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    texas
    Posts
    2,803
    QJ Pts
    24,247
    Level
    94
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by Yeldarb
    I assume it's GPL so that others can improve upon it in your absence?
    Um... the most I'll be out is 3 weeks, but I dont want anyone modifying it.

    Not that they can, anyway. They would need access to the server.
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  13. #13
    QJ Gamer Gold
    Points: 18,914, Level: 87
    Level completed: 13%, Points required for next Level: 436
    Overall activity: 0%

    Join Date
    Jul 2005
    Posts
    984
    QJ Pts
    18,914
    Level
    87
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by youresam
    Um... the most I'll be out is 3 weeks, but I dont want anyone modifying it.

    Not that they can, anyway. They would need access to the server.
    But they could work on the client side Lua part :P

  14. #14
    QJ Gamer Silver
    Points: 20,361, Level: 90
    Level completed: 3%, Points required for next Level: 489
    Overall activity: 0%

    Join Date
    Oct 2005
    Location
    ~* Confidential *~
    Posts
    839
    QJ Pts
    20,361
    Level
    90
    Downloads
    0
    Uploads
    0

    Default

    Hey youresam, I modified the netlib code where it might have a faster data transfer speed and added 2 new functions:
    netconnect()
    and
    netdisconnect()

    I saw that your netlib code always connected to the server, did it's thing, then disconnected after it was done every time you called the function . So, to smooth things out, I had the 2 functions created and modified the original code so that it always had a connection to the server when netconnect() was called untill the netdisconnect() was called :Punk:.

    BTW, how many connections can the server hold?

    [ATTACHMENT REMOVED by alatnet]
    Last edited by alatnet; 02-23-2006 at 07:27 PM.

    "Every team needs an idealistic person (whether they are a noob or a pro), my team doesn't have one cus im the idealistic founder."-me
    Anime/Manga and Fanfiction is my inspiration!

    Creator of:
    - PSPSDK makefile creator - Lua Prompt - Animated Sprite Class\Library for Lua - Gmax2PSP -

  15. #15
    Points: 24,247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    texas
    Posts
    2,803
    QJ Pts
    24,247
    Level
    94
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by Yeldarb
    But they could work on the client side Lua part :P
    Um.... no. The lua part is 'perfect', IE no way to improve it. ;)
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  16. #16
    Points: 24,247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    texas
    Posts
    2,803
    QJ Pts
    24,247
    Level
    94
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by alatnet
    Hey youresam, I modified the netlib code where it might have a faster data transfer speed and added 2 new functions:
    netconnect()
    and
    netdisconnect()

    I saw that your netlib code always connected to the server, did it's thing, then disconnected after it was done every time you called the function . So, to smooth things out, I had the 2 functions created and modified the original code so that it always had a connection to the server when netconnect() was called untill the netdisconnect() was called :Punk:.

    BTW, how many connections can the server hold?
    Have you even tried your code?

    If you keep the connection open, the next time you try to send a HTML GET command, the socket will close immediatly. Find a work-around to this and I will gladly put you in the credits.
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  17. #17
    QJ Gamer Silver
    Points: 20,361, Level: 90
    Level completed: 3%, Points required for next Level: 489
    Overall activity: 0%

    Join Date
    Oct 2005
    Location
    ~* Confidential *~
    Posts
    839
    QJ Pts
    20,361
    Level
    90
    Downloads
    0
    Uploads
    0

    Default

    I added an if statement to every function:
    Code:
    if socket=nil or not socket:isConnected() then netconnect() end
    That should be an ok work around.

    "Every team needs an idealistic person (whether they are a noob or a pro), my team doesn't have one cus im the idealistic founder."-me
    Anime/Manga and Fanfiction is my inspiration!

    Creator of:
    - PSPSDK makefile creator - Lua Prompt - Animated Sprite Class\Library for Lua - Gmax2PSP -

  18. #18
    QJ Gamer Gold
    Points: 18,914, Level: 87
    Level completed: 13%, Points required for next Level: 436
    Overall activity: 0%

    Join Date
    Jul 2005
    Posts
    984
    QJ Pts
    18,914
    Level
    87
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by youresam
    Um.... no. The lua part is 'perfect', IE no way to improve it. ;)
    No code is ever perfect or without room for improvement ;)

  19. #19
    Points: 24,247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    texas
    Posts
    2,803
    QJ Pts
    24,247
    Level
    94
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by alatnet
    I added an if statement to every function:
    Code:
    if socket=nil or not socket:isConnected() then netconnect() end
    That should be an ok work around.
    no it shouldnt.
    It will FREEZE every time you try the 2nd time. this is because the socket is connected until you try to SEND the GET command. ou know, that bytesSend = whatever junk? yeah, that makes it lose connection to the socket.

    Please take down your code, it does not work.
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  20. #20
    Points: 24,247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    texas
    Posts
    2,803
    QJ Pts
    24,247
    Level
    94
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by Yeldarb
    No code is ever perfect or without room for improvement ;)
    Yeah, well, I meant as far as connecting and getting data from the server. I'm going to add additional functions soon enough...
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  21. #21
    QJ Gamer Silver
    Points: 20,361, Level: 90
    Level completed: 3%, Points required for next Level: 489
    Overall activity: 0%

    Join Date
    Oct 2005
    Location
    ~* Confidential *~
    Posts
    839
    QJ Pts
    20,361
    Level
    90
    Downloads
    0
    Uploads
    0

    Default

    Dang. Well back to the modding board.

    "Every team needs an idealistic person (whether they are a noob or a pro), my team doesn't have one cus im the idealistic founder."-me
    Anime/Manga and Fanfiction is my inspiration!

    Creator of:
    - PSPSDK makefile creator - Lua Prompt - Animated Sprite Class\Library for Lua - Gmax2PSP -

  22. #22
    Points: 24,247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    texas
    Posts
    2,803
    QJ Pts
    24,247
    Level
    94
    Downloads
    0
    Uploads
    0

    Default

    Yup.

    Now, in my other thread, framerate said:

    Quote Originally Posted by framerate
    are you using TCP or UDP?

    perhaps UDP would be faster? (also I'm not sure which is the norm in online games.. would assume TCP for security)

    Are you just writing a simple socket connection program? (I say "simple" like it's easy... was one of the trickiest things I've ever coded heh)

    Now... if we (or Shine) could implement that (UDP), this thing would be fast. (Ever played Burnout online? LOTS of variables/second) I would imagine that PSPRadio uses UDP.

    But, unfortuantuly, we have HTTP. Which, even though is awesome, is only good for webbrowsers and stuff like that.
    Last edited by youresam; 02-23-2006 at 07:37 PM.
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  23. #23
    QJ Gamer Silver
    Points: 20,361, Level: 90
    Level completed: 3%, Points required for next Level: 489
    Overall activity: 0%

    Join Date
    Oct 2005
    Location
    ~* Confidential *~
    Posts
    839
    QJ Pts
    20,361
    Level
    90
    Downloads
    0
    Uploads
    0

    Default

    I couldn't really test out the program cus for some fracking reason my wan light goes on for a few seconds (around 2-5), light turns off, and nothing happens.

    "Every team needs an idealistic person (whether they are a noob or a pro), my team doesn't have one cus im the idealistic founder."-me
    Anime/Manga and Fanfiction is my inspiration!

    Creator of:
    - PSPSDK makefile creator - Lua Prompt - Animated Sprite Class\Library for Lua - Gmax2PSP -

  24. #24
    Points: 24,247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Join Date
    Jul 2005
    Location
    texas
    Posts
    2,803
    QJ Pts
    24,247
    Level
    94
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by alatnet
    I couldn't really test out the program cus for some fracking reason my wan light goes on for a few seconds (around 2-5), light turns off, and nothing happens.
    Ah! Bingo!
    See, thats what was happening to my PSP about 2 days ago.
    Do you by any chance use PSIX? I think that program might have messed it up. Or maybe WiFi sniffer. Please tell me witch of those programs you have (if any).

    I fixed it by clicking "Restore Default Settings", then I had to re-set up my wireless network (20 digit WEP key!). But, after that it worked. Oh, and for some reason, my version number is still 2.00... (not the actual version, Ive never upgraded)
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  25. #25
    QJ Gamer Gold
    Points: 18,914, Level: 87
    Level completed: 13%, Points required for next Level: 436
    Overall activity: 0%

    Join Date
    Jul 2005
    Posts
    984
    QJ Pts
    18,914
    Level
    87
    Downloads
    0
    Uploads
    0

    Default

    Sam, do you mind if I try porting this to C tomorrow? I have a day off from school and that would be a pretty cool thing to do in it :P

    Edit: by the way you made the main page at psp-hacks psphacks psp3d and dcemu

  26. #26
    QJ Gamer Silver
    Points: 20,361, Level: 90
    Level completed: 3%, Points required for next Level: 489
    Overall activity: 0%

    Join Date
    Oct 2005
    Location
    ~* Confidential *~
    Posts
    839
    QJ Pts
    20,361
    Level
    90
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by youresam
    Ah! Bingo!
    See, thats what was happening to my PSP about 2 days ago.
    Do you by any chance use PSIX? I think that program might have messed it up. Or maybe WiFi sniffer. Please tell me witch of those programs you have (if any).

    I fixed it by clicking "Restore Default Settings", then I had to re-set up my wireless network (20 digit WEP key!). But, after that it worked. Oh, and for some reason, my version number is still 2.00... (not the actual version, Ive never upgraded)
    No I didn't use PSIX of Wifi sniffer, it does work for the infanstructure mode of the games that i have. I did up/downgrade a few times though. And i use LUA OS, File Assistant++, and UMD Emulator.

    "Every team needs an idealistic person (whether they are a noob or a pro), my team doesn't have one cus im the idealistic founder."-me
    Anime/Manga and Fanfiction is my inspiration!

    Creator of:
    - PSPSDK makefile creator - Lua Prompt - Animated Sprite Class\Library for Lua - Gmax2PSP -

  27. #27
    QJ Gamer Gold
    Points: 18,914, Level: 87
    Level completed: 13%, Points required for next Level: 436
    Overall activity: 0%

    Join Date
    Jul 2005
    Posts
    984
    QJ Pts
    18,914
    Level
    87
    Downloads
    0
    Uploads
    0

    Default

    Hey you made the front page Congrats.

  28. #28
    Cool Developer
    Points: 9,008, Level: 63
    Level completed: 86%, Points required for next Level: 42
    Overall activity: 0%

    Join Date
    Nov 2005
    Location
    Australia
    Posts
    1,301
    QJ Pts
    9,008
    Level
    63
    Downloads
    0
    Uploads
    0

    Default

    This is interesting, but unsecure...

    Its as easy as making a 2 line lua script, and a certain app would be destroyed...

    Perhaps the ability to register an id, so it cannot be deleted?
    Hmm...

  29. #29
    Developer
    Points: 5,478, Level: 47
    Level completed: 64%, Points required for next Level: 72
    Overall activity: 0%

    Join Date
    Jun 2005
    Location
    New Zealand
    Posts
    171
    QJ Pts
    5,478
    Level
    47
    Downloads
    0
    Uploads
    0

    Default

    At first I was quite excited when I saw this, then I realised that it only uses infrastructure mode.

    No offense to you, you have done a good job on this. But it would be really great if someone could make it this easy to communicate between two PSPs in AdHoc mode.

  30. #30
    Points: 4,169, Level: 41
    Level completed: 10%, Points required for next Level: 181
    Overall activity: 0%

    Join Date
    Feb 2006
    Posts
    11
    QJ Pts
    4,169
    Level
    41
    Downloads
    0
    Uploads
    0

    Default

    I agree with Fabre. I am looking for some code to transfer arbitrary ascii/binary data in ad-hoc mode using LuaPlayer.


 
Page 1 of 3 1 2 3 LastLast

Tags for this Thread

Posting Permissions

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





All times are GMT -8. The time now is 08:57 AM.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .