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.


Messages - Tilded

Pages: [1] 2 3 4
2
Programming / Re: Organized method of scripting games?
« on: March 06, 2017, 09:01:02 PM »
If you want something like this, take a look at T-Engine.

3
Design / Re: Turn-based vs real time
« on: January 18, 2017, 03:12:58 PM »
You know, you don't have to make a roguelike. Make the game you want to make, and if it turns out it isn't a roguelike, that's fine.

4
Early Dev / Re: ArenaRL
« on: December 23, 2016, 09:28:42 PM »
How do you move? If it's numpad, I can't do anything on a laptop.

5
Player's Plaza / Re: Searching for Roguelike games like...
« on: December 14, 2016, 07:32:12 PM »
Pixel Dungeon was greatly inspired by Brogue.
Right now the roguelike of the fortnight at /r/roguelikes is POWDER, which has pixelated graphics.

6
Player's Plaza / Re: Multiplayer roguelikes?
« on: November 24, 2016, 04:22:22 AM »
Pathos is getting multiplayer stuff. I don't know if development has finished yet though.

7
Hi, I'm starting a new project using bearlibterminal and python, and its going awesome so far! Thanks for this wonderful library

8
Design / Re: Design of game action systems/architecture
« on: November 21, 2016, 04:18:45 AM »
Have input modes for each screen. Keep them in a stack, so entering targeting adds targeting onto the stack, and canceling takes it off. Events are passed to the topmost mode, and optionally can be bubbled down through the rest of the input modes.

9
Design / Re: Supported movement keys?
« on: November 02, 2016, 05:47:45 PM »
Can you detect key up as well as keypresses? If you can, you can move diagonally by pressing two arrow keys at once, which is really nice, intuitive, and space-saving on a laptop.

10
Design / Re: Corridors considered harmful
« on: June 22, 2016, 07:15:04 AM »
If any of you are looking for a roguelike with no corridors, Ananias does this, which also fits with it being designed for mobile.

11
Design / Re: Corridors considered harmful
« on: June 17, 2016, 06:21:42 PM »
So how do you connect rooms? Do you think wider corridors are okay?

12
Early Dev / Re: Goblin Dungeon
« on: June 17, 2016, 04:31:29 PM »
These sprites were made by Oryx for a game jam where RotMG was created. The originals are free, while some later ones made for RotMG are proprietary.

14
Programming / Re: Simple FOV on a hexagonal grid
« on: April 18, 2016, 06:17:47 PM »
Here's my approach described on reddit. And here's the corresponding code:
Code: [Select]
const xDir = [0, 1, 1, 0,-1,-1];
const yDir = [1, 0,-1,-1, 0, 1];

// displacement vector for moving tangent to a circle counterclockwise in a certain sector
const tangent = [
    [ 0,-1],//  \
    [-1, 0],//  -
    [-1, 1],//  /
    [ 0, 1],//  \
    [ 1, 0],//  -
    [ 1,-1],//  /
    [ 0,-1],//  \
];

// displacement vector for moving normal to a circle outward in a certain sector
const normal = [
    [ 1, 0],// -
    [ 1,-1],// /
    [ 0,-1],// \
    [-1, 0],// -
    [-1, 1],// /
    [ 0, 1],// \
    [ 1, 0],// -
];

// round a number, but round down if it ends in .5
const roundTieDown = n => Math.ceil(n - 0.5);

const fov = (ox, oy, transparent, reveal) => {
    reveal(ox, oy);

    const revealWall = (x, y) => {
        if (!transparent(x, y)) {
            reveal(x, y);
        }
    };

    for (let i = 0; i < 6; i++) {
        revealWall(ox + normal[i][0], oy + normal[i][1]);
    }

    const polar2rect = (radius, angle) => {
        const sector = Math.floor(angle);
        const arc = roundTieDown((angle - sector) * (radius - 0.5));
        return [
            ox + radius * normal[sector][0] + arc * tangent[sector][0],
            oy + radius * normal[sector][1] + arc * tangent[sector][1],
            radius * sector + arc,
        ];
    };

    // angles are measured from 0 to 6
    // radius - radius of arc
    // start & end - angles for start and end of arc
    const scan = (radius, start, end) => {
        let someRevealed = false;
        let [x, y, arc] = polar2rect(radius, start);
        let current = start;
        while (current < end) {
            if (transparent(x, y)) {
                current = arc / radius;
                if (current >= start && current <= end) {
                    reveal(x, y);
                    someRevealed = true;
                    if (current >= 0 && current <= 2) { revealWall(x + 1, y - 1); }
                    if (current >= 1 && current <= 3) { revealWall(x    , y - 1); }
                    if (current >= 2 && current <= 4) { revealWall(x - 1, y    ); }
                    if (current >= 3 && current <= 5) { revealWall(x - 1, y + 1); }
                    if (current >= 4 && current <= 6) { revealWall(x    , y + 1); }
                    if (current <= 1 || current >= 5) { revealWall(x + 1, y    ); }
                }
            } else {
                current = (arc + 0.5) / radius;
                if (someRevealed) {
                    scan(radius + 1, start, (arc - 0.5) / radius);
                }
                start = current;
            }
            // increment everything
            const displacement = tangent[Math.floor(arc / radius)];
            x += displacement[0];
            y += displacement[1];
            arc++;
        }
        if (someRevealed) {
            scan(radius + 1, start, end);
        }
    }
    scan(1, 0, 6);
};

15
Cult was a failed kickstarter similar to these. I believe it is open source somewhere, but I haven't been able to find out where.

Pages: [1] 2 3 4