Search This Blog
Friday, March 10, 2017
Roguelike Radio: Episode 133: How to Make a Traditional 7DRL
Roguelike Radio: Episode 133: How to Make a Traditional 7DRL: This is episode 133 of Roguelike Radio, where Darren Grey and Jeff Lait talk about how to make a traditional Seven Day Roguelike
Wait Waits For No One (A few words about Construct 2 System Action wait)
Wait Waits For No One
(A few words about Construct 2 System Action wait)
If you have a System action “wait” set to wait for 3 seconds, it does not make the game wait for 3 seconds. It only makes that event wait for 3 seconds. In fact, it only makes that particular instance of that event wait for 3 seconds. The rest of the game and its events go on their merry way as if nothing happened.
In other words if you have an event with a set of actions like:
If condition is true:
If condition is true:
- do action a
- do action b
- do action c
- wait 2 seconds
- do action d
- do action e
It does actions a, b, and c immediately, then puts actions d and e on the shelf for 2 seconds while it keeps running the rest of the events and behaviors in the game. The game might go on for many ticks before it picks up actions d and e. Nothing else waits except those two actions in that one event.
In fact it will go on repeating that same event every tick for every object that can be checked for that condition. For example you could open another door while the first one is closing and it will work just fine with one event thanks to the wait action. One wait doesn’t care what the rest of the program is doing or even other instances of itself.
This is handy for something like a door or monster that might have a timed series of actions.. But only for that particular monster or door. Technically for the group of objects that meet the criteria set up in the event’s condition.
But use wait with caution. It can cause some problems as your code gets more complex.
Say you want your boss monster to do a shimmy - shake dance. You might have an event that looks like:
- Shimmy
- Wait for 1 second
- Shake
- Wait for 1 second
- Shimmy again, Shoot some bullets...
- Wait for 1 second
- Shoot a giant missle at you.
You will expect when this series of actions is called, your monster will, after a shimmy, wait, shake, wait, shimmy again wait, fire a giant missle at you. Once the action is called, the monster will fire a missle at you after 3 seconds.
There’s one problem.
Once that action is called, the monster WILL fire a missile at you in 3 seconds. What if one second later, you kill the monster and it should be lying down dead? That action is still “sitting on a shelf” from 2 seconds ago, waiting to perform it’s “shimmy again, shoot some bullets...” action and then fire a missle at you, has no way of knowing it’s supposed to be lying down because of some other unrelated events somewhere.
It will fire the missile anyhow.
Wait creates an asynchronous action. In computer science, this is related to the concept of a “promise.”
A promise is different from a condition in that a condition says “If A is true…then I’ll do B” while a promise says “when A is true, then I’ll do B.” (If then) is checking if A is true right now, and if so it will do B right now. A promise says as soon as A is true then I’ll do B.
When you have a promise set up to happen later, There’s really no way to make it not happen without putting some kind of “unless” clause in the promised action. Like so:
1 shimmy
1 shimmy
2 wait for 2 seconds
3 if not dead
4 shake. Fire some bullets.
5 wait for 2 seconds
4 shake. Fire some bullets.
5 wait for 2 seconds
6 if not dead
` 7 shoot a giant missile at you
Every time you have a wait, you need to have a condition to make sure it’s still appropriate to perform that action.
So somewhere in that promise you better think of an “unless” if you can think of any times you don’t want B happening.
Wait can be a powerful tool, but it can create unexpected behaviors that are hard to debug.
And if you try to do wait in a loop, forget about it. You probably don't want to do that. Instead use wait for signal and consider why you are trying to wait within a loop.
There's another even bigger problem:
Since nobody but the actions in the particular call of that event following the wait are going to wait, that same event is going to be called again EVERY TICK. So you need another big "Unless" in there to make sure the monster isn't ALREADY doing this. I like to use a variable called "state" and give it easy to read values like so:
Since nobody but the actions in the particular call of that event following the wait are going to wait, that same event is going to be called again EVERY TICK. So you need another big "Unless" in there to make sure the monster isn't ALREADY doing this. I like to use a variable called "state" and give it easy to read values like so:
If monster state is not "ShimmyShaking" (and whatever)
1. set monster state to "ShimmyShaking"
2 shimmy
3 wait for 2 seconds
4 if not dead
5 shake. Fire some bullets.
6 wait for 2 seconds
5 shake. Fire some bullets.
6 wait for 2 seconds
7 if not dead
` 8 shoot a giant missile at you
9 set monster state to "DoingSomethingElse"
In fact those "if not dead" checks can probably also be checks for the "ShimmyShaking" state since if the monster were dead it's state would probably be something like "dead."
Using the System.wait action is explained in depth in the manual section by that name on the Scirra website:
https://www.scirra.com/tutorials/56/how-to-use-the-system-wait-action
Saturday, January 28, 2017
Obama Vs Devil Chickens v 1.1
OK Took a break from Let's Make a RogueLike to finish a game I started a couple of years ago called Obama vs Devil Chickens.Basically I saw that iconic Obama skeet shooting picture, and thought Hey why don't I make a game out of that! I opened up Spriter, used lots of images and added a bunch of weapons and power ups and stuff and came up with Obama Vs Devil Chickens.
I released it on Obama's last day in office, and now after some feedback I've updated it adding a pause / continue option that saves your game position so when you can start where you left off, even if you close the browser. I also fixed a couple of bugs and added AutoLoader and clip increases from Joe Biden if you activate him.
Controls are simple just point and shoot. Hit an ammo box to reload unless you have auto loader, and shoot coins and chickens. Shooting coins increases a red line on top that allows you to get better weapons and activate Joe Biden.
Anyhow Enjoy. (click link below to play)
uberdroidgames.com/obama-vs-devil-chickens
Friday, January 13, 2017
Let's Make a Roguelike!
Get The Human now available for Windows at uberdroidgames.com
Let's Make a Roguelike / With Construct 2
If you look at my post in September entitled, Bob's Discount Dungeon, I was working on a Roguelike game with procedurally generated dungeons. I have since become obsessed with procedural generation and "the making of" Roguelike games, so much so that I made a simple tutorial about how to make a random maze with a guy walking around in it with a line-of-sight shroud and everything. It was linked to in RogueLike News.
https://www.scirra.com/tutorials/4831/rogue-like-random-maze-tutorial-pt-1
Making a Roguelike is, among other things, an exercise in procedural generation. You're making something that MAKES things. So I took it one step further than that. I'm making a book that tells people how to make something that makes things. I'm on about page 80 now well into my first step by step walkthrough.

Here's part of the introduction:

Then I go on to tell what those are:
1. Random level generation.
2. Permadeath.
3.RPG character advancement. Resource Management (see my later blog post)
To me it boils down to simply go to Steam, or itch.io, and type "Roguelike" in the search engine, then observe what the results tend to have in common. It's those 3 things.
Anyhow back to work...
Let's Make a Roguelike / With Construct 2
If you look at my post in September entitled, Bob's Discount Dungeon, I was working on a Roguelike game with procedurally generated dungeons. I have since become obsessed with procedural generation and "the making of" Roguelike games, so much so that I made a simple tutorial about how to make a random maze with a guy walking around in it with a line-of-sight shroud and everything. It was linked to in RogueLike News.
https://www.scirra.com/tutorials/4831/rogue-like-random-maze-tutorial-pt-1
Making a Roguelike is, among other things, an exercise in procedural generation. You're making something that MAKES things. So I took it one step further than that. I'm making a book that tells people how to make something that makes things. I'm on about page 80 now well into my first step by step walkthrough.
Here's part of the introduction:

1. Random level generation.
2. Permadeath.
3.
To me it boils down to simply go to Steam, or itch.io, and type "Roguelike" in the search engine, then observe what the results tend to have in common. It's those 3 things.
Anyhow back to work...
Saturday, December 31, 2016
GET THE HUMAN
GET THE HUMAN
New simple game we developed where dodging bullets is the primary game mechanic. It's simple, fun and addictive. My high score is 91, but I don't know since I added the multi-dodge bonus!
It will be available on https://itch.io GO GET IT!
Friday, July 22, 2016
Misconceptions Gamers have about Non-Gamers
1. Non Gamers exist.
Nobody thinks gamers are sexist violent assholes. Some gamers are, some are not. Just like plumbers, or golfers. Nobody is running around persecuting gamers. "Gamer" is not a race, sexuality or skin color. It's a lifestyle choice for sure. We're not an oppressed minority. If anything, we are a coddled majority used to getting instant gratification on demand.
OK enough ranting.
\
Every demographic plays games. If you think there's a group of people who don't play games... please refer to that last sentence. This is what those articles mean when they say "Gamers are dead." It means there's no special counter-culture that exclusively plays video games anymore. We all play games. EVERYBODY PLAYS GAMES. Everybody isn't in some "gamer" subculture...but they play some or other games.
Yes, she grew up playing games too. Just like you (and f%$ing everybody else). Get over yourselves.
2. Gamers are not the "Main Stream"
I don't have to look far on the internet to find someone whining about the mainstream media "being mean to gamers..." Since as everybody knows, games are the biggest selling form of entertainment, they're not some put-apon minority counter culture... they're the loud heavily funded majority.
So much so that anyone who dares criticize anything about them can expect a crowd with the on-line equivalent of pitch forks and torches at his or her door overnight.
3. People think gamers are sexist, violent assholes. (And we must correct them all the time)
Who are these people?
OK enough ranting.
Monday, September 28, 2015
Bob's Discount Dungeon!
OK deep in the catacombs of the graveyard of broken dreams that is my hard drive, there's a game I started a while back called March of the Bobs. It's kind of a reverse turret defense game where you protect these black squares with eyes and legs marching from one side of the screen to the other.
I really like the character: Bob, and I always wanted to make a simple Rogue-like adventure game. Of course, it's never simple. To make a Rogue-like you need to make a crap ton of items, monsters, random dungeon generation, combat, weapons, spells, potions, etc. But I've got 2 things going for me:
1. The enemies are based on the "Bob" template. A 32x32 basically black square with big eyes and a couple of stubby legs sticking out the bottom. This means all the monsters are going to be based on this Bob-o-morphic pattern. A Skeleton (a staple of rpg monsters) becomes a Skelebob... There are BatBobs, MummyBobs... WareBobs and of course BobCats.
2. I've got the random dungeon code pretty much done (geon). Heheh see what I did there? To switch the dungeon theme all I have to do is switch the animation name the walls and floor use along with some parameters. So "outdoor grass" uses the same code as "dark stone catacombs."
3. I've got a theme: "Discount." It's going to be really really market based so shopping is important.. I can add many things that support that theme: Coupons, Fire Sales, Dickering... etc. Crazy Bob's is hacking and slashing (prices)!
2. I've got the random dungeon code pretty much done (geon). Heheh see what I did there? To switch the dungeon theme all I have to do is switch the animation name the walls and floor use along with some parameters. So "outdoor grass" uses the same code as "dark stone catacombs."
3. I've got a theme: "Discount." It's going to be really really market based so shopping is important.. I can add many things that support that theme: Coupons, Fire Sales, Dickering... etc. Crazy Bob's is hacking and slashing (prices)!
(more to come... still editing)
Subscribe to:
Posts (Atom)



