Skip to content

Internet Function #402

Open
Open
@fangzhangmnm

Description

@fangzhangmnm

Does it a good idea to implement some internet api for multiplayer games?

Activity

Jummit

Jummit commented on Nov 19, 2017

@Jummit

You could do this with a function for reading a website and one for posting something.
Then you would have to have an own website that can store data and send it to the clients or so.

Jaezmien

Jaezmien commented on Nov 24, 2017

@Jaezmien

(implement playerio :>)

hashalon

hashalon commented on Nov 29, 2017

@hashalon

What about something like a shared RAM that would be synchronized between client and server. It would be a nice pro feature, I think.

jahodfra

jahodfra commented on Nov 29, 2017

@jahodfra
Contributor

Personally I think that ability to do HTTP request would just be interesting for uploading score, tracking users and high latency communication (turn based games).

I see TIC more directed to smaller action games which would benefit from having UDP communication. Still writing proper network code is lot of work so I am wondering if this task cannot be done once in TIC e.g. as @Harraps suggested by having shared memory.

I would see it that any client should be able to connect to special TIC-server which would wait until one of the client will start the game. Each client would then be able to modify the common memory. The server would maintain the memory and send all modifications to all other clients. The server would be run and maintained by a developer of cartridge. The server would have to reconcile modifications from all clients - e.g. in custom lua function. The resulting state of the game would then be send back to clients and clients would have specific lua function which should reconcile version of the server shared memory with their own local version. The whole state of the game should then fit into one UDP packet.

jahodfra

jahodfra commented on Nov 29, 2017

@jahodfra
Contributor

I took a look and even UDP communication would need the server for establishing connection for cartridges running in browser (WebRTC).

https://stackoverflow.com/questions/13216785/how-to-send-a-udp-packet-with-web-rtc-javascript
I found following JS game using WebRTC - https://github.com/rynobax/jump-game

fangzhangmnm

fangzhangmnm commented on Dec 10, 2017

@fangzhangmnm
Author

After the ludum dare, I realized that it is very useful to add a online highscore service for tic-80.

jahodfra

jahodfra commented on Dec 10, 2017

@jahodfra
Contributor

The online score is in issue #362.

jahodfra

jahodfra commented on Dec 11, 2017

@jahodfra
Contributor

I filled #457 to describe how the games can work over network.

added
discussionIssues with no clear action or preferred solution
enhancementImprovement of existing feature or adding something new
on Nov 7, 2019
txgruppi

txgruppi commented on Jul 14, 2022

@txgruppi
Contributor

Hey everyone. I would like to revive this thread. I would love to have basic HTTP requests to work with some scores/raking.

BuoYancYdabl

BuoYancYdabl commented on Jul 21, 2022

@BuoYancYdabl

Does it a good idea to implement some internet api for multiplayer games?

not internet, but p2p would be great!

sprive

sprive commented on Sep 6, 2023

@sprive

I want to +1 this ask, but really there are 4 facets here:

  1. playerio support
  2. High score saving (public server)
  3. Internet game loading menu
  4. generic Internet support (tcp udp and/or HTTP), probably for reasons not described above

What might help is creation of these 4 focused requests as distinct issues, linking them from here, and close this. This ticket likely can not encompass all of the above and still get actioned.

clsource

clsource commented on Nov 29, 2023

@clsource

I think some web connectivity would be great.
But a simple HTTP lib or websockets would be enough for most games.

For example using https://docs.rs/phyllo/latest/phyllo/ for using Phoenix Channels would
enable using Phoenix Framework as a Backend for the Games.

But each developer has their own preferences.

My recommendation would be providing just a plugin like mechanism for TIC
and each developer hooks some events in C or Rust and compiles a TIC version
with their own extensions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionIssues with no clear action or preferred solutionenhancementImprovement of existing feature or adding something new

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @txgruppi@clsource@jahodfra@Anrock@fangzhangmnm

      Issue actions

        Internet Function ยท Issue #402 ยท nesbox/TIC-80