poppy-client/Readme.md

143 lines
5.5 KiB
Markdown
Raw Permalink Normal View History

2022-02-09 19:45:42 +00:00
![Poppy](/ressources/Poppy.svg)
This is the Poppy game\
A server is required to play the game, if you do not have one running then\
run ```love .``` in the ```server/``` directory for a local one for now.\
The performance is currently not so great on older computers,\
2021-11-28 13:34:44 +00:00
I have not investigated this much yet. Safe to say it is not intended to run so badly :)
2021-11-28 13:36:22 +00:00
# Implementation status
2021-11-28 13:34:44 +00:00
2021-11-28 13:36:22 +00:00
## Implemented
2022-06-19 10:30:55 +00:00
* Loading textures
* drawing on canvases
2022-01-04 12:39:17 +00:00
* physics calculation for collison and movement
2022-07-03 17:59:52 +00:00
* drawing physics collisions (on the physics layer) (debug)
2022-01-04 12:39:17 +00:00
* Basic networking
* Get clientID
* Draw all players
* sync physics state
2022-06-19 10:30:55 +00:00
* Send/Receive drawn stuff
2022-02-09 19:45:42 +00:00
* Send disconnect on client quit
2022-06-19 10:30:55 +00:00
* Send disconnect on client error
* Chat support
2021-11-28 13:34:44 +00:00
2022-07-03 17:59:52 +00:00
* Retrieve initial game state (partial)
* Get users name
* Get users avatar
* Get world size
2022-06-19 10:30:55 +00:00
* Drawing
* Draw with custom color
* Re-do base textures as gray scale to color in arbitrarily
2022-07-03 17:59:52 +00:00
* UI
* UI to connect to specific server
* Reconnect to server
* connect to other server during a session
2021-11-28 13:36:22 +00:00
## Not implemented (rough goals anyhow)
2022-07-03 17:59:52 +00:00
* Remember visited servers (save the list)
* Add new servers to the list by user input
* Add new servers at runtime via DNS-SD mDNS discovery
* Saving the map
* Loading the map from disk (and send it to the server)
* Loading the map from server on connect
2021-11-28 13:34:44 +00:00
* confirmation before clearing canvas (that's quite destructive :D)
2021-11-28 18:01:53 +00:00
* Make a way to add dialogs and stuff
2022-06-19 10:30:55 +00:00
2021-11-28 13:34:44 +00:00
* Drawing
2022-01-04 12:39:17 +00:00
* drawing preview (shows the grid directly, also gives feedback to the user for selected block)
2021-11-28 18:01:53 +00:00
* Draw with colors custom stencils
* Define stencils based on drawn stuff on the canvas
* Allow the textures to be scaled up before placing
* Have a preview of where textures will be placed
* Have a way to move the grid by pixel increments
2022-06-19 10:30:55 +00:00
2021-11-28 13:34:44 +00:00
* Advanced physics
2021-11-28 18:01:53 +00:00
* Each pixel gets a physics vector associated, each hit pixel gets the vector added
2021-11-28 13:34:44 +00:00
to a "positon" vector, which can be added as a diff to the player
This can replace the gravity code directly, and allow stuff to push players around
in addition to simply blocking them like the current physics does.
2022-06-19 10:30:55 +00:00
2021-11-28 13:34:44 +00:00
* Programming layer
2021-11-28 18:01:53 +00:00
* Basically: Have a set of colors/programms, each of those has a single code run
Associated with it, the programms/colors can then be drawn on a dedicated canvas
each area that is connected is treated as one instance of the programm.
The programm instances can alter the world within their bounds, but not outside it
The programm instances can send messages between to other instances that are immidiently
adjecent, and react to messages accordingly.
Each instance can send messages to a specifc color/programm type, but not differenciate
between instances, if area RED has two GREEN instances adjacent and sends a message to GREEN
it will be delivered to both GREEn instances.
* Figure out how to render this differently for color blindness
* Designing DSL for programming layer
* Group connected areas for programm instance
* Define colors for use in programming layer
* Build a map of all instances and their allowed communication partners.
2022-01-04 12:39:17 +00:00
* figure out if this is supposed to run on the server client or both (probably predicted?)
2022-06-19 10:30:55 +00:00
2021-11-28 13:34:44 +00:00
* Networking support
2021-11-28 18:01:53 +00:00
* Figure out why and how physics is tied to framerate, why does jump height differ?
2022-07-03 17:59:52 +00:00
* Implement initial state sync
* Server remembers plays last position and tells you
* Server remembers drawn stuff and tells you
2022-01-04 12:39:17 +00:00
* Add ack que, resend lost packets (but only for stuff like drawing and such, movement may drop)
* Tell the user if the server doesn't support the networking version requested
2021-11-28 13:34:44 +00:00
2021-11-28 13:36:22 +00:00
# Running the game as a development version
2021-11-28 13:34:44 +00:00
2021-11-28 13:36:22 +00:00
## Windows
2021-11-28 13:34:44 +00:00
1. Download the game engine from https://love2d.org/
2021-11-28 17:58:57 +00:00
* Pick the installer if you want to install it, or the zip to run it directly
2021-11-28 13:34:44 +00:00
2. Clone the game via git
3. Run love2d pointed to the checkout (love.exe path\to\checkout)
2021-11-28 13:36:22 +00:00
## Haiku
2021-11-28 13:34:44 +00:00
1. Install the engine
2021-11-28 18:01:53 +00:00
* On 32bit: pkgman install cmd:love_x86
* On 64bit: pkgman install cmd:love
2021-11-28 13:34:44 +00:00
2. Clone the game via git
3. Run ```love(_x86) path/to/checkout```
2022-06-19 10:30:55 +00:00
# Packaging the game
## Create a .love archive
2021-11-28 13:34:44 +00:00
1. Copy any font you want to bundle to fonts/font.ttf (This cannot be bundled as a symlink)
2. Zip the files
2021-11-28 18:01:53 +00:00
* If you bundle a font:
2021-11-28 13:34:44 +00:00
```zip -r Poppy main.lua conf.lua lua/ textures/ fonts/```
2021-11-28 18:01:53 +00:00
* If you don't bundle a font:
2021-11-28 13:34:44 +00:00
```zip -r Poppy main.lua conf.lua lua/ textures/```
2022-06-19 10:30:55 +00:00
## Package for windows
4. Download the love2d distribution from http://love2d.org/
(For example https://github.com/love2d/love/releases/download/11.4/love-11.4-win64.zip)
5. unpack the distribution
6. add the Poppy.zip from the previous step to the love2d executable
* copy /b love.exe+Poppy.zip Poppy.exe
7. (add license info for poppy?)
8. Repack the distribution archive
## Package for HaikuHaiku
3. ```mv Poppy.zip Poppy```
2021-11-28 13:34:44 +00:00
4. If you did not change the icon Run ```resattr -O -o Poppy ressources/Poppy.rsrc```
If you changed the Icon:
1. Export the Icon from Poppy.iom to Poppy.rdef as HVIF RDEF
2. Change resource(<your resource id here>) to resource(1, "BEOS:ICON")
3. Add "resource(2, "BEOS:TYPE") #'MIMS' "application/x-love-game";" to the file
4. Run ```rc -o Poppy.rsrc Poppy.rdef``` (This will compile the ressource file)
5. Run ```resattr -O -o Poppy ressources/Poppy.rsrc```
Now the game can be run with "love(_x86) path/to/archive"
(I have a WIP patch to make this work easily with "open path/to/archive"
or double clicking in Tracker, but it is not finished yet, or merged)
TODO: how to create a .hpkg
(notes: how to add .Packageinfo? add this to the repo? syntax for package command
explain how to create the DeskBar entry to the archive)