Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4 5 ... 66

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

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • My (horribly lacking in content) site
Re: The Roguelike Development Megathread
« Reply #30 on: January 24, 2009, 07:43:39 pm »

I think he means using SDL's own image commands is too slow.

Using openGL through SDL should be fine though.
Logged
Eh?
Eh!

Darkone

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #31 on: January 24, 2009, 08:06:03 pm »

I was talking about the actual image blitting functions of SDL, that people use in games/pygame uses for its sprites. If you've ever played any pure pygame games with any type of heavy rotation or scaling, you'll know what I mean ;)
Logged
"LOL, those nub FBI, they thought you were sharing software so they kicked down your door, only to find you recently wiped your entire hard drive, how wacky! Case dismissed."
Quote
[11:58] <Jay16> I couldn't begin proper last time I tried this because I embarked next to a hydra.

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • My (horribly lacking in content) site
Re: The Roguelike Development Megathread
« Reply #32 on: January 24, 2009, 08:08:59 pm »

Better solution: OpenGL can render to a texture, and rotations are almost instantaneous.
It won't always be pixel PERFECT, but it will come VERY close, and be VERY fast.
Logged
Eh?
Eh!

Ampersand

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #33 on: January 25, 2009, 09:30:35 am »

Yeah, I did a bit of Googling and found what I think you're talking about, and added it to the Ruby section. I haven't downloaded the source yet, so I'll do that later on and see if there's anything there worth using.

Yeah. Apparently the source code is only available via Subversion. However, if you do manage to get it, I would thank you very much if you could pass it along to me, as I find using subversion a bit difficult.

I'm currently learning myself some Ruby. I like it much, but until I get linux running on this box again, I don't think I'll be making a roguelike anytime soon.
Logged
!!&!!

Darkone

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #34 on: January 25, 2009, 03:22:55 pm »

Better solution: OpenGL can render to a texture, and rotations are almost instantaneous.
It won't always be pixel PERFECT, but it will come VERY close, and be VERY fast.
Yep, as well as the fact that OGL has subpixel movement, which can be useful in some cases.
Logged
"LOL, those nub FBI, they thought you were sharing software so they kicked down your door, only to find you recently wiped your entire hard drive, how wacky! Case dismissed."
Quote
[11:58] <Jay16> I couldn't begin proper last time I tried this because I embarked next to a hydra.

Fenrir

  • Bay Watcher
  • The Monstrous Wolf
    • View Profile
Re: The Roguelike Development Megathread
« Reply #35 on: January 25, 2009, 06:10:05 pm »

To avoid global variables, I have a Game class. In this class I need a map of tiles, which have their own class. Which container should I use for this?

EDIT: Nevermind. A vector should serve well enough.
« Last Edit: January 25, 2009, 06:39:25 pm by Fenrir »
Logged

Vaiolis

  • Bay Watcher
  • I Am Penguin!
    • View Profile
Re: The Roguelike Development Megathread
« Reply #36 on: January 25, 2009, 08:03:10 pm »

Hey, I was hoping to make my own lil' roguelike, but there's just one problem. Anyone know how to color text in C++? Or, more specifically, what would I need to add in to the console.cpp in the first post's C++ tutorial to make it so the drawing commands there could ask for RGB as parameters, and punch out colored characters using it? As I've never used drawing commands in C++ before I've no idea if coloring text is simple or complicated, but I can't imagine it being too hard to add it in to the pre-existing functions.
Logged
Today's Toady Tip: 3 and 4 are not the same number.
How borgly is your borgle's borgle?
The Minister of BEEEES! and of The Great Charter for the Toady Protectorate!

Ampersand

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #37 on: January 25, 2009, 08:09:23 pm »

If you check the ncurses documentation, everything you need is probably there. If you're not using ncurses, I'm not sure how you would do it.
Logged
!!&!!

Mephisto

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #38 on: January 25, 2009, 08:31:21 pm »

If you don't care about being cross-platform (it uses conio), this or this may be for you if you're running a Microsoft product.
Logged
I wonder what Toady thinks when he sees stuff like this. Does he take a more detached, scientific view of it, just focusing on the code? Does he share our sense of humor, delighting in the strange and macabre things we can do?

Or does he spend hours every day huddled in a corner, clutching his knees and sobbing "Why?! Why would they do that to the kittens?"

Vaiolis

  • Bay Watcher
  • I Am Penguin!
    • View Profile
Re: The Roguelike Development Megathread
« Reply #39 on: January 25, 2009, 08:47:14 pm »

Yeah, I'm not using ncurses, just using whatever that tutorial came with. Tried implementing it, but it's a bit confusing. The conio looks a bit easier to understand and implement, and I don't care too much for going to anything aside from microsoft, so I'll try out that next. Thanks!

EDIT: hrm, a few errors. Simply putting in the textcolor function from this has it declare that it doesn't exist. The other page states that you put in...

Code: [Select]
HANDLE hconsole = GetStdHandle(STD_OUTPUT_HANDLE);

and then to change the color, you put in...

Code: [Select]
SetConsoleTextAttribute(hconsole, FgColor | BgColor << 4);

however the SetConsoleTextAttribute, if outside main (or any other class for that matter), expects other identifiers, and when inside main (or any other class), states FgColor and BgColor were not declared. Any clue what to change to fix this?
« Last Edit: January 25, 2009, 09:06:01 pm by Vaiolis »
Logged
Today's Toady Tip: 3 and 4 are not the same number.
How borgly is your borgle's borgle?
The Minister of BEEEES! and of The Great Charter for the Toady Protectorate!

Mephisto

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #40 on: January 25, 2009, 09:45:48 pm »

Maybe a dabbling coder such as myself should refrain from Googling solutions that may or may not work.  :-\
Logged
I wonder what Toady thinks when he sees stuff like this. Does he take a more detached, scientific view of it, just focusing on the code? Does he share our sense of humor, delighting in the strange and macabre things we can do?

Or does he spend hours every day huddled in a corner, clutching his knees and sobbing "Why?! Why would they do that to the kittens?"

Vaiolis

  • Bay Watcher
  • I Am Penguin!
    • View Profile
Re: The Roguelike Development Megathread
« Reply #41 on: January 25, 2009, 10:16:34 pm »

Well, it did help, I just have to find one more solution and it will work out, presumably. I'll get to searching, and hope for the best ;)

As an edit, it seems that conio is not only specific to certain computers, but also certain compilers. So, apparently if I took all my current code and put it into a compiler that has "Borland" or something would make it work.
« Last Edit: January 25, 2009, 10:20:18 pm by Vaiolis »
Logged
Today's Toady Tip: 3 and 4 are not the same number.
How borgly is your borgle's borgle?
The Minister of BEEEES! and of The Great Charter for the Toady Protectorate!

Soulwynd

  • Bay Watcher
  • -_-
    • View Profile
Re: The Roguelike Development Megathread
« Reply #42 on: January 25, 2009, 10:48:35 pm »

I've been seriously considering building a 3d ascii engine for a project of mine.

I just don't know what to use yet. Either C++ + SDL or pygame. Pygame is a lot easier to get up and running, but C++ would probably be faster. My actual main problem is that I don't want to waste time creating a fully layered curses screen. So I'm pretty much stuck at starting it because I don't want to do what is needed to give it a kick.
Logged

KaelGotDwarves

  • Bay Watcher
  • [CREATURE:FIRE_ELF]
    • View Profile
Re: The Roguelike Development Megathread
« Reply #43 on: January 25, 2009, 10:56:39 pm »

I gave that tutorial for the "C++ for coding dummies"

I got stuck trying to get my ASCman trying to move around. Oh well I'll try again later when the tutorial is finished.
Logged

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: The Roguelike Development Megathread
« Reply #44 on: January 26, 2009, 12:26:14 pm »

I gave that tutorial for the "C++ for coding dummies"

I got stuck trying to get my ASCman trying to move around. Oh well I'll try again later when the tutorial is finished.


I noticed the ASCII Dungeon one was unfinished right after praising it :/ And it was last updated in '07 so don't hold your breath.

I found a good SDL TTF thingy that gets around one of SDL in C++'s biggest flaws, the fact that it doesn't have any text renderer.  There's a lot of font options out there on the sdl homepage, some of them use PNG fonts, this one just uses normal TTF ones.  I found it surprisingly easy to get some basic text printing online with it.  I'll have to link once I get home from work.
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 2 [3] 4 5 ... 66