Hey, I wanna put a version of snake in a 404 page, and I already have a version of snake I programmed in Python (tkinter GUI).
How would I get my sweet 404 page up?
> inb4 "use javascript"
> inb4 "answer not found"
>>54517193
are you literally retarded? the only way you can create a inbrowser game is by using javascript.
>>54517219
Or have it on the JVM
>>54517219
You got me.
I'm literally retarded.
So, this is a question about recycling code.
Yes, I am aware that browsers only load html and that the script tag only embeds Javascript. Note how the picture is Django, though -- Django's ORM and Template Language enable Python code to be converted to html.
The solution would clearly not be anywhere near this simple, because we're talking about an embedded GUI, but there are ways of tweaking things.
>>54517314
Nah
>>54517314
you do know that html is a markup language? the only thing that you would need for a snake game (I assume like the Nokia game), is 1 single html element (canvas) and lots of javascript code.
>>54517452
I'm not sure what "lots" means.
I can do it in ~150 lines of python, but JS bugs me and probably takes a few more lines. Regardless, there's a tutorial for exactly what you describe, here:
http://thecodeplayer.com/walkthrough/html5-game-tutorial-make-a-snake-game-using-html5-canvas-jquery
>>54517543
well then you dont need to do anything, just copy the code
webgl?
>>54517695
>3d graphic library for 2d game
>>54517756
well considering OP is putting pointless shit into status pages why not go all the way
>>54517314
>>>54517219
>You got me.
>I'm literally retarded.
>So, this is a question about recycling code.
>Yes, I am aware that browsers only load html and that the script tag only embeds Javascript. Note how the picture is Django, though -- Django's ORM and Template Language enable Python code to be converted to html.
>The solution would clearly not be anywhere near this simple, because we're talking about an embedded GUI, but there are ways of tweaking things.
Not possible. Just learn JavaScript. It's a fun language.
>>54517951
>It's a fun language.
);});}
:(
>>54517314
>..enable Python code to be converted to html.
And that's the point.
A game works mostly on the client side, so you need to write it in something that runs IN THE BROWSER of the client. I doesn't matter if you have an python interpreter in your server.
So you have to take something like JavaScript or Flash.