Skip to content

Commit

Permalink
push commit and start work again
Browse files Browse the repository at this point in the history
  • Loading branch information
GeneralGuy4872 committed Sep 26, 2020
1 parent 1154ceb commit 28fc780
Show file tree
Hide file tree
Showing 188 changed files with 1,866 additions and 100 deletions.
66 changes: 35 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ to have smooth(ish) sailing through to a working alpha!

The game engine uses the
[Irrlicht Engine](http://irrlicht.sourceforge.net/) for rendering 3d
graphics, [Cairo Graphics](https://www.cairographics.org/) for 2d graphics,
graphics, the [Open Dynamics Engine](http://www.ode.org/) for physics,
[Cairo Graphics](https://www.cairographics.org/) for 2d graphics,
[NCurses](https://invisible-island.net/ncurses/) for interactive menus,
`<stdio.h>` for story dialog, and [lua](https://www.lua.org/) for scripting
and a command line.\
Expand Down Expand Up @@ -73,32 +74,35 @@ CODING STYLE
============

occasionally, a type of C coding called "Object Style C" will be used,
which takes the following form:
`namespace$$pseudo_class$$method(pseudo_object,arg,arg,arg...)`
which takes the following form:
`namespace$$pseudo_class$$method(pseudo_object,arg,arg,arg...)`
The order of the method call and the object are just reversed.

functions that in fortran would be called "subroutines" are also used,
and will be denoted by returning an implicit int or the SYSINT macro
(which evaluates to the empty string *(implicit int)* in C and to `int`
in C++)

the types in `<stdint.h>` (or <cstdint>) should be used when an integer
the types in `<stdint.h>` (or `<cstdint>`) should be used when an integer
of a specific width is required, with the exception that `char` should be
prefferred to `int8_t`, and `unsigned char` should be prefferred to
`uint8_t`. if an interger bitfield uses less than the full number of
bytes in an int, then it should be signed; otherwise it should
(*usually*) be unsigned.
bytes in an int, then it should be signed; otherwise it should (*usually*)
be unsigned.

`struct`s should be catagorized into bitpacked structs and loosly-packed
structs. every field of a bitpacked struct should have an explicit width,
and should be of type `signed`, `unsigned`, or `bool`. a loosly-packed
struct should never use explicit-width fields. bitpacked structs should
eventually be replaced with interger bitfields.
struct should never use explicit-width fields; a bitpacked struct should
never contain a type with implementation defined width (i.e. pointers). all
bitpacked structs should be replaced with intergals and manual packing
functions before beta.

sincle-pourpose classes for storing global state, to me at least, seems a
wholly useless concept; this is an interface without an instance. I will
try to implement these as namespaces (either C++ namespaces or using $$ as
described elsewhere), and will attempt to refer to such namespaces as
"daemons" (cf. system daemon) if the interface contains functions.
single-pourpose classes for storing global state should be avoided in
favor of namespaces. these namespaces will be called "daemons" (cf. system
daemon) if they contain functions.

`goto` may be used in place of `break` when the latter looks ambiguous.

since `this` is a reserved word in C++, and `self` is a reserved word in
Objective-C, when using Object-Style-C, the object variable will be named
Expand All @@ -109,24 +113,24 @@ similarly, since `new` is a keyword in C++ with a compleatly different
meaning, an object that is being constructed by a function will be named
`nova`. `input` may be employed as the primary, or only, argument of a
function. `output` will be the return value. `acc` is an **acc**umulator,
and should be a register variable.
and should always (and only) be a register variable.

variables with generic names follow the following conventions:
- `x`, `y`, `z`, and `w` refer to coordinates. `w` isn't used often.
- `i` and `j` are `for`-loop iterators, either in the sense of C++
`::iterator`s or in the sense of intergal counters
- `n` and `m` are generic numbers, usually for-loop intergal counters
- `tmp` is a temporary variable, usually holding an intermidiate value.
- `i` and `j` are `for`-loop iterators, either a C++ `::iterator` or an
intergal counter
- `n` and `m` are generic numbers, usually `for`-loop intergal counters
- `tmp` is a temporary variable, usually holding an intermidiate value or
a local copy of a shared resource.
- `T` is a type in a template
- `L` is a lua engine
- `data` is the main data member of an object

a naming system similar to
[Systems Hungarian](https://en.wikipedia.org/wiki/Hungarian_notation)
is revived for the pourpose of manually mangling C functions that can
take multiple argument types, as this allows such functions to maintain C
linkage while also having faux overloads. this is similar to functions in
the C standard library such as `abs()` and `fabs()`.
some library functions use a naming system similar to the standard library
to denote the type of argument that they take (c.f. `man abs`, `man fabs`,
[Systems Hungarian](https://en.wikipedia.org/wiki/Hungarian_notation)). the
libraries that do this are written in C, and do not use operator
overloading.

FILENAMES
=========
Expand Down Expand Up @@ -199,6 +203,10 @@ modularly independant of the project, but which are being published for the
first time as part of the project, at a later date under a less restrictive
liscense.

Additionally, there are some files in the project that are offered under
the terms of the license that applies to the toutorials that I used to
create their initial contents.

*note: I originally intended to liscense the project under the GPLv3, and
some parts of the source code archive have comments to this intent; I have
since chosen to commit to the GPLv2 "or later" because of various potential
Expand All @@ -209,10 +217,6 @@ signifigant disdain for legal trolls suppressing the advancement of
knowladge, and I personally believe this liscense to be the best way of
preventing such from happening in my relm of works.***

---

\**note: as I've been learning, one of the things I've been teaching myself
has also been the git system; as a result, instead of branching the repo
at two specific "flag day" points of development, I *forked* it instead.
Mistakes were made. If you want to see these relics (you really don't),
I will leave them as-is.*
(even minimalizing the number of dependancies as I have, the license
propogation portion of my project has been extreamly time-consuming and
stressful)
9 changes: 9 additions & 0 deletions chunk_layout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CHUNK LAYOUT
============

randomly generated chunks must be packed into a cuboid area; this creates
problems as the game's world is sphereical. since I have no dillusions that
the graphics of the game will be stellar, this issue will be solved by
creating hard seams between areas, eleminating the projection issues
entirely. these will slightly resembal a similar cop-out that will be
employed to avoid rendering overlapping chunks.
14 changes: 8 additions & 6 deletions fantasy/avianinn.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Hello, traveler!
you are welcome to stay in our village,
so long as you bare us no ill will.
Hello, traveler! You are welcome to stay in our village, so long as you bare us no ill will.Rooms are 3 ore chunksm a night.Hmm? What's this made of? Electrum? Why would I want that?Thanks! Your room is the first one on the right[[m.*They hand you a key with the number 1 on it*Thanks! Your room is the second one on the right.*They hand you a key with the number 2 on it*Thanks! Your room is the third one on the right.*They hand you a key with the number 3 on it*Thanks! Your room is the last one on the right.*They hand you a key with the number 4 on it*Thanks! Your room is the first one on the left.*They hand you a key with the number 5 on it*Thanks! Your room is the second one on the left.*They hand you a key with the number 6 on it*Thanks! Your room is the third one on the left.*They hand you a key with the number 7 on it*Thanks! Your room is the last one on the left.*They hand you a key with the number 8 on it*Come again!

Comments:
The script that calls this file will randomly choose a room for the player,
and recall the lines accordingly. The Sirens have no currency, and have an
abundant supply of precious metals, which forces the player to barter
various common items from elsewhere in the game's world for goods and
services.

hmm? what's this made of? silver? gold?
why would I need want that?
rooms are 3 ore a night.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions src/alpha/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
- Redo chunk renderer (*AGAIN*)
- cache all 26 border chunk addresses
- colliding with an edge that connects to address 0 deals void damage
and imparts a force of 10 gees on the player in a direction
perpindicular to the interface (handled by the function that
re-alignes the global coordinate system when chunk boundries are
crossed)
- store chunk priority in case of two chunks being rendered in the same
space
- the interface to the chunk that is not rendered is is blocked by a
flat quad with an opaque ripple texture
- priority is only relevant between chunks with the same taxicab norm
from octant 0
- a negative priority chunk is a room boundry, and uses a different
ripple texture. the chunk is never loaded, and crossing the boundry
causes a hard reload of all world-related engine state.
File renamed without changes.
4 changes: 3 additions & 1 deletion src/working/main.cc → src/alpha/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ std::atomic_int EXELINE[THREADCOUNT];

/***CUSTOM CLASSES***/

#define DRAG(P,U,C,A) (.5 * P * (U * U) * C * A)

namespace iwf { namespace datatypes {
class camcoord {
public:
Expand All @@ -83,7 +85,7 @@ class camcoord {
return tmp;
}};
}}

namespace irrcontext {
irr::IrrlichtDevice * device;
irr::video::IVideoDriver * driver;
Expand Down
Loading

0 comments on commit 28fc780

Please sign in to comment.