Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

Are you going to enter the 7DRL?

Yes
- 3 (27.3%)
No
- 4 (36.4%)
Maybe
- 4 (36.4%)

Total Members Voted: 11

Voting closed: March 12, 2011, 04:04:48 pm


Pages: [1] 2 3

Author Topic: 7DRL Contest 2011  (Read 8554 times)

Akhier the Dragon hearted

  • Bay Watcher
  • I'm a Dragon, Roar
    • View Profile
    • My YouTube Channel
7DRL Contest 2011
« on: March 05, 2011, 04:03:13 pm »

   As of today the 2011 7 Day RogueLike Contest has started and I have entered it. I plan to use C# and a nifty C# terminal graphics library similar to curses that is called Malison that I found Here.
   The official announcement thread is Here at usenet so if you want to officially join do it there. There is also a Facebook Event and a Community Blog for it as well as the  Roguebasin page for it though it only contains the links and some other general info. Anyone else here at Bay12 competing feel free to announce here in this thread.

   I plan to post end of day reports on how far I have managed to get in my game which will be called "The Soul Lord". At the end of the compition I will also post a list of all the finished games and a link to where to download them and I will review at the very least which ever one wins the contest unless it mine because that would be to biased a review because Obviously my game will be the best ever.
« Last Edit: March 11, 2011, 06:01:06 pm by Akhier the Dragon hearted »
Logged
Quote
Join us. The crazy is at a perfect temperature today.
So it seems I accidentally put my canteen in my wheelbarrow and didn't notice... and then I got really thirsty... so right before going to sleep I go to take a swig from my canteen and... end up snorting a line of low-grade meth.

Akhier the Dragon hearted

  • Bay Watcher
  • I'm a Dragon, Roar
    • View Profile
    • My YouTube Channel
Re: 7DRL Contest 2011 has started!
« Reply #1 on: March 05, 2011, 11:22:33 pm »

Day 1

   I have mostly just been setting up my project so far. I have the '@' walking around the screen at least. Most of my time was taken by figuring out Malison which is a C# terminal graphics library similar to curses. I also set up a few classes including an important one that will be of much help. It is a Direction class that I basically took from These Two articles on the blog "Writing Kode". Here is the Direction class I have:
Spoiler (click to show/hide)
   The "Vec" in ApplyTransform is a Point that is special to Malison. By using it I can simply put
Code: [Select]
Vec a = new Vec(1,0);
Terminal[a].Write("Hello World");
and it will write at 1,0. Vec is nice because you can add it to another so I could do a = a + a; and it would print at 2,0. Points can not be added together so this is quite useful because I can just for movement put Player.Location += Direction.West.ApplyTransform(Player.Location); and it would move the location west. I can do this anytime I need to move something.
   Another useful thing with the Direction class is those things with the switches in them. Direction.Next will get the next clockwise direction so when a monster wants to get to the player if the way is blocked I can easily check other directions. There is also previous, inverse, next perpendicular, and previous perpendicular.
   Of course till I have more than a lame tech demo this is all just hot air but at the least I can fly high in my hot air balloon  ;D

Edit: Because the Direction Class was CopyPaste and had more then I needed I am now using a more compact and simplified version I coded all myself.
« Last Edit: March 08, 2011, 01:20:34 am by Akhier the Dragon hearted »
Logged
Quote
Join us. The crazy is at a perfect temperature today.
So it seems I accidentally put my canteen in my wheelbarrow and didn't notice... and then I got really thirsty... so right before going to sleep I go to take a swig from my canteen and... end up snorting a line of low-grade meth.

Blank Expression

  • Bay Watcher
    • View Profile
Re: 7DRL Contest 2011 has started!
« Reply #2 on: March 06, 2011, 05:23:53 pm »

It is a Direction class that I basically took from These Two articles on the blog "Writing Kode". Here is the Direction class I have:
You shouldn't copy-paste code from people who are incomeptent.

-Pick a naming style, don't mash them; the standard is to pascalCase private variables
-Why are you using strings in ANY comparison in that piece of code? This is what enums are for. If you are ever doing a switch statement over a string or a non-computed magic-number integer, you should probably be using an enum.
-"Direction.Next" is just not that special, certainly not worth bragging about, and you've implemented it in a poor way. A better way would be to have an array and do an increment/modulus to wrap around the internals of the array. Or, y'know. Just have a static Direction field in the class that points to the next one. (This could then be done with Previous, etc. without a problem either.)

Quote
   The "Vec" in ApplyTransform is a Point that is special to Malison.
This isn't C++; you aren't going to be arrested by the Code Police if you call it a Vector instead of something unnecessarily terse. Or, y'know--call it a Point, because we have these things called namespaces.

Quote
Points can not be added together
blam
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: 7DRL Contest 2011 has started!
« Reply #3 on: March 06, 2011, 07:29:17 pm »

incomeptent.
LOL  :D Don't mind BE, he's just here on a crusade to berate people on "bad code".

So yeah, I'm in, we've also got our own B12 7DRL festival this month, and I'm combining the two.

So far, I've been building a UI. For two days. I reckon it's about 4 days UI and 3 days for the game, this week. It's going to be the stupidest roguelike with the grandest UI ;)
« Last Edit: March 06, 2011, 07:34:53 pm by Siquo »
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: 7DRL Contest 2011 has started!
« Reply #4 on: March 06, 2011, 07:29:50 pm »

doublepost
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Akhier the Dragon hearted

  • Bay Watcher
  • I'm a Dragon, Roar
    • View Profile
    • My YouTube Channel
Re: 7DRL Contest 2011 has started!
« Reply #5 on: March 06, 2011, 08:13:34 pm »

   I know about the festival but the 7DRL has a few years behind it and so when I did not see a thread for it decided to post one. On the BE issue I would not mind him anyway. This is a personal project so I use what works best for me.
   I am working on the map at the moment and so far it pops out things that look like this:
Spoiler (click to show/hide)
   The way there is a lot of empty space to one side is an artifact of how rooms are placed that I am trying to get rid of and I think I know how. It just I need to change a few things.
Logged
Quote
Join us. The crazy is at a perfect temperature today.
So it seems I accidentally put my canteen in my wheelbarrow and didn't notice... and then I got really thirsty... so right before going to sleep I go to take a swig from my canteen and... end up snorting a line of low-grade meth.

Akhier the Dragon hearted

  • Bay Watcher
  • I'm a Dragon, Roar
    • View Profile
    • My YouTube Channel
Re: 7DRL Contest 2011 has started!
« Reply #6 on: March 06, 2011, 09:55:40 pm »

Day 2
   I mostly just worked on getting my map generator working today. While I like the maps it makes there are some leftover artifacts from the generation method and the code is currently slower than I want it but for the first map generator I have ever made it does incredibly well. I also have my bit of code that makes a text file of the map still in so I can continue to test it and see exactly what is going on.
Spoiler (click to show/hide)
   I spent most of my time working on it trying to get placement working right till I figured out I needed to store all of the rooms instead not. I finally figured it out and decided on using a list which works out quite well for what I needed.
   The other thing that took a while was cutting features. I originally was going to have water and lava tiles but I ended up tossing that for this game because I had enough on my hands with just generating a regular map. I still need to add doors to it but this was a purposeful choice to not include it here. The way I have it planned I will need to add them later but that will be easy because I will only need to look for map tiles that are both using the '.' character and have Room_Wall as true.
Spoiler: Map (click to show/hide)
Logged
Quote
Join us. The crazy is at a perfect temperature today.
So it seems I accidentally put my canteen in my wheelbarrow and didn't notice... and then I got really thirsty... so right before going to sleep I go to take a swig from my canteen and... end up snorting a line of low-grade meth.

Blank Expression

  • Bay Watcher
    • View Profile
Re: 7DRL Contest 2011 has started!
« Reply #7 on: March 06, 2011, 10:51:56 pm »

incomeptent.
LOL  :D Don't mind BE, he's just here on a crusade to berate people on "bad code".
"You have design problems and are copy-pasting crap code."

"LOL U HAV TYPO"

I left it in there pretty much solely to see which of you would show your ass. I wasn't disappointed. It just isn't that had to take some time and analyze a piece of code before copy-pasting it blithely, and it is always worthwhile.
« Last Edit: March 06, 2011, 10:56:33 pm by Blank Expression »
Logged

Akhier the Dragon hearted

  • Bay Watcher
  • I'm a Dragon, Roar
    • View Profile
    • My YouTube Channel
Re: 7DRL Contest 2011 has started!
« Reply #8 on: March 06, 2011, 11:10:03 pm »

   Hello Blank Expression. Thank you for pointing out problems in my code. Vec is called Vec because that is what the .dll calls it and I did not make that because I Would have called it Vector myself.
   In the link you provided I could find nothing about adding points together, at least not directly so if you want me to learn something from it you will have to actually put some effort in and tell me instead of simply linking somewhere else.
   Honestly I did basically copypaste the Direction class but it works for what I need it to do so I am not complaining. As for naming I use whatever naming that reads right to me because I am the one coding it, not you or anyone else.
   Maybe the .next is nothing special to you who has so much experience but to me and anyone who has not seen something similar it is something special. Sorry if me being new at programming C# irritates you. I only start a few weeks ago and cannot help not having all of your experience.
   Also leaving a typo in to bait someone does not change the fact that your post has a typo in it.
« Last Edit: March 06, 2011, 11:13:29 pm by Akhier the Dragon hearted »
Logged
Quote
Join us. The crazy is at a perfect temperature today.
So it seems I accidentally put my canteen in my wheelbarrow and didn't notice... and then I got really thirsty... so right before going to sleep I go to take a swig from my canteen and... end up snorting a line of low-grade meth.

Blank Expression

  • Bay Watcher
    • View Profile
Re: 7DRL Contest 2011 has started!
« Reply #9 on: March 06, 2011, 11:43:03 pm »

   Hello Blank Expression. Thank you for pointing out problems in my code. Vec is called Vec because that is what the .dll calls it and I did not make that because I Would have called it Vector myself.
Fair enough, I misunderstood. That said, a library that goes out of its way to reinvent the wheel is a suspect library. (TCOD does this too, however, so it may be unavoidable.)

Quote
   In the link you provided I could find nothing about adding points together, at least not directly so if you want me to learn something from it you will have to actually put some effort in and tell me instead of simply linking somewhere else.
A link to extension methods that has examples about adding extension methods to existing BCL classes should, with a little bit of thinking, indicate that you can put extension methods on existing classes. Like System.Drawing.Point. (Point already has methods for adding together Points and Sizes, as the convention is to use the Size class as a Vector, but while having different classes is semantically valuable, being able to add together classes of the same type is too handy not to have.)

Understand your tools. It helps.

Quote
   Honestly I did basically copypaste the Direction class but it works for what I need it to do so I am not complaining. As for naming I use whatever naming that reads right to me because I am the one coding it, not you or anyone else.
This is a bad way to think about writing code. Always write code in such a way as to be consistent and predictable--not because someone else may read it, but because in six months, you may come back and read it and not remember what you're doing. (This is also why it's advisable to comment aggressively even in personal code.) Things such as sanely and consistently naming variables, for example, matters because your code has to be read in context with code from .NET and from other libraries. For example, you've named private member variables in CamelCase. This is a questionable decision because properties are traditionally named in PascalCase (along with constants, methods, etc.). The Microsoft C# Coding Guidelines explain the reasons behind their decisions, and they're (mostly) good ones. It's a good idea to follow them; they're smarter and more experienced than either me or you.

As far as "it works so I am not complaining"--this is an attitude that will loop back to kick you in the junk. Uncritically accepting code that you didn't write and don't fully understand is not a good place to start, ever. Don't get me wrong, it's good to re-use code, and writing code other people have already written well is a sucker's game (except when learning), but the reason you write code as a beginner instead of just bolting together bits of other people's stuff, is to understand what is and is not good code so you can steal carefully select libraries and tools to accomplish your goal.


Quote
   Maybe the .next is nothing special to you who has so much experience but to me and anyone who has not seen something similar it is something special. Sorry if me being new at programming C# irritates you. I only start a few weeks ago and cannot help not having all of your experience.
Don't misunderstand me: being new isn't a problem. Doing things a silly way when you aren't aware of a better way of doing it is also not a problem. Good thing that I gave you multiple ways to do it.

I'm not irritated; I stated problems with the code that you apparently felt was worth offering for public scrutiny. I'm deeply sorry if you didn't want people to actually provide feedback about the things you are writing about, but that's what a blog's for.

Quote
   Also leaving a typo in to bait someone does not change the fact that your post has a typo in it.
I saw it after posting, thought about editing it, shrugged and couldn't be arsed. Leaving it had a nice side effect of smoking out the usual band of carebears who are quite apparently of the opinion that a typographic mistake invalidates the points that have been raised.
« Last Edit: March 06, 2011, 11:47:09 pm by Blank Expression »
Logged

Akhier the Dragon hearted

  • Bay Watcher
  • I'm a Dragon, Roar
    • View Profile
    • My YouTube Channel
Re: 7DRL Contest 2011 has started!
« Reply #10 on: March 06, 2011, 11:58:22 pm »

This is a bad way to think about writing code. Always write code in such a way as to be consistent and predictable--not because someone else may read it, but because in six months, you may come back and read it and not remember what you're doing. (This is also why it's advisable to comment aggressively even in personal code.) Things such as sanely and consistently naming variables, for example, matters because your code has to be read in context with code from .NET and from other libraries. For example, you've named private member variables in CamelCase. This is a questionable decision because properties are traditionally named in CamelCase (along with constants, methods, etc.). The Microsoft C# Coding Guidelines explain the reasons behind their decisions, and they're (mostly) good ones. It's a good idea to follow them; they're smarter and more experienced than either me or you.
   I should do that, I want to do that, but in the end I always forget to do that. The way it appears is how I code it when not thinking about it. I understand what I see because its named how I think of it.
   With comments I actually normally use them quite a bit. Of course only seeing this it does look like I don't use it at all. Mostly this is in response to my C# collage class where my group is overusing them and after being forced to comment basically every line of code in my free time I have been inadvisedly avoiding it.
Logged
Quote
Join us. The crazy is at a perfect temperature today.
So it seems I accidentally put my canteen in my wheelbarrow and didn't notice... and then I got really thirsty... so right before going to sleep I go to take a swig from my canteen and... end up snorting a line of low-grade meth.

Blank Expression

  • Bay Watcher
    • View Profile
Re: 7DRL Contest 2011 has started!
« Reply #11 on: March 07, 2011, 12:27:18 am »

This is a bad way to think about writing code. Always write code in such a way as to be consistent and predictable--not because someone else may read it, but because in six months, you may come back and read it and not remember what you're doing. (This is also why it's advisable to comment aggressively even in personal code.) Things such as sanely and consistently naming variables, for example, matters because your code has to be read in context with code from .NET and from other libraries. For example, you've named private member variables in CamelCase. This is a questionable decision because properties are traditionally named in CamelCase (along with constants, methods, etc.). The Microsoft C# Coding Guidelines explain the reasons behind their decisions, and they're (mostly) good ones. It's a good idea to follow them; they're smarter and more experienced than either me or you.
   I should do that, I want to do that, but in the end I always forget to do that. The way it appears is how I code it when not thinking about it. I understand what I see because its named how I think of it.
   With comments I actually normally use them quite a bit. Of course only seeing this it does look like I don't use it at all. Mostly this is in response to my C# collage class where my group is overusing them and after being forced to comment basically every line of code in my free time I have been inadvisedly avoiding it.
This makes sense. Most professors over-stress commenting, in part because most professors aren't really programmers.

The rule of thumb I tend to go with is that if it took me more than a couple seconds to think about it, it should probably have some sort of "this does X" comment. If you're not using C# Express, there are tools such as CodeRush that can follow behind you and stub out XML comments for functions, but obviously that's not going to handle commenting inside of a function itself. I think CodeRush (and probably Resharper too) have tools that can nag you about inconsistent function naming, etc. too.
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: 7DRL Contest 2011 has started!
« Reply #12 on: March 07, 2011, 04:32:06 am »

That map-generator is looking pretty good, already!

I'm in day 2 of UI.
"What are you doing, recreating Windows in ASCII?!"
"Why yes, yes I am."

Forgot about yoga class tonight, so that leaves me 2 evenings instead of 3 for actual gameplay, if everything procedes according to plan.
This game is going to suck beautifully.
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Akhier the Dragon hearted

  • Bay Watcher
  • I'm a Dragon, Roar
    • View Profile
    • My YouTube Channel
Re: 7DRL Contest 2011
« Reply #13 on: March 07, 2011, 11:44:17 pm »

Day 3
Spoiler: Image of so far (click to show/hide)
   Today I worked on getting the map to display right and shift along when the player gets to the edge. I also did the start screen and detailed the flavor for the game. The '<' in the screen just represents the place you start at and nothing more.
   I was able to use the following code to place the start area in the upper left corner and plan to use an inversion of it to place the Boss in the other corner.
Code: [Select]
bool testwalk = false; int startX=0, startY=0;
while (!testwalk)
{
    if (map.tile[startY, startX].Walkable) { testwalk = true; }
    else if (startY < startX) { startY++; }
    else { startX++; }
}
map.tile[startY, startX].Symbol = '<';
map.tile[startY, startX].Walkable = false;
player = new Player(10, true, startX, startY, '@', TermColor.White);
   I set the map.tile.walkable that the player is on to start so that monsters an stuff do not walk onto it. When you move it resets it to true and your new position to back to false. the "player"  has in order hp, alive, x, y, symbol, and the color. Tomorrow or the next day there will also be soul strength.
   I did not do all that I wanted today but because of collage I did not have the time. My '@' now walks in rooms and hallways only and not in the walls so once I get it so it does not automatically show the whole map it will at least be interesting to explore. Because of how I set it up Visibility is its own thing so you will be able to see through monsters but not walk into their square and stand on them.
Logged
Quote
Join us. The crazy is at a perfect temperature today.
So it seems I accidentally put my canteen in my wheelbarrow and didn't notice... and then I got really thirsty... so right before going to sleep I go to take a swig from my canteen and... end up snorting a line of low-grade meth.

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: 7DRL Contest 2011 has started!
« Reply #14 on: March 08, 2011, 12:20:47 am »

The spelling errors!

:)

Looks like good progress though.  I'm looking forward to day 4.
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout
Pages: [1] 2 3