Live data from Hacker News

Show HN: RESTful Doom – HTTP+JSON API inside Doom

1amstudios.com

21–30 of 31 posts

Re: Show HN: RESTful Doom – HTTP+JSON API inside Doom

#22
Since this has 'native' integration it could be a great testbed for learning/applying reinforcement learning algorithms in a fun setting without having to deal with the 'heavier' (but more comprehensive) vnc based tooklits such as openai universe.

Awesome work, btw!

Re: Show HN: RESTful Doom – HTTP+JSON API inside Doom

#24
So nerdy but so awesome - my jaw dropped when i watched the video :)

i think this could open up possibilities with live stats if each player runs their own server and the results are combined on into a seperate website? otherwise it could be used to create new game modes or a scoring system?

Re: Show HN: RESTful Doom – HTTP+JSON API inside Doom

#26
post #20

That's pretty cool! Well done. Now I'm wondering whether the game clock could be suspended unless ticks were sent via API, to turn it into a turn-based game to be played only via API calls...

Sounds like an API version of Superhot.

wow I hadn't seen that game, the trailer looks amazing!

Re: Show HN: RESTful Doom – HTTP+JSON API inside Doom

#27
This isn't REST, there are no hyperlinks and no hypermedia controls. It is designed pretty wrong. Just look at this brittle coupling!

    POST /api/player/actions
    Content-Type: application/json

    { "type": "shoot" }
How do I know what "type" of action is available to me? It isn't documented. Why should I need to know or try to look it up in the documentation in the first place, anyway? The server should just tell me what I can do, and then I act on it! Why should I need to know all these special URLs, except a single central entry point (a.k.a. bookmark)? The server should just tell me from each resource where I can go to! A more useful attempt:

    GET /
    Content-Type: text/html

    

The shotgun is equipped. There is a green armor ahead.

You see a baron of hell attacking an imp.

There is a yellow-framed door, attempt to it.

, …
(HTML used for ease of illustration on HN, alas JSON proper - being a dumb serialisation format - it deficient of hyperlinks or hypermedia controls, but there are extensions for it. This audience is less likely to be familiar with them.)

It really bothers me that programmers call things REST, and when you look at it it isn't REST at all because they don't know the first thing about it.

Re: Show HN: RESTful Doom – HTTP+JSON API inside Doom

#28
post #27

This isn't REST, there are no hyperlinks and no hypermedia controls. It is designed pretty wrong. Just look at this brittle coupling! POST /api/player/actions Content-Type: application/json { "type": "shoot" } How do I know what "type" of action is available to me? It isn't documented. Why should I need to know or try to look it up in the documentation in the first place, anyway? The server should just tell me what I…

Can you share some of the extensions?

Re: Show HN: RESTful Doom – HTTP+JSON API inside Doom

#29
post #27

This isn't REST, there are no hyperlinks and no hypermedia controls. It is designed pretty wrong. Just look at this brittle coupling! POST /api/player/actions Content-Type: application/json { "type": "shoot" } How do I know what "type" of action is available to me? It isn't documented. Why should I need to know or try to look it up in the documentation in the first place, anyway? The server should just tell me what I…

In a traditional REST API, where do non-RESTful things (like other API calls, or "business logic") tend to go?

Is there /db/restEndpoints and /rpc/nonRESTfulEndpoints?

Re: Show HN: RESTful Doom – HTTP+JSON API inside Doom

#30
post #27

This isn't REST, there are no hyperlinks and no hypermedia controls. It is designed pretty wrong. Just look at this brittle coupling! POST /api/player/actions Content-Type: application/json { "type": "shoot" } How do I know what "type" of action is available to me? It isn't documented. Why should I need to know or try to look it up in the documentation in the first place, anyway? The server should just tell me what I…

In a traditional REST API, where do non-RESTful things (like other API calls, or "business logic") tend to go? Is there /db/restEndpoints and /rpc/nonRESTfulEndpoints?

Business logic should be hidden behind the API and the representation. Just like a website, actions are presented when the business logic allows it.

Other API calls depend on the purpose. If its part of the business logic, it's probably back end and hidden as described above.

If the other API call simply powers the UI, you might keep it in the client. One example is autocomple for facebook friends. The client can call facebook for a list, let the user select their friend, and then send that friends info to your API.

With that said, I'm not sure how either of those are "non-RESTful" so maybe I missed the point of the question?

Post reply on HN