Others Is it possible to code a HTML like game using Python

Philip_J_Fry

New Member
Aug 20, 2020
6
0
Hello,

I have a concept in mind, a crew management game with hijab-girls. I want to learn to code with Python but RenPy seems too VN-oriented. I saw some HTML games with interesting displays/views that could be useful given the gameplay mecanics I want to implement (move on a map with tiles, build a camp, similar features to RTS) while showing the map.
Is it possible to develop a HTML looking game using a library like Pygame ?
 

lolguy66

New Member
Sep 22, 2021
3
1
I dont think you can use pygame for it but you can do a bit of html coding with python if you use a python -> javascript "translator" or a javascript engine that runs the python, you can check out this wiki page for more info also, i would in general not recommend pygame, i have never had a good experience with it.
 

Philip_J_Fry

New Member
Aug 20, 2020
6
0
I dont think you can use pygame for it but you can do a bit of html coding with python if you use a python -> javascript "translator" or a javascript engine that runs the python, you can check out this wiki page for more info also, i would in general not recommend pygame, i have never had a good experience with it.
Thx for your advices, however I don't want to code a game especially for web browsers, I just want to get a similar display as in Degrees of Lewdity, Incubus City because it would make it easier to organise the game menus. What Python library would you advise ?
 

shark_inna_hat

Active Member
Game Developer
Dec 25, 2018
705
2,765
How about Brython? It's Python for the browser, basically you use it in place of javascript but it's Python.
If you want a working example - grab my game, it's written in python/html/css, free, open sourced, code is commented and comes with some tools as well (also written in python/css/html). https://f95zone.to/threads/sluted-v0-5-shark-in-a-hat.97373/

Some basic map stuff can be made with just css, for more complex things -svg, or canvas, if you want it advanced -webgl, but that comes with it's own can of worms (and it's tricky to get it working offline, you'd need to pack everything into strings).
 
  • Like
Reactions: Philip_J_Fry

HiEv

Member
Sep 1, 2017
384
785
Honestly, it sounds like you aren't looking for something that's "HTML-like", but actually just a system to add various UI components to Python.

It would probably help if you simply described exactly what you wanted to achieve with the UI, rather than muddying the waters with vague references to things which include a lot of baggage you apparently don't need.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,957
16,188
I have a concept in mind, a crew management game with hijab-girls. I want to learn to code with Python but RenPy seems too VN-oriented.
It's less VN-oriented than a HTML game would be.


I saw some HTML games with interesting displays/views that could be useful given the gameplay mecanics I want to implement (move on a map with tiles, build a camp, similar features to RTS) while showing the map.
Things that you can do with Ren'Py. There's even a RPGMaker emulator made with Ren'Py. It have been abandoned because too hard to update, but by itself it prove that Ren'Py is limited to VN only because authors want it.
 

Philip_J_Fry

New Member
Aug 20, 2020
6
0
Finally I chose Pygame and to make a desktop game because it seems to be the easiest solution for beginners in Python gamedev.

To be clear, I want to make a menu like the left one in the KeeperRL GUI and make a map using square or hexagonal tiles.

1642990068098.png

Where can I find a tileset for free to test making a map ?