kts
|
d42b12885f
|
Added a load module state that provides a button list of modules found in the ../modules directory. When clicking on one, it will attempt to load ../modules/MODULE_NAME/MODULE_NAME.tsd into struct Data* g_tile_data. If it succeeds, it switches to a test state where I will be tweaking stuff like tile movement and similar. I will also add spritesheet loading in the load module state.
|
2014-03-11 23:56:23 -07:00 |
kts
|
9b5a1ed4b3
|
Added rendering code for sprite and fonts, made a pretty bad high precision timer - while being higher precision than SDL_GetTicks, it has a few problems that I must sort out. Also need to make it crossplatform.
|
2014-02-25 02:45:10 -08:00 |
kts
|
b3f50776e8
|
Lots of stuff added since last commit. ASCII-based Font system and Element system(similar to tile_editor)s now partially in place. State management now more flushed out, but still likely to be tweaked. Now sports two renderers - software-mode SDL and hardware-accelerated OpenGL mode. At the moment code is not in place to switch between the two renderers in-program (managed by a call to interfaceSetRenderer), but it will be added later with the appropriate freeing of surfaces and textures. A more generalized binary to .c/.h program was added to the new tools subdirectory - it takes a binary file as an argument and creates the appropriate .c/.h files. It also can handle the append flag, -a.
|
2014-02-22 00:20:44 -08:00 |
kts
|
ae5cbb9b4e
|
Tile editor becoming more functional. Set and id input now use the SpinnerElement type that only takes numerical input, increments or decrements via up/down keys, and runs its callback after any change. Currently loaded set's spritesheet shows in the right-hand side of the screen, resizing the screen accordingly. This spritesheet preview will be used as a way to load tile data visually rather than via tile ids.
|
2014-01-15 00:30:13 -08:00 |
kts
|
df13ab259f
|
added pack_tiles.c, providing pack_tiles, a program that takes a directory as an argument and creates a new file (directory/directory.tsd) from cleaned files 'doors', 'floors', 'npcs', 'walls', 'equips', 'items', and 'players' in that directory. At the moment it can be used on the xibalba directory to create 'xibalba/xibalba.tsd', which can then be tested with test/t2d.c, providing the internal filename referenced is changed. At the moment the Data system does not properly deal with inventories so any inventory/equipment declaration is ignored.
|
2013-12-21 02:39:56 -08:00 |
kts
|
c7f3ac15d3
|
added pack_tiles.c, providing pack_tiles, a program that takes a directory as an argument and creates a new file (directory/directory.tsd) from cleaned files 'doors', 'floors', 'npcs', 'walls', 'equips', 'items', and 'players' in that directory. At the moment it can be used on the xibalba directory to create 'xibalba/xibalba.tsd', which can then be tested with test/t2d.c, providing the internal filename referenced is changed. At the moment the Data system does not properly deal with inventories so any inventory/equipment declaration is ignored.
|
2013-12-21 02:38:08 -08:00 |
kts
|
e2e015c76b
|
Added two folders: test/ and xibalba/. Contained within test/ are two test/devel-beds for two systems that will be integrated within ts. The first is script.c, which is the development program for the interpreter system - this interpreter system allows for the setting of variables (both local and global), the creation of new functions, and the definition of default in-game functions such as dice rolling and the like. The second file, t2d.c functions as a basic test utility for Tile Data loading and the like - it interprets a tileset/tile definition file into Data, TileDataSet, and TileData(s) respectively. These structs, as defined in data.c/.h, allow for reference to tiles by TID:ID or simply by name through the use of key=>value pairs. It is from these structs and their accompanying access functions that new Tiles will be created (perhaps later optimized through a basic Tile array that contains semi-populated Tile(s) that can be memcpy'd similar to the current system). Also added the xibalba/ sub-dir that will contain the various data for Xibalba (tile definitions, graphics, map creation, etc.), moving majority of what is in tiles/ into xibalba/.
|
2013-12-17 17:08:37 -08:00 |
kts
|
ef59c0a365
|
Equipping and unequipping items now fully implemented. Uses the player's slots and used_slots properties along with the target item's required slots property. used_slots+required_slots are checked against slots and if less than, used_slots is changed accordingly. Unequipping removes required_slots from used_slots. equipmentContext added for equipping/unequipping as well. interface/sdl.c changed so that the focused UI (being either inventory or equipment) is at a higher opacity than the unfocused UI.
|
2013-11-26 16:02:04 -08:00 |
kts
|
d50282effa
|
We now have a mostly working inventory system. Items can be picked up via ` and dropped using ` within the inventory. Currently using a new playerPickup() function, but it should be abstracted to a tilePickup(struct Tile *tile) function so that npcs, etc., can share in the fun.
|
2013-11-16 04:41:06 -08:00 |
kts
|
d7ad2c3bd6
|
Added uiInit(), a function that creates ui_hotbar_surface, blits the appropriate ui.png sprites to it, then sets the opacity to 0.75. At the moment, ui.png must be in RGBA format due to my lack of knowledge on alpha blending, etc. - this shall be changed later for optimization. Added the SDL_SetOpacity(SDL_Surface *surface, double opacity) function that sets the alpha layer of the target surface to the desired amount. Along with this is the uiSetOpacity helper, which simply calls SDL_SetOpacity on ui_hotbar_surface. Also added uiSetScale which simply calls interfaceScaleSurface(SDL_Surface *surface, float x, float y) on ui_hotbar_surface. interfaceScaleSurface does a rough up/down-scale of the target surface - has not been thoroughly tested for bugs, so it has the potential to break.
|
2013-11-12 02:41:32 -08:00 |
kts
|
7bc43929e0
|
Added much code for the foundation of the netcode. Server automatically starts on port 31337 and runs as a separate thread in the SDL client. This TCP server functions as a basic echo server and can be connected to thru telnet or by typing 'connect 127.0.0.1 31337' in timesynk's console. Once connected, the echo functionality can be tested by using console command 'send my message goes here'. Somewhat buggy and crashses on occasion - suspected cause is consoleLog()ing a string that is not properly nul terminated, resulting in reading memory out of bounds. Curses client does not run the server properly at the moment, probably due to using select on server, clients, and stdin when combined with ncurses - will look into this later.
|
2013-11-06 23:40:19 -08:00 |
kts
|
5edcc76a86
|
interfacePrint is no longer directly called in non-interface contexts, but rather is handled by a messaging system. When one tile wishes to tell another tile a message, whether that be for descriptive purposes such as opening a door or otherwise, messageTile(Tile *sender, Tile *recipient, const char *message) is called. Within that, if the recipient->tid is PLAYER, then it calls interfacePrint. This will later be modified to check if the recipient->data->controller matches the actual user's controller (thus tying messages to particular users only). Also added was the basic struct for controller, but it is thus far unused in actual game code. The Controller will be used once a basic network/game structure is in order.
|
2013-11-03 22:53:13 -08:00 |
kts
|
29cdd11ec8
|
Added basic NPC/monster functionality as well as a console system. Simply call ConsoleLog(&string) and it'll create a new ConsoleEntry, set the console_last_entry's next to it, set the new entry's prev to console_last_entry, and finally set console_last_entry to point to the new entry (functions very similarly to Tile Chains). This may later be changed to an array form so as to easily pull sections of the log from anywhere.
|
2013-10-19 22:56:46 -07:00 |
kts
|
4c204db4f3
|
Added support for doors. A DoorTile is a fairly basic tile - at the moment - sporting a state int to specify its current state via STATE_OPEN, STATE_CLOSED, STATE_BROKEN, or STATE_MISSING. Graphically/ascii-ly, the proper visual appearance is acquired by multiplying the door id by the total door states(4) and adding the current state value to the result. For example, for a door with the id of 0, you would have visual tile 0 for closed, 1 for open, 2 for broken, and 3 for missing. Beyond the doors, the curses tiles were moved from interface/curses.(c/h) to tiles/curses_tiles.(c/h) - they should, at some point, be generated in a similar manner to the tiles for the SDL client (using pack_tiles).
|
2013-10-17 15:11:29 -07:00 |
kts
|
33ab0f2af2
|
Renamed binary_to_c to pack_tiles and made it convert tiles/*.png to various char arrays in tiles/tiles.c and tiles/tiles.h. Added fully functional graphical tiles to the SDL client by using the tile's id and tid to point to the appropriate arrays in tiles.c/tiles.h. Also added proper displaying of multiple tiles on a tile chain, tile movement via gameMoveTile, tile line drawing via drawLine, along with other touch-ups
|
2013-10-15 18:54:23 -07:00 |
kts
|
5c7cc7d267
|
Changed how the map is dynamically allocated, thus fixing the SDL client as well as the default client on non-powerpc architectures. Added a current_context function pointer that is called by the interface and governs how events/keypresses are handled in different contexts, such as walking or looking.
|
2013-10-10 01:55:18 -07:00 |
kts
|
e1a32045cf
|
Added a ton of stuff, SDL compile is broken, probably due to malloc issues. Must check over code in different environments.
|
2013-10-08 21:49:38 -07:00 |
kts
|
2d7a45e0b5
|
Map now resides on a multidimensional array titled map_matrix. This stores the Tiles in a Stack structure at each cell - I believe this should instead be changed so that each Tile instead has pointers to the previous and next Tiles, so that the map_matrix only holds Tile pointers rather than Stack structs containing some variable amount of Tile pointers. Also added a visible_matrix that denotes what tiles are visible to the player. This is simply a multi-dimensional array of ints that act as bit fields for various flags (such as TILE_VISIBLE, TILE_CAN_SEE, TILE_LIGHT_ONE, TILE_LIGHT_TWO, etc. - multiple light flags can be concatted to provide a broad array of light levels).
|
2013-09-28 20:50:52 -07:00 |
kts
|
1f973fc865
|
Added basic player movement through playerMove(direction, distance). Also added an interface through which player commands are attached to a command id, so as to allow for functions to be called via a command id or, if later implemented, a string. Finally, implemented the moving of an @ in curses or a square in SDL via the arrow keys.
|
2013-09-19 22:45:19 -07:00 |
kts
|
0c5dc4c822
|
Initial commit, contains a barebones structure with the interface for both (x)curses and SDL. Can be built via the Makefile or via the XCode project in the xcode/ subdirectory
|
2013-09-17 22:37:36 -07:00 |