Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 20 May 2009
Offline Last Active Sep 11 2015 04:10 PM

Posts I've Made

In Topic: Draw simple stars like in galaga

06 May 2015 - 06:41 PM

Personally I would take the easy way and just use regular sprites (alpha blended texture-mapped quads). With a simple batching technique, there should be no need to optimize further, even when drawing many thousands of small sprites per frame.

In Topic: Best engine for developing a 2D roguelike

06 May 2015 - 03:51 PM

Have you looked through the rogue basin articles (http://www.roguebasin.com/index.php?title=Articles) yet?  There are quite a few tutorial/articles for writing an RL in various languages, such as C#: http://www.roguebasin.com/index.php?title=C_Sharp


I've never used those libraries (except for libtcod mentioned above many years ago), but I did roll my own using OpenTK as the rendering backend, using the aforementioned libtcode as an API inspiration.  An older version of my lib can be found here if you're interested (at least until Google Code goes away): https://code.google.com/p/sharprl/.


Note that all of this assumes you are going for a more "old school" roguelike (ASCII or simple tile art, etc.).

In Topic: Searching for life simulation communities

24 February 2015 - 07:35 PM

Academic artificial life projects tend to be rather niche and based around studying/simulating specific aspects of biology, ecology, etc. Most of them incorporate some sort of evolutionary process and multiple agents. That said, starting at the "alife" page on Wikipedia might point you to some resources.

I'm not familiar with Creatures, but briefly skimming the link reminded me somewhat of Framsticks, which uses neural networks to simulate agents.

In Topic: How to create a typical "Dungeon Master" type of game?

08 August 2014 - 08:13 PM

For the map structure, it can be the same as a typical top-down maze or dungeon game (similar to a rougelike game). Each map cell represents a feature (open space, wall, well, chest, etc.), like each square on a piece of graph paper.


Some old school games represented walls as divisions between cells (the lines between squares on graph paper), so you can have thin walls separating two cells.  This is a bit harder to implement, and it doesn't look like the linked video uses this method.


There are basically 2 ways to go about drawing this, the truly old school way and to fake it using modern techniques.


For the old school approach, each feature (wall, door, chest) that appears at a certain location in the player's view needs is pre drawn on a sprite sheet.  Perspective needs to be baked into the assets.  It gets a bit complicated working out the walls in particular, probably need to work it out on piece of graph paper.  Here is an example "template" where the player is at * and looking north, each number/letter is a wall cell in the player's field of view:


When drawing a view, you will need to take the player location and facing direction and build a list of walls and features in the view, then draw them in the order of the template.  You will also need to have a static list of coordinates to know what and where to draw each wall sprite, depending on where it is in the player's view.  As a made up example:




This might mean that if wall "A" needs to be drawn, copy a rectangular region from the sprite sheet at  position 100,50, size 80,160 to screen position 0,20.  Drawing them in order (1,2,... D, E) and using transparency on the sprites allows use of the painter's algorithm.


This works fine but is a bit tedious to implement (especially creating the wall sprites and getting them to line up in a pleasing way).  That said, I've implemented such system a couple times and had fun doing it.


The other approach, which can be easier to implement (depending on your skill set) and much more extendable, is to fake it using 3D triangles.  Going this route means you just need to have a texture for the walls.  Field of view, lighting, animating movement and turning, fog - all these things are massively easier to add or tweak if using modern techniques.

In Topic: Text rendering - Minification?

14 January 2014 - 10:06 AM

I don't have the complete code base in front of me, but I believe these are the settings that worked fine for my rendering implementation (likely I was using texture clamping).  That said, the exact settings depend on the rendering methods used.