A client for poppy
Go to file
Pascal Abresch 83f17a519d update server 2022-06-25 11:26:13 +02:00
lua add disconnect button 2022-06-24 21:35:13 +02:00
ressources add server image 2022-06-19 12:41:55 +02:00
server@3447cbeba9 update server 2022-06-25 11:26:13 +02:00
textures Add main menu 2022-06-24 19:55:24 +02:00
.gitignore add fonts/ to ignore 2021-11-11 21:22:45 +01:00
.gitmodules add server 2021-12-31 23:02:13 +01:00
FixMime Add Script to fix MIME types 2022-02-09 20:26:47 +01:00
License add license 2022-01-04 20:12:02 +01:00
Readme.md update readme 2022-06-19 12:41:55 +02:00
conf.lua Reset minimum size 2021-11-28 09:54:22 +01:00
main.lua New main loop and protocol version 2022-06-19 12:44:17 +02:00
run update server 2022-06-25 11:26:13 +02:00

Readme.md

Poppy 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.
(per default the client will connect to this server, it is currently a hardcoded constant in lua/networkThread.lua :/ )\

The performance is currently not so great on older computers,
I have not investigated this much yet. Safe to say it is not intended to run so badly :)

Implementation status

Implemented

  • Loading textures

  • drawing on canvases

  • physics calculation for collison and movement

  • drawing physics collisions (on the physics layer)

  • Basic networking

    • Get clientID
    • Draw all players
    • sync physics state
    • Send/Receive drawn stuff
    • Send disconnect on client quit
    • Send disconnect on client error
    • Chat support
  • Drawing

    • Draw with custom color
    • Re-do base textures as gray scale to color in arbitrarily

Not implemented (rough goals anyhow)

  • UI to connect to specific server

  • Reconnect to server

  • connect to other server during a session

    • Open second window? Open second instance instead? (does love2d allow that?)
  • Saving the game (server stuff?)

  • Loading the game/map (server stuff?)

  • confirmation before clearing canvas (that's quite destructive :D)

    • Make a way to add dialogs and stuff
  • Drawing

    • drawing preview (shows the grid directly, also gives feedback to the user for selected block)
    • 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
  • Advanced physics

    • Each pixel gets a physics vector associated, each hit pixel gets the vector added 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.
  • Programming layer

    • 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.
    • figure out if this is supposed to run on the server client or both (probably predicted?)
  • Networking support

    • Figure out why and how physics is tied to framerate, why does jump height differ?
    • Implement initial state sync (mainly server work)
    • 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

Running the game as a development version

Windows

  1. Download the game engine from https://love2d.org/
  • Pick the installer if you want to install it, or the zip to run it directly
  1. Clone the game via git
  2. Run love2d pointed to the checkout (love.exe path\to\checkout)

Haiku

  1. Install the engine
    • On 32bit: pkgman install cmd:love_x86
    • On 64bit: pkgman install cmd:love
  2. Clone the game via git
  3. Run love(_x86) path/to/checkout

Packaging the game

Create a .love archive

  1. Copy any font you want to bundle to fonts/font.ttf (This cannot be bundled as a symlink)
  2. Zip the files
    • If you bundle a font: zip -r Poppy main.lua conf.lua lua/ textures/ fonts/
    • If you don't bundle a font: zip -r Poppy main.lua conf.lua lua/ textures/

Package for windows

  1. Download the love2d distribution from http://love2d.org/ (For example https://github.com/love2d/love/releases/download/11.4/love-11.4-win64.zip)
  2. unpack the distribution
  3. add the Poppy.zip from the previous step to the love2d executable
    • copy /b love.exe+Poppy.zip Poppy.exe
  4. (add license info for poppy?)
  5. Repack the distribution archive

Package for HaikuHaiku

  1. mv Poppy.zip Poppy
  2. 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() 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)