Bay 12 Games Forum

Please login or register.

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

Author Topic: batILLION: a game in a bat file  (Read 9558 times)

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
batILLION: a game in a bat file
« on: November 02, 2011, 12:12:51 am »

Still a work in progress.

Spoiler: batILLION Source (click to show/hide)

It's open source, naturally. Copyrighted and released under GNU, all applicable and inexplicable treaties applied. All rights preserved in mason jars.

I'll be updating this as I get actual functions in there. Basically, it'll be a never-ending map of rooms, with random doors, enemies, and loot.

Why?

Because it's there.

More plans:

Each room will use its unique address as a seed for the procedural generation of contents. Right now that's limited to the number of doors and a test "room type number". The psuedorandom generator is in serious need of help. It does very strange things.

The contents of a room will eventually include some decoration and a "thing". That could be loot, a monster, a shopkeeper, or an "artifact" with special powers like granting one level-up or teleporting you to a random room. Most of these things will be either one-use or permanent. I'm not sure how to save the state of a room after you leave it, though.
« Last Edit: November 04, 2011, 01:21:41 am by PTTG?? »
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

LordBucket

  • Bay Watcher
    • View Profile
Re: batILLION: a game in a bat file
« Reply #1 on: November 02, 2011, 06:50:42 am »

Still a work in progress.

Yes, not much to look at yet. But a few comments:

 * Note that it's probably possible for you to use ANSI to possibly not only draw out full color maps using high ascii lines and symbols, but to also redraw portions of the screen to create a character who visibly moves around on that map without the vertical text scrolling you have at present. This might or might not require a manual loading of ansi.sys on modern windows.
 * According to a quick search, microsoft claims that there is no size limit to batch files. The dreaded 64k limit put a horrible noose around all my quickbasic games. You appear to have no such limits here. If it were me, I'd probably want to test it myself to confirm that's actually true. You might do the same.

Levi

  • Bay Watcher
  • Is a fish.
    • View Profile
Re: batILLION: a game in a bat file
« Reply #2 on: November 02, 2011, 10:30:37 am »

You are a crazy crazy man.   :o
Logged
Avid Gamer | Goldfish Enthusiast | Canadian | Professional Layabout

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: batILLION: a game in a bat file
« Reply #3 on: November 02, 2011, 03:08:21 pm »

I'm still working on the seeded RNG. %random% works fine for one-off die rolls, but I also need a way to psuedoradomly determine the contents of a room, using the coordinates.

Here's my working model so far:

Spoiler: RNG_test.bat (click to show/hide)

It will not only generate size^2 random numbers, but also spit out a histogram of it. Yes, it could be more efficient. It could be much more efficient, hypothetically speaking.
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: batILLION: a game in a bat file
« Reply #4 on: November 03, 2011, 01:47:57 pm »

You can now move from room to room!
Walk around! Make a map! Tell me if anything doesn't line up, of course.

Right now, you can walk through walls, but that's intentional since there's nothing preventing you from getting trapped someplace.

There shouldn't be any one-way doors, but there might be.

Spoiler: BATillion (click to show/hide)

Some plans:

Rooms will have types, and that may be anything from climate to simply the pattern of the stonework. There will be three or four details for each room also procedurally generated.

There will be a thing in each room- a monster, treasure, shopkeeper, or artifact.

Monsters can be killed, treasure collected, the shopkeeper will sell you things, and artifacts will do strange things, like granting one levelup or teleporting you to a random room.

The seed number should be a prime number... but I think other numbers will work (if poorly).
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

Lectorog

  • Bay Watcher
    • View Profile
Re: batILLION: a game in a bat file
« Reply #5 on: November 03, 2011, 04:38:03 pm »

This is insane, and I love it. I've tried it out, and tried to make a map; except, I tried to make it 1 pixel per room, color-coded, but thinking walls were full coordinates. I realized this is room-to-room, then, not corridors. Better. :)

The only weird thing I've encountered so far is when you walk through walls, but you said that was intended. This is quite a project; I'll be watching.
Logged

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: batILLION: a game in a bat file
« Reply #6 on: November 03, 2011, 05:28:41 pm »

SET response=Thanks!
echo %response%

I've been experimenting, it looks like the pseudorandom number generator is very much so in the pseudo, not so much on the random.

The maps it's been generating certainly do look interesting.

Here's the latest version. Addresses and rolling are still weird, but better. When they DO work well, then I'll be able to bash out some things to actually do in these corridors.

Oh, and movement might be a bit less annoying now.

Spoiler: batTALION.bat (click to show/hide)
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: batILLION: a game in a bat file
« Reply #7 on: November 04, 2011, 04:57:04 pm »

The RNG should generate far more random areas. So far so good!

Spoiler (click to show/hide)
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

Mechanoid

  • Bay Watcher
  • [INTELLIGENT]
    • View Profile
Re: batILLION: a game in a bat file
« Reply #8 on: November 06, 2011, 03:23:18 am »

Words... Can not express. :o

edit - what exactly are you limited to when using a batch file to play a game inside of the command console? for instance, would it be possible to have colors, or non-text characters appear? would it be possible to "export" a level map to a regular text file that you could read? ... could you recreate something like the original Rogue? :o
« Last Edit: November 06, 2011, 03:40:16 am by Mechanoid »
Logged
Quote from: Max White
"Have all the steel you want!", says Toady, "It won't save your ass this time!"

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: batILLION: a game in a bat file
« Reply #9 on: November 07, 2011, 10:23:18 pm »

Insane project, posting to follow :)
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch

PTTG??

  • Bay Watcher
  • Kringrus! Babak crulurg tingra!
    • View Profile
    • http://www.nowherepublishing.com
Re: batILLION: a game in a bat file
« Reply #10 on: November 07, 2011, 11:38:18 pm »

Update:

Spoiler: battilion.bat (click to show/hide)

It now generates descriptions for each room. The map should be consistent on any machine and every game, so share your maps! The description text is very crude. Eventually it'll have have a few dimensions and there won't be such odd things as a narrow corridor dominated by an altar and illuminated by a cookfire.
Logged
A thousand million pool balls made from precious metals, covered in beef stock.

SirAaronIII

  • Bay Watcher
  • Western Romanticist
    • View Profile
Re: batILLION: a game in a bat file
« Reply #11 on: November 08, 2011, 01:57:24 am »

Pretty nifty, I got a natural limestone cavern with one wall collapsed that had a well with a rope leading down in the center and was lit by a brazier with some red hot coals in it.
Logged
"I want to watch the sun setting below the horizon, thinking about my significance in this world. That's my dream."

Gatleos

  • Bay Watcher
  • Mournhold... City of Light... City of MAGIC!
    • View Profile
    • Someone Sig This
Re: batILLION: a game in a bat file
« Reply #12 on: November 08, 2011, 02:07:09 pm »

Is it... supposed to generate the same map every time? Because I'm getting the same map every time.
Logged
Think of it like Sim City, except with rival mayors that seek to destroy your citizens by arming legions of homeless people and sending them to attack you.
Quote from: Moonshadow101
it would be funny to see babies spontaneously combust
Gat HQ (Sigtext)
++U+U++ // ,.,.@UUUUUUUU

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: batILLION: a game in a bat file
« Reply #13 on: November 08, 2011, 02:19:17 pm »

Words... Can not express. :o

edit - what exactly are you limited to when using a batch file to play a game inside of the command console? for instance, would it be possible to have colors, or non-text characters appear? would it be possible to "export" a level map to a regular text file that you could read? ... could you recreate something like the original Rogue? :o
The Batch interpreter cannot render graphics beyond the CLI, so to get graphics you'd need to invoke other programs. However, one could make a command that invokes Windows photo gallery on a certain file to display it, so displaying room graphics is possible. To have them randomly generated however, you'd have to write a JPEG writer in bash. And that's horrible.


Alternatively, you could invoke notepad on a text file, which is considerably easier to write in bash. That would give you ascii graphics, but it would be monochrome.
Logged

Biag

  • Bay Watcher
  • Huzzah!
    • View Profile
Re: batILLION: a game in a bat file
« Reply #14 on: November 08, 2011, 03:02:57 pm »

Is it... supposed to generate the same map every time? Because I'm getting the same map every time.
The map should be consistent on any machine and every game, so share your maps!
Logged
Pages: [1] 2 3 4