Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old July 4, 2009, 09:48   #1
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
Thornwind Progress

Well, things are actually moving on nicely so far. I have it in C#, the display and input is separate from the core game, and the whole thing is event driven. Any ideas for a good place to host the code so others can look at it easily?

So far all I can do is run around a pre-generated map, I'll add collision detection tomorrow, its a bit late and I'm getting sleepy, but it will be easy to do.

Screenshot included.

Current Issues: Screen flickers when moving (double buffer? or maybe add a boolean to repaint only if something changed). Also screen doesn't show up immediately until a key is pressed, this is due to the events I think... I bet if I push a "REPAINT" event to the game core it will display immediately.
Attached Thumbnails
Click image for larger version

Name:	thorn_1.jpg
Views:	180
Size:	19.5 KB
ID:	233  
Sirridan is offline   Reply With Quote
Old July 4, 2009, 23:41   #2
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
Flicker is fixed. I had it working where it displayed initially, but now it doesn't, oh well. That's a very minor issue I'll figure out later, now I'm working on collission detection.
Sirridan is offline   Reply With Quote
Old July 4, 2009, 23:52   #3
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
Collision detection added, anyone interested in the source or the .exe?
Sirridan is offline   Reply With Quote
Old July 5, 2009, 02:41   #4
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
Added a monster, and it chases me! AAAAH!
Sirridan is offline   Reply With Quote
Old July 5, 2009, 10:56   #5
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
Okay todays goals have been met:

1. Display no longer flickers.
2. Collission Detection
3. Monsters added
4. Monsters chase player and collide with him (however they can still move through each other)

Tomorrows goals:
1. Monsters cannot move through each other
2. Player can attack and kill monsters, vice versa
3. Monsters can sleep and may be unaware of player
4. LOS

If anyone is interested in the code, or the exe let me know and I'll zip it up and post it. Currently it's building under visual studio 2008, should work in 05 though.
Sirridan is offline   Reply With Quote
Old July 5, 2009, 18:19   #6
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,662
Donated: $40
Pete Mack is on a distinguished road
I'd take a copy, but I'm only running OSX at the moment. Are you using the same base class for player and monster? (It makes things much easier if you are planning on complex monster behavior like pets, etc.)
Pete Mack is offline   Reply With Quote
Old July 5, 2009, 18:58   #7
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
I'd take a copy, but I'm only running OSX at the moment. Are you using the same base class for player and monster? (It makes things much easier if you are planning on complex monster behavior like pets, etc.)
Actually no, they are separate for the moment, although that's actually something pretty easy to change right now.

class GameCreature
class Player: GameCreature
class Monster: GameCreature

or I could make an interface and have the monster/player implement it, we'll see.

I'll put the source up a little later after I wake up and you, and anyone else, can take a look at it.
Sirridan is offline   Reply With Quote
Old July 5, 2009, 19:03   #8
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,662
Donated: $40
Pete Mack is on a distinguished road
interface isn't the right model. GameCreature is an isa, not a hasa. You'll want abstract functions for some things, but Move(Point()), Hp {get; set; } can be implemented as concrete methods.
You may even want to inherit from a base object, VisibleObject, which encodes the basics for location and appearance.
Pete Mack is offline   Reply With Quote
Old July 5, 2009, 20:59   #9
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
interface isn't the right model. GameCreature is an isa, not a hasa. You'll want abstract functions for some things, but Move(Point()), Hp {get; set; } can be implemented as concrete methods.
You may even want to inherit from a base object, VisibleObject, which encodes the basics for location and appearance.
Yeah, I think you're right about that one. I'll have to rewrite a few things, but in actuality it will be nice to have some reusable code. I'll post the source after that's done.
Sirridan is offline   Reply With Quote
Old July 6, 2009, 00:55   #10
Sirridan
Knight
 
Sirridan's Avatar
 
Join Date: May 2009
Posts: 560
Sirridan is on a distinguished road
Thorn Source

Here's the code, and the EXE if anyone wants to try. The exe is in the bin/debug folder, ThornEngine.exe

Some things are still NYI (not yet implemented) but movement and monsters chase. No combat yet.

Any questions/comments let me know!

-Yes, I will be actually commenting this code.
Attached Files
File Type: zip ThornEngine.zip (75.5 KB, 114 views)
Sirridan is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Thornwind Sirridan Development 13 July 3, 2009 10:12
JBand progress log. PaulBlay Development 38 June 27, 2009 09:19
Progress Report Cauldron Vanilla 31 June 22, 2009 18:01
Borg 3.0.9 Progress Update APWhite Vanilla 3 August 10, 2007 02:15
[Un] Unangband 0.6.2 work in progress 5b released andrewdoull Variants 3 June 21, 2007 19:15


All times are GMT +1. The time now is 23:16.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.