Thursday, September 27, 2012

Bootstrapping the game

Not too much to show since the changes were mostly at the infrastructure level.
  • Fixed a bug with matrix transformation where the View (camera) was double the size it should have been. 
  • Bootstrapped the actual game executable, which more or less just loads the map and displays it with code similar to how the editor runs. However, instead of working directly with the data objects, they are first transformed to models. This should make things easier down the road when implementing moving entities, animation, etc.
  • Modified the texture data to specify a pair of texture coordinates and updated the texture set editor so that these values can be modified. This was necessary for dealing with image sources where the source file has been enlarged such that both dimensions are powers of two, but the image doesn't fill the entire canvas. This will also come in handy for sprite sheets, should I choose to use them.
Anyway, a screenshot of the actual game. Nothing new here, except a temp sprite that represents the player's position.


Sunday, September 23, 2012

View Layers configuration

Abstracted the same class that controls the 'copy layers' configuration for 'view layers'. This lets you toggle what layers to display. There's a similar submenu under 'View' that lets you toggle layers on and off.


I also added a right-click handler to these menu items since re-opening the menu is tedious if you want to toggle several layers.

Tile updates, advanced copy and paste

Because the tile properties were going to get rather busy when introducing horizontal flip / vertical flip / opacity (in addition to texture and color), I created a form for modifying these properties.


I added some temp graphics from Link to the Past to make development a little easier on the eyes. Anyway, this form is pretty self-explanatory, it allows you to change the graphical properties of a tile.

Because an extra form means extra clicks and I wanted to preserve efficiency for basic cases (simple colors, 0/25/50/75/100 opacity, etc), I created a convenient right-click context menu on the texture selector to let you quickly pick and apply properties to the tile instead of opening the form. Currently the 'texture' submenu loads (lazily, at least) all textures, shown below. When the list of textures gets larger, I'm thinking of implementing some sort of 'path' organization to the texture set editor, and that path will drive a submenu structure (for example, Textures -> Outdoor -> Grasses -> Grass 1). For now, the flat list will do.



Since I'm working with layers, I figured it might be convenient if I were to be able to use the 'drag-style' copy and paste to quickly fill an area with, say, grass. The problem is that currently copy-paste (and 'drag', which uses the same paste implementation) was copying all tiles, so if you wanted to change one of your ground layers quickly (say, from dirt to grass), all of the other decorations would get wiped out. To solve this, I implemented the 'Copy Layers' menu, shown below, which toggles individual layers to be considered part of the paste operation for tiles.



I also implemented the display of transparency, horizontal flip, and vertical flip. Added 'custom' to the background and grid color selectors on the view menu.




Friday, September 21, 2012

Modifying the size of a section

Added the ability to resize sections. By default, tiles are added to the right (if you extend the width) and top (if you extend the height). Similarly, shrinking width or height will truncate tiles from this direction. I've added check boxes so that this behavior can be inverted such that the left or bottom is extended/cropped instead.


The resizing is done through the section properties form, which can be accessed through the Section menu.

Sunday, September 16, 2012

Adding some color

Updated the Tile Stack Editor. I realized quickly that the existence of a selected texture was not a good way to differentiate whether or not a Tile on a certain layer existed. So, it's now controlled with a check box next to the name of the layer. Checking the box adds the tile to the stack, unchecking the box removes it and clears the data out.


I also added a color picker next to the texture picker. Once you turn a layer on, the default color is white. Here you can see I've made the bottom tiles red.

Other minor updates:


  • Implemented copy and paste of tile stacks, same as entities
  • Implemented 'drag' copy of tiles, holding Ctrl and dragging a tile copies it as you drag the mouse around.
  • Implemented 'fine control' drag of entities, holding Ctrl while dragging ignores snap-to-grid entirely.



Saturday, September 15, 2012

Entities and other editor options

Entities can be created by clicking the plus icon in the upper left corner.


Similar to Tiles, the entity editor on the right allows you to change the texture of the entity with the same selector. Entities can be moved, resized, and rotated by using the handles directly in the editor. Entities can be duplicated, copied, and pasted.

Entities snap to the grid when moved and resized. The grid can be increased and decreased in size by using the plus and minus keys.

The background color of the editor, as well as the color of the grid, can be changed from the View menu. The File menu has New / Open / Save / Save As.

Introduction

What is this?

Super Obelisk is a game I'm creating. It's partly inspired by the style of older Zelda games--most notably, Link to the Past--but also by the difficulty of games from that era. Ideally, I'd love to play a game with the difficulty of  Demon's Souls but the layout and progression scheme of Zelda games. Since I don't know of any games that satisfy these criteria, I've decided to make it myself.

Who am I?

I am Eric. I love playing and designing games, and I love programming. I plan on using temporary art (from Link to the Past!) for the period of initial development, and eventually working with professional artists to start bringing my game world to life.

What's the story of the game?

I don't have one just yet, but it won't be the focal point of the game. I truly believe in gameplay first--a story should never get in the way of the game. I have half a mind to intentionally leave the story minimal. One of my favorite games of all time, Super Metroid, gives the player about 3 minutes of 'story' at the beginning of the game and proceeds to immerse the player in a beautifully crafted world, creating a notable experience not through plot, but through solid gameplay, memorable locations, and great music.

What technology are you using to create the game?

  • C# for the game engine and tools
  • SlimDX for rendering
  • Lua for scripting (most game logic in is Lua)
  • C# for behavior programming (previously Lua, I've instead adapted a plugin architecture in C#)
  • JSON for serialization of levels and other data
I'll add other technology as needed (I haven't investigated the best tool for audio yet).


So what's with the blog?

I'd like to document the process of creating this game from start to finish. Although I've put a few days of work in already, there's not much there yet, so a single post should be sufficient to bring the documentation up-to-date. So, without further ado, let's start!


So far the code consists of:
  • Four projects. The game, the world editor, the texture set editor, and a utilities project.
  • Map structure is simple a list of Entities and a two-dimensional array of TileStacks
  • A TileStack represents an (x,y) location on the map and consists of a list of Tiles.
  • A Tile has a texture and a layer.
  • An Entity has a position, size, rotation, texture, and layer. Entities represent objects not bound to a particular indexed location and will be used for decorations, moving objects, enemies, items, etc.

Here's the editor when we launch it:


Now we go to File -> New to create a new Section.


The default map configuration is a section of 10x10 tile stacks. As you can see, each of these stacks is empty.

Clicking on one of the tiles while in Tile Selection Mode (top left icon) brings up the tile editor. The tile editor simply shows each layer (pre-defined) and allows us to change the graphic for that particular layer.


From here we can click on a gray box (which represents no tile selected for that layer). This launches a file browser. Selecting an image will set the Texture of that tile, assuming the selected image exists in the Texture Set (managed by the texture set editor).



We can also clear any tile by clicking the 'X' button for any layer.