Giter Site home page Giter Site logo

ngn's Issues

Tiles

Versatile tile system

We want to have a lifecycle for the tiles, that means a create, update, render and free for tiles.

We know that tiles are contained within rooms and that they should be created upon creation of a room.

For now the tile is very simple and is a struct purely consisting of TileType:

typedef struct Tile {
	TileType type;
} Tile;

We may need to store the position of the tile, to check for collision. We can also infer from the TileType whether or not the tile has collisions or we can store it on the tile.

Alternatively we can store more of this data on the Entity struct and revolve more around a entity system.

typedef struct Entity {
	Vector2 position;
	Texture2D texture; 
	Texture UV_texture;
        bool can_collide;
} Entity;

typedef struct Tile {
	TileType type;
	Entity e;
} Tile;

This should be stored in it's own file named tile.c / tile.h. similar to the room.h / *.c

Up to you though!

MAP_DATA optimization

reduce complexity of the server information we send through the
network. It can be vastly simplified to just ID and position. This will
allow us to send many more rooms before having to fragment them in the
packet. (from 64 bytes in size down to 12 byts)

refactor build system

We should reconsider the build and probably build most of our code to shared libs and link it together instead

rendering fault when moving

Striping effect when moving;

fault
fault

We think it is a floating point approximation error.
To reproduce just walk around the tiles a bit.

Byte order in networking bytes

At the moment we don't convert from hton and ntoh on any of the numbers in our data.

We might not need to? although there is documented conflict on the byteorder between linux and windows. We can await and see if this becomes a real problem!

If it does, we need to explicitly convert he byte order on network transfer send, and receive.
This will have to be done for each property on any struct which is why i am currently ignoring it. Problem for another time!

refactor network code

goal

  • distribute responsibility
  • isolated imports / headers
  • split server and client code

exit cleanup

We want to send exit / disconnect signal to our server at exit,

we can set up a atexit hook to do this, as well as perhaps handling whether it is unexpected or not

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.