Skip to content

Instantly share code, notes, and snippets.

@fkaa
Created June 25, 2016 02:21
Show Gist options
  • Save fkaa/f0a68a987408af09e7e967c49c79cf11 to your computer and use it in GitHub Desktop.
Save fkaa/f0a68a987408af09e7e967c49c79cf11 to your computer and use it in GitHub Desktop.
diff --git a/Building.md b/Building.md
index f04bec7..8405bf9 100644
--- a/Building.md
+++ b/Building.md
@@ -14,7 +14,7 @@ Out of these, only `sackit` should require manual building. Here are a few examp
$ apt-get install lua5.1 libenet-dev libsdl2-dev
# OS X
-$ brew install lua, enet, SDL
+$ brew install lua, enet, SDL2
```
### Sackit
@@ -43,26 +43,23 @@ After you have built everything, you can simply copy the `dist/` folder that was
## CMake
This will be the most up to date method of building Iceball. Assuming you've set up the dependencies correctly, building should be as simple as this:
```sh
-# create out-of-tree build
-$ mkdir build && cd build
+# configure (note that only MinGW and MSVC are supported on windows) in
+# out-of-tree build (build/)
+$ cmake -G <generator> . -Bbuild/
-# configure (note that only MinGW and MSVC are supported on windows)
-$ cmake .. -G <generator>
-
-# compile & link
-$ cmake --build .
+# compile
+$ cmake --build build/
```
-
## Makefiles
This is the "old" way of building, and can be a bit cumbersome to use. It is expected that all dependencies are in your path when you use these and it's not uncommon to have a outdated Makefile due to them being manually maintained. To build with Makefiles, simply execute the following in your shell:
```sh
-$ make
# The default Makefile is for linux
+$ make
-$ make -f Makefile.mingw
# MinGW is the only supported toolchain for windows here
+$ make -f Makefile.mingw
-$ make -f Makefile.osx
# OSX has its own as well to handle a few discrepancies
-```
\ No newline at end of file
+$ make -f Makefile.osx
+```
diff --git a/Code-Guidelines.md b/Code-Guidelines.md
new file mode 100644
index 0000000..65db446
--- /dev/null
+++ b/Code-Guidelines.md
@@ -0,0 +1,124 @@
+Iceball is written in both C and Lua, and contributions using either should follow these guidelines. Existing code that does not follow these guidelines should not be re-formatted if the contribution isn't specifically for converting it.
+
+## Lua
+
+**TODO**
+
+## C
+
+### Newlines
+Functions should have the curly brace on a newline, otherwise they should be on the same line
+
+```C
+// good
+void foo()
+{
+
+}
+
+// bad
+void bar() {
+}
+
+// good
+if (a) {
+ foo();
+}
+
+// bad
+if (a)
+{
+ foo();
+}
+```
+
+
+### Whitespace
+Use hard tabs for both indenting and alignment.
+```C
+// good
+void foo()
+{
+ printf("foo");
+}
+
+// bad
+void foo()
+{
+ printf("foo");
+}
+```
+
+Don't rely on any tab size when aligning
+```C
+// good
+foobar(
+ a,
+ b,
+ c
+);
+
+// good
+foobar(
+ a,
+ b,
+ c);
+}
+
+// bad
+foobar(a,
+ b,
+ c);
+```
+
+Generally, operators should have some padding.
+```C
+// good
+int a = (b * c) / 10;
+
+// bad
+int a = (b*c)/10;
+
+// good
+for (int i = 0; i < 10; ++i)
+ printf("%d\n", i);
+
+// bad
+for (int i=0; i<10; ++i)
+ printf("%d\n", i);
+```
+
+`if` and `for` *should* have a separating space between the parenthesis.
+```C
+// good
+if (a)
+ foo();
+
+// bad
+if(a)
+ foo();
+
+// good
+for (int i = 0; i < 10; ++i)
+ printf("%d\n", i);
+
+// bad
+for(int i = 0; i < 10; ++i)
+ printf("%d\n", i);
+
+```
+
+Function calls should *not* have a separating space or padding inside the parenthesis.
+```C
+// good
+foo(a, b, c);
+
+// bad
+foo (a, b, c)
+
+// bad
+foo( a, b, c )
+```
+
+### Globals
+**TODO**
diff --git a/FAQ.md b/FAQ.md
new file mode 100644
index 0000000..d7002e1
--- /dev/null
+++ b/FAQ.md
@@ -0,0 +1,17 @@
+### I found a bug!
+Great! Iceball has a [issue tracker](https://github.com/iamgreaser/iceball/issues) which we use to file bug reports and feature requests. Please try and provide as many details you can on the issue and how the bug can be reproduced.
+
+### I don't like the sounds/graphics/models
+Although not a question, it's said often enough to go here. If you're not satisfied with how some things in Iceball are, don't hesitate to make new versions of them and submit them to us.
+
+### Why don't you use the sounds/graphics/models from Ace of Spades?
+That would be [illegal](http://en.wikipedia.org/wiki/Copyright).
+
+### Can you add an SMG?
+There is already an official mod that adds an SMG. It's located at `pkg/br/smg/`.
+
+### Can you add feature 'X'?
+Feel free to add a feature request to our [issue tracker](https://github.com/iamgreaser/iceball/issues), and be prepared to have a discussion over details. Please check before you submit an issue if there does not already exist one that matches your description.
+
+### Why is the game crashing when I try to connect?
+Check stdout.txt and stderr.txt. It's likely that you have not edited your config file (`clsave/pub/user.json`), and if that's the case, the server will kick you. If you read the config file, you should be able to see the problem.
diff --git a/Frequently-asked-questions.md b/Frequently-asked-questions.md
deleted file mode 100644
index 8ebb2ab..0000000
--- a/Frequently-asked-questions.md
+++ /dev/null
@@ -1,22 +0,0 @@
-Before asking stuff, check if it's already
-
-### I don't like the sounds/graphics/models
-Although not a question, it's said often enough to go here. If you're not satisfied with how some things in Iceball are, feel free to make new versions of them and submit them to us.
-
-### Why don't you use the sounds/graphics/models from Ace of Spades?
-That would be [illegal](http://en.wikipedia.org/wiki/Copyright).
-
-### Can you add an SMG?
-There is already an official mod that adds an SMG. It's located at `pkg/br/smg/`.
-
-### Can you add X?
-Feel free to add a feature request to our [issue tracker](https://github.com/iamgreaser/buldthensnip/issues), but don't be upset if we close it. If you do add it, please first check that it doesn't already exist (look in closed issues too), and write it up clearly.
-
-### X is "broken" (read: not how I want it) - fix it!
-No.
-
-### X is broken, and here's how...
-Thank you for the bug report :+1: – please add it to our [issue tracker](https://github.com/iamgreaser/iceball/issues) so we can deal with it efficiently. :)
-
-### Why is the game crashing when I try to connect?
-Check stdout.txt and stderr.txt. It's likely that you have not edited your config file (`clsave/pub/user.json`), and if that's the case, the server will kick you. If you read the config file, you should be able to see the problem.
\ No newline at end of file
diff --git a/Helping-Out.md b/Helping-Out.md
new file mode 100644
index 0000000..2dec67d
--- /dev/null
+++ b/Helping-Out.md
@@ -0,0 +1,24 @@
+All contributions to Iceball are welcome! This section will provide some information how you can help the Iceball project and some guidelines for contributing.
+
+## Suggestions
+We welcome well thought out and well presented suggestions. If you have some ideas on, say, how to improve building, make a thread on reddit or the forums outlining your suggestions and we can discuss it as a community. If you have an idea for a new game mode, explain how it might work, possible alternatives to certain ideas, and any areas you're unsure about.
+
+Iceball's goal is to be highly moddable and allow people to do whatever they want. Unless your suggestion is "remove mod support", then it's unlikely to be an idea not worth mentioning. Sure, if the idea is something that neither the poster, nor any of the current Iceball contributors, want to implement, then it's unlikely to get done, but that doesn't mean that just because grease dislikes an idea that it should be disregarded.
+
+## Code
+Don't be afraid to dive into Iceball's codebase (Okay, you can be a little afraid). The backend is written in pure C and runs on Windows, Linux and macOS, whilst the frontend (mods) is done in Lua. If you want to contribute code to Iceball, please follow the [Code Guidelines](https://github.com/iamgreaser/iceball/wiki/Code-Guidelines).
+
+## Assets
+All contributions of assets (both new and old) are welcome. Please follow the [Asset Guidelines](https://github.com/iamgreaser/iceball/wiki/How-to-Submit-Assets) for submitting assets to Iceball.
+
+## Mods
+Since Iceball is so mod-focused, making mods is obviously a great way to help. You could also create maps, models, sound effects, etc. either to be included in the base game, in a mod, or just for people to use as custom skins.
+
+## License
+* Iceball is licensed under the regular GNU GPL version 3.
+* Ice Lua Components is licensed under the LGPL version 3.
+* Any of the "Team Sparkle" stuff is available under MIT, including the launcher.
+* All assets are released under Creative Commons 3.0 BY-SA:
+
+## Most importantly...
+Play the game! Iceball was revived because people from another community expressed interest in getting it going again and playing it. Seeing people enjoying something you created is the best motivation for anyone who makes things. Play it, share it, and have fun with it.
diff --git a/Helping-out.md b/Helping-out.md
deleted file mode 100644
index 86e1dd2..0000000
--- a/Helping-out.md
+++ /dev/null
@@ -1,20 +0,0 @@
-All contributions to Iceball are welcome! This section will provide some information how you can help the Iceball project and some guidelines for contributing.
-
-***
-
-## Suggestions
-We welcome well thought out and well presented suggestions. If you have some ideas on, say, how to improve building, make a thread on reddit or the forums outlining your suggestions and we can discuss it as a community. If you have an idea for a new game mode, explain how it might work, possible alternatives to certain ideas, and any areas you're unsure about.
-
-What we don't need is people giving one-line suggestions or proposals for large features, without any thought on the details of such a system. Likewise, saying "we need to make X!" without any plan to actually be a part of that "we" is not helpful, and rather disrespectful towards the people who actually put in the time and effort to make it a reality (and I'm not just talking about Iceball here).
-One other thing that we don't need is people going around saying "that's not what grease would want", or "I don't think that's Iceball's goal".
-
-Iceball's goal is to be highly moddable and allow people to do whatever they want. Unless your suggestion is "remove mod support", then it's unlikely to be an idea not worth mentioning. Sure, if the idea is something that neither the poster, nor any of the current Iceball contributors, want to implement, then it's unlikely to get done, but that doesn't mean that just because grease dislikes an idea that it should be disregarded.
-
-## Core engine
-_**todo**_
-
-## Mods and assets
-Since Iceball is so mod-focused, making mods is obviously a great way to help. You could also create maps, models, sound effects, etc. either to be included in the base game, in a mod, or just for people to use as custom skins.
-
-## Most importantly...
-Play the game! Iceball was revived because people from another community expressed interest in getting it going again and playing it. Seeing people enjoying something you created is the best motivation for anyone who makes things. Play it, share it, and have fun with it.
\ No newline at end of file
diff --git a/Home.md b/Home.md
index a62465d..e0f52ff 100644
--- a/Home.md
+++ b/Home.md
@@ -6,8 +6,6 @@ However, we're not aiming at anything in particular with the base game. It has m
Everyone has different preferences when it comes to what they would like from an AoS-inspired game, so we're giving server owners the power to decide what they want. Isn't choice a great thing? :D
-This is an important point though. Certain people often accuse us of being lazy or condescending when we suggest people "do it themselves", but these people don't seem to understand the intention behind those words. We're saying "we don't feel that this is that important right now", or "we don't feel strong enough about implementing this, but there's nothing stopping someone else from doing it". We don't want to say "no, that's not getting added" just because there are other things that we're busy working on, because the whole point of Iceball is that anyone can do whatever they want with it.
-
Iceball is all about modding, so even if we don't think a particular feature is a high priority, or we don't think something should be in the base game, there's no reason you can't write it and play it on your own server or share it with others.
## Where can i get it?
@@ -15,4 +13,4 @@ To play Iceball you can either grab the source code from the git repository and
:arrow_down: [Windows](http://iceball.sexy/build/iceball-master.zip)
-:arrow_down: OS X – _Coming soon!_
\ No newline at end of file
+:arrow_down: OS X – _Coming soon!_
diff --git a/How-to-Submit-Assets.md b/How-to-Submit-Assets.md
new file mode 100644
index 0000000..0715836
--- /dev/null
+++ b/How-to-Submit-Assets.md
@@ -0,0 +1,22 @@
+To submit an asset to the Iceball project, please open a new issue on our issue tracker (click _Issues_ in the navigation bar above) using the following guidelines, and give it the _asset submission_ tag. While not all submissions may be used, the Iceball team appreciates contributions by others.
+
+### License
+You must have permission to use any assets that you submit. The best way to make sure of this is to make them yourself from scratch. Do not rip assets from other games, films, or other media. Credit may be given in a readme file, but submissions should not require acknowledgement of the creator/creation.
+
+### Models
+Models should try to keep the voxel-count low, using the existing ones as guidelines. Please also try to keep a common design throughout all of the models.
+
+### Sounds
+Sounds should be submitted in uncompressed format, preferably in .wav files. Do not save compressed sounds as uncompressed ones to meet this condition - the damage is already done and converting to an uncompressed format will not fix it.
+
+### Template
+**Title:** summary of submitted assets e.g. `Assets for shotgun` or `Sounds: block place, block break, footsteps`
+
+ * Asset name
+ * link to file
+ * description of asset
+ * Asset name
+ * link to file
+ * description of asset
+
+ (Optional) Other details and such here.
diff --git a/How-to-submit-assets.md b/How-to-submit-assets.md
deleted file mode 100644
index 1dd5522..0000000
--- a/How-to-submit-assets.md
+++ /dev/null
@@ -1,19 +0,0 @@
-Please see [this page](https://github.com/iamgreaser/buldthensnip/wiki/I-can't-code,-but-I-want-to-help) for guidelines on asset creation.
-
-To submit an asset to the Iceball project, please open a new issue on our issue tracker (click _Issues_ in the navigation bar above) using the following template, and give it the _asset submission_ tag. While not all submissions will be used, the Iceball team appreciates contributions by others.
-
-For organisation purposes, please create separate issues for separate groups of assets. For example, make one issue for sounds, and another for graphics, or one issue for one weapon model and all related sounds, and another for a different weapon and all of its sounds.
-
-Please do not host the files on a website that requires you to wait to download, has the download button hidden amongst a sea of advertisements, or that heavily advertises inappropriate content (i.e. pornography). Preferably, all links should be direct ones. Suggested hosts are Dropbox and Mediafire.
-
-### Template
-**Title:** summary of submitted assets e.g. `Assets for shotgun` or `Sounds: block place, block break, footsteps`
-
- * Asset name
- * link to file
- * description of asset
- * Asset name
- * link to file
- * description of asset
-
- (Optional) Other details and such here.
\ No newline at end of file
diff --git a/I-can't-code,-but-I-want-to-help.md b/I-can't-code,-but-I-want-to-help.md
deleted file mode 100644
index c415116..0000000
--- a/I-can't-code,-but-I-want-to-help.md
+++ /dev/null
@@ -1,26 +0,0 @@
-Besides code, there are several other things you can do to help.
-
-# General
-You must have permission to use any assets that you submit. The best way to make sure of this is to make them yourself from scratch. Do not rip assets from other games, films, or other media. Credit may be given in a readme file, but submissions should not require acknowledgement of the creator/creation.
-
-# Models
-If you don't like the current models, you are free to offer alternatives. If you do so, try to keep the voxel-count low, using the existing ones as guidelines. Please also try to keep a common design throughout all of the models.
-
-# Sound Effects
-Remember, you must have permission for all sound effects. Ideally, all sounds should be made by you.
-
-All sounds should be submitted in uncompressed format, preferably in .wav files. Do not save compressed sounds as uncompressed ones to meet this condition - the damage is already done and converting to an uncompressed format will not fix it.
-
-What's needed:
-
-* Gunshot (rifle, other guns may be added in future)
-* Gun reload (rifle, other guns may be added in future)
-* Grenade explosion
-* Digging block
-* Block placement
-* Spade melee hit
-* Footstep(s)
-* Intel pickup/capture/return
-* Win/lose
-* Countdown timer
-* Respawn
\ No newline at end of file
diff --git a/READ-ME-FIRST.md b/READ-ME-FIRST.md
deleted file mode 100644
index b50739e..0000000
--- a/READ-ME-FIRST.md
+++ /dev/null
@@ -1,58 +0,0 @@
-Before asking any questions, read the [full read-me here](https://github.com/iamgreaser/buldthensnip/blob/master/docs/READ_THIS_FIRST.txt).
-
-# For programmers
-Some requests from Grease & the team:
-- Please don't make server launchers (so that there's a minimum barrier of intelligence for entry).
-- Please don't release hacks for this game. While someone who wants to create hacks is unlikely to care that we'd rather they didn't, we hope they can understand our reasons for this. Writing hacks requires a degree of skill, whereas using them does not. Usually people will release them to grow their e-peen, but they don't realise that the people that download their hacks will simply say thanks once then forget about them. As an additional deterrent, go and look at MPGH - you can feel your IQ dropping as you read the posts there.
-
-# For everyone else
-First off, you have to be able to use the command-line. A quick example of the syntax:
-
- command argument argument "argument with spaces in it" argument
-
-To run Iceball, get to the directory you extracted it to using `cd`, then run `iceball` on Windows systems, or `./iceball` on Unix systems (check the docs for the correct arguments). If it crashes, check stderr.txt for errors. If you have any questions, use your preferred search engine.
-
-On Windows, you can run Iceball by using the connect-*.bat file, after setting your username in `clsave/pub/user.json`.
-
-# Controls
-These may change and be outdated, so check the [full read-me](https://github.com/iamgreaser/buldthensnip/blob/master/docs/READ_THIS_FIRST.txt) before asking questions about them! The controls can also be changed in the controls config file.
-
-W A S D = move/strafe
-space = jump
-left ctrl = crouch
-V = sneak
-
-1 2 3 4 scroll = select tool
-arrow keys = select block colour
-R = reload gun
-
-M = show map
-
-T = chat ("talk")
-Y = teamchat
-/ = command
-
-ESC = quit game
-F5 = release mouse cursor
-F1 = show some debug information
-
-TAB = show names / scores
-, = switch teams
-
-Note that there is no weapon select key. This isn't Ace of Jagex.
-
-For each tool, here is what each mouse button does:
-
- 1: Spade: L = break 1 block, R = dig 3 blocks
- 2: Block: L = place a block, R = sample block colour
- 3: Gun: L = shoot, R = zoom
- 4: Grenade: L press = pull the pin, L release = throw
-
-A few notes:
-- If you left-click-dig with the spade, you can get blocks back which you can
- build stuff with later.
-- Holding the grenade longer does not make it travel further.
- If you want that to happen, try jumping.
-- Going to your team's tent ( marked with a + on the map ) allows you to get
- more blocks and grenades.
- - You really should do this instead of just mining through everything.
\ No newline at end of file
diff --git a/test/How-to-Play.md b/test/How-to-Play.md
deleted file mode 100644
index 92ad230..0000000
--- a/test/How-to-Play.md
+++ /dev/null
@@ -1,83 +0,0 @@
-**Note:** Iceball is still in development, so the information on this page may become outdated at any point. If you notice anything that's not quite right, let us know.
-
-## Introduction
-
-This is meant to be a quick guide on the basics of the game. It's not intended to be a comprehensive guide on how to play the game or cover every detail. Also, as Iceball is centred around modding, not everything here will be applicable to every server.
-
-## Configuration
-
-All client config files can be found in the `clsave` directory. There are three main files:
-
- * `config.json` - Engine settings, such as resolution, vsync, volume, etc.
- * `pub/user.json` - User and gameplay related settings, such as username and mouse sensitivity.
- * `pub/controls.json` - Key binds. We're aware that this isn't the easiest thing to edit right now.
-
-## Gameplay
-
-### Basics
-
-You start off with a limited supply of ammo and blocks. Going to your team's tent will restock these, as well as heal you.
-
-![Tent](https://dl.dropboxusercontent.com/u/7298729/iceball/tent.png)
-
-Left-clicking with blocks selected will place a block where you're looking. Right-clicking will change your block colour to that of the block you're looking at.
-
-### Controls
-
-When you join a server, you will automatically be joined to a team with the first gun (generally the rifle). Assuming you haven't changed any of your keybinds:
-
-| Action | Key |
-|---------------------|---------------------|
-| Move | WASD |
-| Jump | Space |
-| Crouch | Left Control |
-| Sneak | V |
-| Fire | Left Click |
-| Alt-fire | Right Click |
-| Reload | R |
-| Change team | Comma |
-| Change weapon | Full stop |
-| Switch held item | 0-9 or Scroll Wheel |
-| Change block colour | Arrows |
-| Chat | T |
-| Team chat | Y |
-| Squad chat | U |
-| Scoreboard | Tab |
-| Map | M |
-| Quit | Escape |
-
-### Gamemodes
-
-There are various gamemodes, some of which may be missing from here, but these are the main ones.
-
-#### Capture the Flag
-
-The goal of CTF is to pick up the enemy intelligence and carry it back to your base. Once one team reaches the score limit (usually 10), they win.
-
-As well as regular CTF, there are a few other variations:
-
-##### 1CTF
-
-This mode only has one intel, which spawns in the middle of the map.
-
-##### R1CTF
-
-This is like 1CTF, except you must take the intel to the enemy base instead of your own. The intel can be considered to be a bomb.
-
-##### Rugby
-
-R1CTF, except with a rugby ball and without guns.
-
-#### Last Team Standing
-
-The goal of LTS is, as you may have guessed, to be the last team left alive. This mode is round-based, so when you die, you don't respawn until the next one. To keep each round a reasonable length, the map border will shrink inwards and instantly kills anyone who gets stuck outside it.
-
-#### Team Deathmatch
-
-The goal of TDM is to kill more enemies than the other team. Once one team reaches the score limit (usually 1000), they win.
-
-### Tips and tricks
-
- * You can bunnyhop by holding jump. To gain speed, hold forward and slowly strafe side to side, moving your mouse in the direction you're strafing. It may take some practice to get the hang of this, but it's a valuable technique for crossing flat ground quickly.
- * Use the right-click block colour select to conceal your tunnel entrances and blend in with the terrain.
- * Different guns are have different strengths and weaknesses. Learn them to give yourself an advantage in combat and avoid putting yourself in dangerous situations.
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment