Advertising (This ad goes away for registered users. You can Login or Register)

Has anyone made a psp lua wlan game or program yet?

Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
Post Reply
dragonxtamer596
Posts: 188
Joined: Wed Oct 24, 2012 11:49 pm
Contact:

Has anyone made a psp lua wlan game or program yet?

Post by dragonxtamer596 »

I'm trying to find out how to make an online psp game, so I can learn how wlan and socket functions work. I can't seem to find many promising guides or any games I can take a look at the code for. If anyone reading this knows of any lua tutorials for this kind of stuff, I'd very much appreciate it if you could post it here, pm me it, or throw it at me somewhere. :) Thanks and have a great day.
Advertising
smithsf0x
Moderator
Posts: 265
Joined: Sat Jan 31, 2015 3:37 pm
Location: Görmänie

Re: Has anyone made a psp lua wlan game or program yet?

Post by smithsf0x »

You should try these things on Your PC first and then port it to the Vita. LÖVE is a good LUA engine to try things out. You can play a bit with the Networking on LÖVE.
When You get it working You can look at the source and start with simple UDPing on a LUAPlayer on PSP
Advertising
Image
dragonxtamer596
Posts: 188
Joined: Wed Oct 24, 2012 11:49 pm
Contact:

Re: Has anyone made a psp lua wlan game or program yet?

Post by dragonxtamer596 »

That should help, now just wondering could a psp or psvita host a server on themselves also could a vita or psp connect to a love(lua) server?
smithsf0x
Moderator
Posts: 265
Joined: Sat Jan 31, 2015 3:37 pm
Location: Görmänie

Re: Has anyone made a psp lua wlan game or program yet?

Post by smithsf0x »

Well I think the FTP homebrews for either the PSP or the Vita are a good start for hosting server on these devices
Image
dragonxtamer596
Posts: 188
Joined: Wed Oct 24, 2012 11:49 pm
Contact:

Re: Has anyone made a psp lua wlan game or program yet?

Post by dragonxtamer596 »

I am new to this so sorry for all the questions but if i use this can i make a game in lua that sends info to it and then get sent other peoples info back to me?
Edit1: Example- Player = {player.x,player.y} sending that?
Edit2: welp nvm luadev R0 has no tfp functions
[spoiler]WLAN: Wi-Fi
Functions

wlan.connected () - returns true or false depending on whether we are connected to a network or not

wlan.getconfigs () - returns a table with the configured connections. the table contains the fields name and ssid for each network

wlan.init () - returns 1 if the connection was successful and another value if it failed
- [[
* Can be called with no arguments, in which case selection dialog appears XMB networks, blocking the execution of the program until the connection is made ​​(or encounter an error xD).
* You can call a number as argument, in such a case would connect to the specified network (connection 1 for 1st, 2 for 2nd and so on) without blocking the program cycle (say it is the advanced mode connection).
* Finally, you can call with two arguments (both numbers). The 1st argument indicates the network that will connect and the 2nd indicates a maximum wait in seconds before it stops attempting to connect (in the XMB when time just says "timed out" would be something like that). This mode displays the connection dialog XMB but automatically connects to the network specified (blocks script execution)
]] -

wlan.ip () - returns the IP you were assigned

wlan.mac () - returns our direción physical MAC PSP

wlan.scan () - returns a table with active connections.
- [[
ssid: ssid the connection
dtim:?
bssid: bssid connection
rate: Connection Information
bsstype: Connection Type
rssi: connection strength
info: the connection information
channel: channel that emits
Atim:?
localtime:?
timestamp:??
beacon:??
]] -

wlan.status () - depending on the network status devuelbe number
- [[
0 offline
One scanning
Two connecting
3 obtaining IP
4 connected
5 authorizing
6 key exchange
]] -

wlan.statustext () - same as wlan.status () but instead of the strings devolber devuelbe numbers above

wlan.strength () - from 0 to 100 the signal level

boolean wlan_init (config)
Connect to a wireless access point.


************************************************** ******************************
Function Documentation

boolean wlan.init (config)
Connect to a wireless access point.
parameters:
config connection number to use. If you specify a number, use the connection previously configured on the PSP. When using the connection number 0, connections dialog opens and the user choose the preferred connection.
Unless you use the dialog, this function returns immediately, thus attempting to connect immediately after using this function would give error, because it takes a few seconds to connect. You can check the status of the connection using the function xxxxxxx.
Returns:
True if connected or started connecting, otherwise false.
Socket.connect socket (server, port pair, local port) - Creates a new Socket with TCP / IP. If not specified local port opens a random port.

socket.udp socket (server, port pair, local port) - Creates a new Socket with UDP protocol. If not specified local port opens a random port.

socket.free nil (socket) - Closes and removes the Socket.

boolean socket.isconnected (socket) - Make sure the socket is connected.

socket.localport number (socket) - Returns the local port.

socket.peerport number (socket) - Returns the port pair.

socket.packetslost number (socket) - Returns the number of lost packets.

socket.recv string (socket, byte) - Read data received from the socket. The number of bytes is optional

Socket.Send number (socket, string) - Send a string through the socket connection.[/spoiler]
smithsf0x
Moderator
Posts: 265
Joined: Sat Jan 31, 2015 3:37 pm
Location: Görmänie

Re: Has anyone made a psp lua wlan game or program yet?

Post by smithsf0x »

Well I thought it more like "look how they made a server" and not "use them as server" because that won't work at all.

But the things You need do You already have...(socket.send number and socket recv string)
Image
dragonxtamer596
Posts: 188
Joined: Wed Oct 24, 2012 11:49 pm
Contact:

Re: Has anyone made a psp lua wlan game or program yet?

Post by dragonxtamer596 »

Those are both in lua dev I just need to know how to make a code that works and how data is send and received and if a server is needed how to do that any tutorial, example code, and/or info on this will be very helpful and appreciated. :)
Post Reply

Return to “Programming and Security”