Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 12 13 [14] 15 16 ... 72

Author Topic: The Roguelike Development Megathread  (Read 245805 times)

CapnMikey

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #195 on: January 31, 2009, 04:13:46 am »

So after installing TortoiseSVN, you'll notice that if you right-click in Windows Explorer you have two items added to your context menu:
- SVN Checkout
- TortoiseSVN (sub-menu)

It also has cute pictures of turtles.  Awww, turtles!  (Skip straight to Steps: if you get impatient!)

Usually when you grab stuff from an SVN Repository (coder equivalent of an FTP site) you would do a checkout.  This grabs the relevent files and directory structure for a project, and sets up some local cache files (hidden in a hidden .svn directory).  When you're ready to submit your changes back to the project, TortoiseSVN (or whatever SVN client you use) will use the .svn files to determine exactly what changes you've made, and only send the differences.  It's just an efficiency thing, so if you only change one line it doesn't need to send the entire project folder.

Since you probably don't plan on submitting bug-fixes or feature requests and just want to grab the files, you don't need a checkout.  An Export will just download the files, but won't create the .svn (which means you can't send changes back to the server).  For an Anonymous SVN Repo, all you need in order to Export (or checkout) is the repo URL.

You should be able to find these pretty quickly on project pages following "SVN" or "Repository" links.  On Isefad if you click the "SCM Repository" link it tells you:

Quote
Anonymous Subversion Access

This project's SVN repository can be checked out through anonymous access with the following command(s).

svn checkout http://isefad.rubyforge.org/svn/
or
svn checkout svn://rubyforge.org/var/svn/isefad

Steps:

1. Create a new folder where you want to download the project.
2. In the folder, right-click and choose TortoiseSVN > Export
3. In the "URL of repository" field enter the repo url http://isefad.rubyforge.org/svn/ (or svn://rubyforge.org/var/svn/isefad, either will work the same)
4. Leave everything else as their defaults and click OK.
5. Profit!

Summary:  SVN == Easy && Fun

Edit:  Oh yeah, even easier, if they provide an http:// link (and not just an svn:// one) you can just browse through the repo right in your web browser.
« Last Edit: January 31, 2009, 04:29:07 am by CapnMikey »
Logged

CapnMikey

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #196 on: January 31, 2009, 04:17:46 am »

More advice:

If your algorithm seems WAY too slow, maybe you're doing a very minor thing wrong!

[Nerd Stuff...:D]

So don't be discouraged by slowness, and don't think "I have to optimize".  Instead, think "Am I implementing this algorithm wrong".  Getting your algorithms right is WAY more important than trying to trim a few instructions out of a tight loop!!

Aye, very good advice!  Instruction optimizations can often get you 5-10% speed increases (usually at the expense of readibility), using the right algorithm or using the algorithm right it's not unheard of to get 10-100x speed increases!
« Last Edit: January 31, 2009, 04:24:56 am by CapnMikey »
Logged

Ampersand

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #197 on: January 31, 2009, 04:46:53 am »

Thank you CapnMikey.
Logged
!!&!!

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: The Roguelike Development Megathread
« Reply #198 on: January 31, 2009, 08:06:34 am »

Instruction optimizations are usually handled by the compiler, and the compiler(at least in the case of C and C++) has over 30 years of professional experience put into it's optimization.
Logged
Eh?
Eh!

Rhodan

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #199 on: January 31, 2009, 09:09:58 am »

There's always special cases where manual optimization works better, though.  I doubt compilers can detect exactly what you're trying to do.  Especially with a longish block of code being replaceable by just a few lines that do a tricky maneuver.
Logged

Ampersand

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #200 on: January 31, 2009, 09:26:17 am »

Already hitting problems with Isefad.

I've had to edit the rendered windows in order to make them fit the windows command line, but that wasn't much of a trial. Looks to me however that without serious alteration to the ui, it won't run properly on windows. I'll have to get Linux back.
Logged
!!&!!

Fenrir

  • Bay Watcher
  • The Monstrous Wolf
    • View Profile
Re: The Roguelike Development Megathread
« Reply #201 on: January 31, 2009, 12:29:51 pm »

FOV

The spinning complexity strikes Fenrir in the head!
It explodes in a cloud of gore.


Perhaps I should put off FOV until later.
Logged

Andir

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #202 on: January 31, 2009, 01:16:57 pm »

FOV

The spinning complexity strikes Fenrir in the head!
It explodes in a cloud of gore.


Perhaps I should put off FOV until later.
Don't worry about that yet .... unless you're psyched to do it.  If there's one thing I learned about starting off a project is to never get stuck spinning your wheels on something that can be added later.

Also, for those talking optimization:  This is a minor one for C/C++ (and maybe others), but can make a bit of difference, is a good habit to get into, I don't see it happen enough, and it can be done while you code with no particular overhead.  Use prefix increments/decrements.  Get used to using ++i instead of i++.  If you need the ability to pass i to something THEN increment it, it's fine to use i++ but in FOR loops it will save you hits to the stack and memory allocations to use ++i.  I could get into the details on it but it's rather confusing if you are first starting off.  Just know that ++i is generally faster than i++.  If you are simply incrementing a value, use ++value instead of value++.  This especially helps in long loops, closed loops, and general data crunching tasks.
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: The Roguelike Development Megathread
« Reply #203 on: January 31, 2009, 02:41:18 pm »

Start with a "see everything in x*x box regardless of walls", then go to something more circular later when you think you can handle it.
Logged
Eh?
Eh!

Rhodan

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #204 on: January 31, 2009, 03:25:49 pm »

I remember having loads of trouble with the FOV of my rogue likes... I was so happy when I finally got recursive shadowcasting to work!

Tip: Make a tiny demo of whatever new concept you want to implement into your game before putting it into the actual project.
This applies mostly to stuff like field-of-view, lighting, different dungeon generators and the like.  This way, you can test your fancy FOV in a hardcoded map before putting it into the real game, so you don't have to run all the way to that specific corner of the dungeon everytime you want to test stuff, or have to go through chargen 100 times to get dungeon generation working.
Logged

Fenrir

  • Bay Watcher
  • The Monstrous Wolf
    • View Profile
Re: The Roguelike Development Megathread
« Reply #205 on: January 31, 2009, 04:30:01 pm »

Progress. Not much, but progress:


There is an elf under the yellow 'X', by the way.
Logged

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: The Roguelike Development Megathread
« Reply #206 on: January 31, 2009, 04:41:50 pm »

Niiiice.  That's definitely coming along!
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

Willfor

  • Bay Watcher
  • The great magmaman adventurer. I do it for hugs.
    • View Profile
Re: The Roguelike Development Megathread
« Reply #207 on: January 31, 2009, 05:06:20 pm »

Progress. Not much, but progress:


There is an elf under the yellow 'X', by the way.

Bug report: I think we all know what that yellow X is. It is a spaceship that has landed on an elf, and you simply haven't made the program recognise it yet.

On a more serious note, yes, that actually looks like it's coming along quite nicely.
Logged
In the wells of livestock vans with shells and garden sands /
Iron mixed with oxygen as per the laws of chemistry and chance /
A shape was roughly human, it was only roughly human /
Apparition eyes / Apparition eyes / Knock, apparition, knock / Eyes, apparition eyes /

Fenrir

  • Bay Watcher
  • The Monstrous Wolf
    • View Profile
Re: The Roguelike Development Megathread
« Reply #208 on: January 31, 2009, 05:07:53 pm »

The elf doesn't really do anything yet, which is what I'm implementing now.

Creatures should update themselves, but then they don't have access to any information about the world around them. Should I pass a vector of all the world's objects to them, or maybe a pointer to my Game class?
Logged

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: The Roguelike Development Megathread
« Reply #209 on: January 31, 2009, 05:25:56 pm »

In general, the critter (or whatever does its thinking) would get a pointer to the Game class.  And if it needs to, it would use that pointer to get its own list of objects from the world.

When you get LOS down, you might add a function saying "What can I see from right here?" that would return a list of everything your elf has in LOS, and then it could, like, decide to approach or run from the player.

Though if you want to do something like that...admittedly, the first version of your LOS function might just return a list of every creature... :)

That LOS function should probably be on your Creature.  And it should know what abilities your elf has...like, whether it can see invisible, infra red, whether it can hear things far away, etc.
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!
Pages: 1 ... 12 13 [14] 15 16 ... 72