Friday, March 9, 2018

2018 7DRL: Day 6



It ain't looking great. I've got the thirty seconds of fun (as Jaime Griesemer said once about Halo) but that's about it. There is still a fair amount of tuning to do on that thirty seconds, too.

Today's work:

  • Link statically to the C runtime library, so I don't need to have people install the DLL
  • Fool around with an enemy territory mechanic, with friendly soldiers and enemy soldiers marshaling on either sides of the front
  • Simplify the debris system
  • Add a player health meter
  • Tune the runnning-charge enemy attack

As part of doing the health meter I ended up learning about OpenGL scissoring, so I could ensure that if the window was resized you wouldn't be able to see outside the play area. I'm using the area outside to spawn in enemies now so I want them to move in across the edge.

There is still a lot of tuning and bug fixing on the core combat feel, without going into new features like a boss or combo attacks. The game really needs things like the latter to give the player interesting things over a longer time scale. I also don't have any text rendering (or texturing) capabilities right now. So the game's very bare-bones.

The territory was kind of a waste of time. I'd thought perhaps it could help serve as a place for the player to retreat to for a breather, or could give a medium-term goal of pushing the battle front to the right. But it doesn't really add anything in its current form.

I'll put the game up on Itch.io at the end of the day tomorrow for anyone who wants to try it out. I'm not sure if I'll enter it in the Roguelike challenge for judging; it really isn't a Roguelike in any meaningful sense. At least I've gotten a chance to work on some things I've wanted to flesh out for a while, and it forms a good basis for further experiments.

Thursday, March 8, 2018

2018 7DRL: Day 5



Getting some basic combat in, finally. This is my daughter playing the game. It still needs tuning and so forth.

The green zone is friendly territory but it's not doing anything in this video.

Wednesday, March 7, 2018

2018 7DRL: Day4



It's looking increasingly unlikely that I'll have anything even remotely resembling a Roguelike by the end of this week. On the plus side I've got some cool crowd motion.

This morning was spent working on the enemy steering behavior so they would behave better in groups. It's all a bunch of damped spring type things that generate forces on the enemies. There is a force toward/away from the target; a much smaller lateral force to bring orbiting to a halt; and forces to repel enemies from each other. The neighbor repulsion force never has any component pointing toward the target, though. This keeps large groups from compressing in on the target, and reflects how people avoid each other; they mostly only pay attention to the people in front of them. Finally, the desired separation distance between neighbors is a function of distance from the target. This lets groups move close together to approach the target and then spread out when they reach combat range.

The afternoon was spent trying to improve the player control scheme, with only minor success. I tried a couple of schemes. One involved “dragging” the sword like a water-skier behind a boat. Another went for simple dual-stick control: one stick to move and another to swing the sword. I've always thought about trying this, so I'm glad I did, but it really doesn't work. It takes too long to move the right stick for the speed of gameplay I'm targeting, especially if you have to swing it through an arc.

In the end I settled on a couple of refinements to the prior scheme, which involves auto-targeting the nearest enemy and then swinging the sword into a forehand or backhand stance relative to that target. I've got some adjustments to help minimize rotation when switching targets; it will switch from a forehand stance to a backhand and vice versa.

Tomorrow I will work on enemy windups and attacks. With luck I'll have a simple combat game by the end. Maybe with a boss enemy who is bigger, more dangerous, etc.

Tuesday, March 6, 2018

7DRL 2018: Day 3



I ended up pushing through and keeping the Chipmunk physics engine in place. I'm glad I did. Once I'd managed to get back to where I had been in terms of the movement feel I was able to quickly get the sword contact working, which would have been quite a bit more work to do myself.

It took a couple of tries to figure out the best way to handle movement. The Chipmunk forums suggest tying the main physics body to a kinematic body via constraints, and then setting target velocities on the kinematic body. I found it was much easier to just use forces and torques. The things I'm doing aren't stiff enough to require anything more complicated. I ended up sub-stepping the physics sim anyway, to enable better sword collisions. It's running at 240 Hz right now. We'll see whether that holds up as I add more people.

I'm still behind where I wanted to be. It's not technically a game yet because you can't fail. It's starting to be a bit of a fun toy, though.

Tomorrow I'm going to turn this into a real game. The enemies will try to fight back. There will be more than one, which means I have to revisit the player control scheme. Right now the player character orients toward the closest enemy. Pressing the button swings the sword between forehand and backhand stances, but with the re-orientation to face new enemies that can do some weird things. It also doesn't really say what to do when there are no enemies around.

Monday, March 5, 2018

7DRL 2018: Day 2

It's been a dispiriting day.

My goal has been to start with basic movement and one-on-one combat and expand outward from there. By the end of Sunday I had a decent-feeling movement and sword-swinging action. I didn't have any collision between swords and people yet, though. The thought of doing that myself was somewhat daunting so I decided to bite the bullet and switch over to a 2D physics engine. I've used Chipmunk in the past so I went with that.

What followed was the usual wrestling with Git to get the project set up. Eventually I did, and converted things over. But I haven't been able to recreate the feel of what I had. In particular, the AI movement is really loose now.

I think it may be quicker ultimately to go back to doing things myself, implementing sword collision myself. I'm weighing it. I need to get on to group movement patterns and challenge gameplay.

Sunday, March 4, 2018

7DRL 2018: Begin

Tap, tap. Is this thing on?

It's time to reanimate the blog for the annual Seven-day Roguelike Challenge. I've participated the last three years; you can find those games on Itch.io.

The 7DRL is always a high point of the year for me. I'm a professional big-budget game developer, and those types of games can take a long time to make. The last one I shipped came out in August 2014. It's refreshing to push a game all the way through to release on a regular basis. In addition I've helped out a bit with 7DRL judging, and it's really energizing to see the creativity everyone puts into their games.

This year I'm intending to make a game along the lines of Dynasty Warriors, albeit with very crude 2D graphics. Also I am not a Dynasty Warriors player, so I'm working mainly from second-hand descriptions. It should be great! If you're unfamiliar with the franchise, it's about a super-hero with a sword going up against vast armies of soldiers. The main franchise is set in the Three Kingdoms era of Chinese history; they've done spin-offs into European history, Gundam, Zelda, Dragon Warrior, other anime, etc. etc. It's a prolific line of games.

So far I have a simple framework set up on top of GLFW; it looks something like this:



The yellow circle is the player and the pinkish circles are enemies. You can move around with a game controller and the enemies move toward you.

Today's goal is to work out an acceptable one-on-one combat mechanic.

Large-Tile ThiefRL2

I'm starting the 2018 7DRL but I had a little bit of time before my official start so I added a feature request to ThiefRL 2. Pressing the number keys 1-4 will adjust the zoom level for the main tile display. This may help when playing the game on very large monitors.