XDC engine development thread (alpha version)

Everything about the various Boulder Dash tools, and other stuff created by the fans.

Moderator: Admin

User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

Sendy wrote:Amoeba would be nicer in Wall colours, no?
It is, when using en-original.
Also, I don't like the Monolith graphic, it doesn't fit with the classic caves, but this is probably all irrelevant since you can use your own graphics, I guess...
Yes. Of course, since I adopted No One's Enemydesigner, you can even create your own.
I have just hardcoded the gfx for testing convenience. It will be removed soon and loaded from disk instead.
Sendy wrote:Will we have a choice between the classic random distribution and the new 32-bit one (which is really cool I have to say)? Perhaps on a per-cave basis? More options = good.
Of course. The point of my test files was just to figure out the best way to put the seed in. I think I will put cave's seed to RandSeed1 and both RandTemps and 0 to RandSeed2. That initialization gives just as good results with the 32-bit random and stays compatible to the original one, so I don't have to care for any routine using them, except for the selector.
User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

New version: http://www.file-upload.net/download-121 ... 8.prg.html

- "spacebar to resume" and "out of time" messages are blinking, so you can still read the timers.
- Message colors are player specific: player 1 is yellow, player 2 is light red.
- Rewarding remaining seconds (remaining seconds * current level).
- Random number generator selectable in cave file.

The random number generator is initialized like this

Code: Select all

        sta random_seed1
        sta random_seed3
        sta random_seed4
        lda #$00
        sta random_seed2
Thus all have the seed from the cave data except for random_seed2. The random number code looks like this:

Code: Select all

get_predictable_random_number:
        bit get_predictable_random_number_32_bit

get_predictable_random_number_c64:
        lda random_seed2
        ror
        ror
        and #$80
        sta random_seed3
        lda random_seed1
        ror
        and #$7f
        sta random_seed4
        lda random_seed1
        ror
        ror
        and #$80
        clc
        adc random_seed1
        adc #$13
        sta random_seed1
        lda random_seed2
        adc random_seed3
        adc random_seed4
        sta random_seed2
        rts

get_predictable_random_number_32_bit:
        lda random_seed2
        asl
        asl
        eor random_seed2
        asl
        eor random_seed2
        asl
        asl
        eor random_seed2
        asl
        rol random_seed1
        rol random_seed2
        lda random_seed4
        asl
        eor random_seed4
        asl
        asl
        ror random_seed3
        rol random_seed4
        lda random_seed1
        eor random_seed3
        rts
The BIT instruction is changed to JMP when the 32 bit generator is selected. This will be documented in the XDC documentations as well, so others will be able to use those in their own software.
User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

New version: http://www.file-upload.net/download-121 ... 0.zip.html

- BDCFF compiler. Can compile all BD1 features. It currently sets the magic wall bug emulation automatically.
- besides BD1, it can also handle AMOEBA2, which has the slime graphic. For a detailed list, see my updated BDCFF document: http://www.gratissaugen.de/erbsen/bdcff.html
Currently supported features and known element names are written in blue.
- game can have up to 7 levels.
- game can have 255 cave theoretically. The game file currently loads to $6400 and can go all the way to $cfff. Depending on how big the final version grows, I might change that loading address either up or down. Most likely down, see next point.
- a good thing new to a BD engine is the scroll routine at $e000 and also some working arrays at $fe00. Until now, no C64 BD engine didn't use any RAM beyond $cfff at all.

Missing features:
- BD1 intermission speed. XDC can handle it already, including the reduces scanning area, which gains some speed. I will add that to the BDCFF compiler.
- BD1 timing emulation. This will most likely never be in XDC as it is the first C64 BD engine supporting a reliable timing model (Scheduling type "Milliseconds" and PAL timing disabled in GDash. Frametimes are currently hardcoded by the compiler like this: 180, 160, 140, 120, 120, 120, 120).

The disk image contains a compiled Dr. Watson's BD4 to test the engine. But you can try out any other BDCFF file based on the BD1 engine. Just use BDCFFCOMPILER.EXE which is included in the zip file. Then copy the created file to the disk image and name it "CAVES-ALPHA".
User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

New version: http://www.file-upload.net/download-122 ... 2.zip.html

- Slime: permeability can be set, but the element list is hardcoded for now.
- Growing wall: horizontal, vertical and combined each in flavors of normal wall and steelwall outfit. There is an engine internal switch which can invert the directions, but can not be used in the cave file yet.
- Drawing instructions for Raster and Add.
- Random generator is selectable with: RandomAlgorithm=C64|XDC

- bugfix: start coordinates at the bottom line no longer crash the engine.
- bugfix: level specific cave objects no longer crash the engine.
- bugfix: status line flicker during scrolling in some caves.

Always keep your BDCFF files, as you most likely need to recompile them in later versions. Most things change internal during development, and optimized code is more important than a fixed format right now.
User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

Just to test the limit: http://www.file-upload.net/download-122 ... c.d64.html

The engine loads 255 caves, 5 levels each. I thing, this is plenty.

Not to claim to make a record. I know, Boulder Dash DTV has 360, but no level feature.
User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

New version: http://www.file-upload.net/download-123 ... 5.zip.html

- Menu with cave/level/players/joysticks selection and scrolling patterns.
- 2 player mode. In one joystick mode, either one can be used. In two joystick mode, there is one for each player, so you can not accidentally mess with your opponent. Just like in original BD.
- DTV buttons mapped, so you don't need a keyboard in order to play. DTV-B = give up life, DTV-D = select number of players, joysticks and also pause mode in game. Planned for the final version: DTV-A = f1 = display highscores in menu, DTV-C = left arrow = suicide key.
User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

New version: http://www.file-upload.net/download-123 ... 6.zip.html

- Title music. It fades out when a game is started.
- Some tweaks to the menu irq. It should run fine on PAL and NTSC C64 and also on DTV. Probably Super CPU as well, though I don't have the means to test this. Feedback is appreciated of course.
- Game start tweaked. While the coloring usually happens after the cave is drawn and when the entire screen is covered, this lead to a black screen (I blackened it, as just leaving the colors from the menu is even more ugly) for a moment at game start. Now, at game start, the cave is covered and the colors are drawn almost immediately, even before the cave is drawn.
This particular distinction wasn't necessary in original BD, since the covering happened at the end of the cave. In my engine, the covering takes place while drawing the next cave (or the same again) in the background, which saves some time between caves. Very useful when they become more complex like maze generation. You basically get about one second for free this way. If the caves are simple and therefor fast drawn, the engine simply waits some time for the covering effect to happen, thus having a feel similar to original BD.
User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

New version: http://www.file-upload.net/download-124 ... 9.zip.html

- Expanding steelwalls are indestructable now.
- New element SLIME2. It behaves exactly like SLIME, but uses the amoeba graphics.
- Atari colors are fully supported now, including amoeba. The BDCFFcompiler reads colornames Atari## from BDCFF files. (Border and slime are ignored as they are equal to background and amoeba on Atari)
- C64DTV native colors are supported as well. The BDCFFcompiler reads colornames C64DTV## from BDCFF files.
- If no colors are given, BDCFFcompiler generates some of his own.
- If foreground color 3 and amoeba are different, the amoeba color is used on a plain C64.
- Improved BDCFF support. See http://www.gratissaugen.de/erbsen/bdcff.html
- [LimitedColors] sections allowing hybrid cave files, ie. allowing extended features while still keeping the plain C64 in mind.
For example, Boulder Dash 2 cave B can have both Atari and C64 appearance like this (note those two [LimitedColors] sections):

Code: Select all

[cave]
Name=B. Silos
Colors=Atari00 Atari00 Atari36 Atari76 Atari7c Atarid4 Atarid4
[LimitedColors]
Colors=Green Purple White
[/LimitedColors]
DiamondsRequired=75 80 85 90 95
DiamondValue=3 10
CaveTime=200 190 180 170 160
RandSeed=100 137 140 251 51
RandomFill=BOULDER 254 AMOEBA 127
AmoebaTime=25
Amoeba2Time=25

[objects]
Line=1 15 30 15 STEELWALL
FillRect=1 16 38 20 SPACE
FillRect=1 0 7 15 STEELWALL
FillRect=11 0 17 15 STEELWALL
FillRect=21 0 27 15 STEELWALL
FillRect=31 0 38 15 STEELWALL
Raster=9 14 3 1 10 1 BOULDER
Raster=9 15 3 1 10 1 DIRT
Line=1 1 38 1 BOULDER
Line=1 2 38 2 DIRT
Line=1 3 38 3 DIRT
Rectangle=2 1 3 15 SPACE
Rectangle=36 1 37 15 SPACE
Point=3 16 INBOX
Point=38 16 OUTBOX
[LimitedColors]
Add=0 0 AMOEBA AMOEBA2
Add=0 0 DIRT DIRT2
[/LimitedColors]
[/objects]
[/cave]
Image
Image
User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

New version: http://www.file-upload.net/download-125 ... 2.zip.html

- Intro screen. Compatible to v2.2. It will be displayed during loading. When loading has finished, the music starts to play while the intro screen remains on screen until button or key press.
- Highscore table with saving to disk. No Yes/No dialogue, though you still can skip saving the highscores by simply pressing RUN/STOP instead of RETURN. Like the in-game messages, the comment and name entering area at the bottom is displayed with the player specific color.

- Optionally title screen, graphics and caves can be crunched with exomizer as following:
Title screen: exomizer sfx $0000 -n -o outfile -Di_table_addr=$0800 -Di_load_addr=$5ed9 -f"rts" infile
Graphics: exomizer sfx $0000 -n -o outfile -Di_table_addr=$0800 -Di_load_addr=$26a0 -f"rts" infile
Caves: exomizer sfx $0000 -n -o outfile -Di_table_addr=$0800 -Di_load_addr=$63f9 -f"rts" infile

Addresses might change in future versions, though.
And instead of "-n", you may specify a decrunching effect, but keep in mind that you might garble your intro screen then, if you're using one.
User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

New test version: http://www.file-upload.net/download-125 ... 6.prg.html

- Maze generation: Freely selectable wall and path width like in Gdash. There are two new parameters:
- Partially braid. Mazes can range from perfect to fully braid and anything between those.
- River. This parameter sets the chance for continuing from the last carved path or pick another point to go on with during creation. High river settings are faster and produce longer paths with less junctions. Just like mazes Gdash produces. To create mazes like in Crazy Dream 9, you would set river to 0.
- There is also a bias setting like in Gdash. It works best with a high river setting.
- Mazes can be predictable using seeds or they can be truly random.

This test version has two mazes in cave O4. The one at the left is a 3x3 perfect maze with a wall thickness of 2 and path thickness of 3. On the right, there is a partially braid maze. Both use one seed for each level.

Cave A1 uses unpredictable random.
User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

New test version: http://www.file-upload.net/download-126 ... 9.prg.html

- unicursal mazes: They use the same standard algorithm as normal mazes, but instead of drawing it directly to the cave, it is drawn into a temporary buffer with wall width=1, pathwidth=3 and braid=0, the walls are added to the centers of the paths, and finally it is drawn into the cave with the desired parameters.
There are two mazes with the same seed for comparison in O4.

- PLCK map support. Two test objects in 02 with size 4x4 each. The upper one uses just 8 PLCK bytes to form the map. The lower one uses RLE which repeats the first byte to draw 7 times. The last byte is $03 which is a boulder and a wall. Boulders are specified as the background element in this case, thus it is not drawn.
User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

New test version: http://www.file-upload.net/download-126 ... 0.prg.html

- New elements: Voodoo doll, hidden exit, glued diamond, glued boulder. The last two are used by the voodoo doll in a similar way CrLi works.
- Voodoo doll properties: die when hit by a boulder, die when cought by an explosion, collect diamonds. In cave T2, the voodoo doll behaves like in CrLi, in test4, it behaves like in PLCK.
- diagonal movements. Enabled in A1, disabled in the other caves.
- Effects. Snap effect is used in A1. Effects work a bit different than on other engines. Only the end of explosion sequences can be altered. Those special effect elements in BDCFF will be supported.

The time penalty element is there, but has no code yet. So no time penalty for now.

So we have full compatibility to BD1, BD2 and PLCK elements now, and partial support for 1stB and CrLi.
Next thing will be support for the new features in BDCFFcompiler.
User avatar
Arno
Site Admin
Posts: 2826
Joined: Sat Mar 17, 2007 2:26 pm
Location: netherlands
Contact:

Post by Arno »

It's getting better and better! :D

One stupid question: how can I play an output file of the BDCFF Compiler? The one I get is only 3 kb and nothing happens after loading in WinVICE... Or does it start by a SYS command?
User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

Arno wrote:One stupid question: how can I play an output file of the BDCFF Compiler? The one I get is only 3 kb and nothing happens after loading in WinVICE... Or does it start by a SYS command?
Just replace the file "255-caves" in the disk image with your file.

The final version will have a tool similar to the link tool known from the Crazy Light Tools where you select your files to load. For now, you have to stick to the file names you can see in that disk image, though.

If you need a tool for copying your file into the disk image, try 64copy.
User avatar
LogicDeLuxe
Member
Posts: 638
Joined: Sun Jul 15, 2007 12:52 pm
Contact:

Post by LogicDeLuxe »

New version: http://www.file-upload.net/download-127 ... 2.zip.html

- PLCK map support in BDCFF compiler.
- many error checks in BDCFF compiler. If it crashed on a certain BDCFF file in the last version, the chance is good that it tells you what's wrong with it now.
- many optimizations and little bugfixes.
Post Reply