From 354be47619650cd85c1de2a546139c092a88c80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Mon, 1 Feb 2021 21:36:43 +0100 Subject: move pong to new repo Moved to https://github.com/sornas/tihdy_pong using git subtree split -P pong -b pong --- pong/README | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 pong/README (limited to 'pong/README') diff --git a/pong/README b/pong/README deleted file mode 100644 index be718ec..0000000 --- a/pong/README +++ /dev/null @@ -1,37 +0,0 @@ -PONG -==== - -Made for Global Game Jam 2021 at LiU Game Jam's site. - -The language wasn't really ready for a normal game so we wanted to make Pong -(the easiest game we could think of) while fixing what we needed to make it -work. - -Building --------- - -Clone the entire tihdy-repo, cd into the pong-directory and then cargo run. - -Modifying ---------- - -All game logic is located in pong.tdy. Most of the configuration should be -straight forward. If you want to modify the controls, you need to change both -the string passed from pong.tdy as well as the respective function in src/main.rs -(key_down). - -If you want to add more rust functions (for example, to draw text to the screen) -you need to add it like the already existing functions. All functions need a -return type and a return value, even if it is a Type::Void and Value::Nil. (See -e.g. clear for an example.) For a draw_text you probably want to take a -Value::String(s), Value::Float(x), Value::Float(y) and so on. Inside the block -you then write your normal Rusty code. - -After writing your function you also need to link it so you can use it from the -game file. Add it to 'functions' like the other linked functions inside main() -in src/main.rs. - -After linking, the only thing left to do is call it from the game logic. You'll -get a type error if you pass the wrong parameters. Additional parameter -combinations can be set (much like normal function overloading) should you have -the need by adding more "arms" to the extern_function!(). -- cgit v1.2.1