Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - xee

Pages: [1]
1
Programming / Github, bitbucket etc.
« on: July 11, 2012, 02:18:31 PM »
Does anyone use such sites?  From what I gather they're basically sites you post your code to and allow others to view, make changes, suggestions etc. to your code?  Are there downsides to using such sites or is it better to just slap your stuff onto your own blog site and call it a day?  ;D  Thanks for any info!

2
Programming / Newbie programming Q's
« on: June 17, 2012, 02:23:32 PM »
Hey guys, I'm excited to have stumbled upon these forums!  I decided a couple months ago to take up a programming language (windows assembly) and to keep things interesting I started working on a rogue variant from the very beginning to help me learn.  I have a couple questions though:

How do you keep track of everything in the game, do you keep everything in seperate tables?  For instance my tables looks like this right now:

2 columns, each field DWORD in size:

Main table:
# mobs, pStruct (pointer to a table of existing structures)
X|Y, pChar (pointer to a char sheet of X,Y)
X|Y, pChar (pointer to a char sheet of X,Y)
X|Y, pChar (pointer to a char sheet of X,Y)
...
...
etc.

pStruct:
# structures, Reserved
RoomX|RoomY,RoomW|RoomH  (each are WORD size)
Wall_X|Wall_Y,pChar pointer (pointer to char sheet of wall)
Wall_X|Wall_Y,pChar pointer (pointer to char sheet of wall)
Wall_X|Wall_Y,pChar pointer (pointer to char sheet of wall)
...
etc.

pChar: 1 column, DWORD in size
pointer to name/race id
symbol
color
MobID - unique id# for this mob (word size each: # area it belongs to|# obtained from a loop counter)
STR|INT|DEX|CON  (1 byte each)
HP|CURRHP  (word size each)
status code - 0:dead, 1:normal, 2:in_combat, 3:fatality
weapon/armor/item codes
pointer to personal memory->
  DWORD == # steps to an encounter/item/etc
  DWORD == pointer to char sheet of encounter/item/etc.


(if pChar was for an item/structure instead of a mob, fields other than nameptr, symbol and color would have different meanings)

Is this a good approach to have every mob and item in the game to have their own personal record/character sheet?  Should I be concerned how much memory I'll be taking up?

Also after a lot of head banging and hair pulling I finally have my collision detection an pursuit code up and running somewhat, just wondering though are there standard algorithms for such things?

Also is there a standard database of monsters/items for roguelikes I could use as well?

Thanks for any info!

Pages: [1]