Jump to content
IGNORED

Create Your Own Adventure! - Final Version Released


Atarius Maximus

Recommended Posts

Ok, I've got another updated version ready, and a problem.

 

In this version, you can modify every room in the game, with the exception of the Black Castle Maze, which is a total of 19 rooms. As soon as I add a form in VB for the 20th screen, I get runtime errors afer I compile the application. I believe the reason is I've got 140+ controls on each form, the 20th form just adds too much. I should still be able to add 1 or 2 more forms for color changing or sprite changes (they wont have so many controls on the forms), but it looks like I'm going to have to sacrifice the ability to modify at least 4 rooms in the game. I'd like some opinions on which four to leave off. Leaving the Black Castle Maze alone may not be a bad idea, as it still makes the "dot" easily findable. Thoughts?

 

I will attach the new version of the app (V0.15) to the first post in this thread in a few minutes.

Link to comment
Share on other sites

Each Map Screen uses a "form", wich is the individual window used for each screen. Each "control" is the individual visual item placed on the form. For example, the "Calculate" button is one control, and each indivdual box you click on for the playfield is a control (140 of them). Each control does use one variable. I'm thinking while I'm typing here, and I may be able to get around the problem by changing the "Edit Playfiled" table into a control array instead of an individual control for each box. Ugh, that would be a TON of work to change.

 

There is a limit of 255 controls on each form, which I circumvented by making a single form for each map. I'm currently using 140 for the playfield boxes, 1 for the reflected boxes (it's an array), and 2 or 3 for the command buttons at the bottom of each form.

 

I should have used arrays for the playfield editing from the beginning, I didn't know I was going to run into this problem. :sad:

Link to comment
Share on other sites

3 more byte locations...these specify how the dot works. The first byte checks to see which room you are moving from, the second checks to see if the dot is in it's original room, and the 3rd byte changes the room you are in to the secret message room. You can alter these so that the secret room can be any one that you want...even without a panel.

 

LF567: LDA    VBLANK,X;4

      CPX    #$8A   ;2

      BNE    LF588  ;2

      CMP    #$9F   ;2

      BCC    LF5A1  ;2

      LDA    VSYNC,X;4

      CMP    #$03   ;2 $F574<-secret entry room

      BNE    LF58C  ;2

      LDA    $A1    ;3

      CMP    #$15   ;2 $F57A <-black castle

      BEQ    LF58C  ;2

      LDA    #$1E   ;2 $F57E <-secret room

Link to comment
Share on other sites

I should have used arrays for the playfield editing from the beginning, I didn't know I was going to run into this problem.   :sad:

 

Search and replace ;) If the source is just a text file, you can do that with any wp program. That will cut down the editing time considerably.

Link to comment
Share on other sites

Search and replace  If the source is just a text file, you can do that with any wp program. That will cut down the editing time considerably.

 

Yeah, you're right. I would only have to rewrite the code once, and I could copy and paste it into each form. :) The problem is, I'm just theorizing about too many controls being the problem, I'm not 100% sure about that. It does make sense though.... as a test, I created 4 additional blank forms, recompiled, and it worked. As soon as I added the controls to the first form, I got errors after compiling. It's probably the problem.

 

I'm getting ready to go out to do some errands, and I'm going out of town this week, so I'm going to have limited time to work on this in the next 5 days.

 

Thanks for all your help and suggestions.

Link to comment
Share on other sites

Byte $F2B5 indicates which room number the chalice needs to be in in order to win the game. Care should be taken that this location lies outside of the room boundries for the chalice (so that it can't randomly start there in game 3).

LF2A5: JSR    LF322  ;6

      JSR    LF89D  ;6

      JSR    LF24D  ;6

      LDA    $DE    ;3

      BNE    LF304  ;2

      LDA    $B9    ;3

      CMP    #$12   ;2 <- $F2B5...win screen

 

 

 

 

$F29C indicates what room the invisible surround should be set to at the beginning of the game. To keep only 2 objects from flashing, this should be altered to be any "dark" room (if the user is changing the colors and properties of the rooms, it's best to have the VB program find one when it's making the alterations to the binary, and change it). This might be tricky to pull off if the user doesn't use any dark rooms (in that case, I'd just stick it in the number room or the secret room). Have it start there at VB initialization, and then alter it as soon as the user gives "darkened" properties to a room.

LF296: STA    VSYNC,X;4

      DEX           ;2

      BMI    LF296  ;2

      LDA    #$14   ;2 $F29C <-save a dark room # to the surround

      STA    $D9    ;3

 

 

 

 

 

$F114 and $F86B indicate what color is used for the background. So if the user wanted it to be, say, black instead of grey, you would need to have VB alter these 2 bytes to deal with that (the first sets the color, the second checks wall color to determine if you are in a darkened maze).


LF0FA: LDA    $8A    ;3

      JSR    LF21E  ;6

      LDY    #$00   ;2

      LDA    ($93),Y;5

      STA    $80    ;3

      INY           ;2

      LDA    ($93),Y;5

      STA    $81    ;3

      LDY    #$02   ;2

      LDA    ($93),Y;5

      JSR    LF26E  ;6

      STA    COLUPF ;3

      LDA    #$08   ;2 $F114 <-background color

LF861: LDA    $8A    ;3

      JSR    LF21E  ;6

      LDY    #$02   ;2

      LDA    ($93),Y;5

      CMP    #$08   ;2 $F86B <-check wall color...matching the ground?

...and maybe automatically update the wall color in every room that has the dark properties set (bit 2 in the playfield control) so that they match when the background color is altered by the user. An interesting wrinkle is that if you don't set bit 2 in that byte (by adding $04), the game won't display the surround object in the room when you play it...you'd be stumbling around in the dark, even unable to see where you are :lol:

Link to comment
Share on other sites

Maybe you could make a way to edit the Dragons/Bat/Items.  

 

Yes, I did plan on including that capability into the application. Assuming, that is, that I can get around the runtime/memory errors I'm running into now as this app gets bigger and more complicated. ;)

Link to comment
Share on other sites

 Hmmmm, maybe when the editor has evolved and matured a bit it might be time for a "Create Your Own Adventure" contest.  :)

 

..Al

 

We should have a "Create a room/maze" contest, where the user creates a room or maze, and put them all together for a mult-user created game. We could have three different games (like in the first one). We should call it "AAdventure"

Link to comment
Share on other sites

I have another update! It will be added to the first post in this thread in a few minutes. Now you can modify every map screen in the game, including the black castle. The Maze Guide is back into the main app, as I cleared up the memory errors I was getting. I also created a new form that lets you visually click choose the location of DASM and the location that you'd like to save the BIN and Source. There is no error checking routine built in, however, so if you choose a directory that doesn't actually have DASM.exe in it, the program will crash.

 

Now that I have the ability to edit all of the rooms in the game in place, I can consider further enhancement options, and I need some feedback on the following items:

 

1. Sprites. I could add the ability to edit the sprites (like the dragon, bat, bridge, chalice, etc.), but it would require hours of additional work, and they're easily changed with Hack-O-Matic. How important is it to everyone to have the ability to modify the sprites in this application?

 

2. Color. I was also considering adding the ability to change colors on any screen in the game. Because of the hundreds of color options that are conceivably possible, it was my thought that I could give a drop-down box choice on each map of a pre-selected range of say, 16 different colors that could be chosen for each room.

 

3. Save/Load Feature. I may attempt to add a Save/Load feature to the application, but I don't want to start working on that until all of the features I'm going to add are in place. I'm not going to promise that ability as a feature, but I know it would be nice to have.

 

4. Location of the magic dot. Currently, it would be very easy to encase the dot inside the Black Castle Maze, since you now have the ability to write a maze wall over it. I'd need Nukey's help to know how to alter the dot and pinpoint it's exact location somewhere else. Thoughts on just leaving it where it is?

 

5. The "I have to click on Calculate on every window" issue. Is this a major annoyance? I could write in code that checks for null values, and keeps the default map for each screen if you choose not to modify a particular map screen. It's just a lot of work.

 

Once I'm happy with the base application, I was thinking of modifying it with the new optimized adventure code, which would allow more changes, most notably the ability to add six new rooms to the game. This of course would require me to give the ability to add room linking changes, unless you want me to pre-specify where you all are able to put the new rooms. ;) Changing the room links does add a layer of complexity to the design.

 

The executable file is now up to 7.2MB in size! It's getting pretty bloated, as I expected. Each new form uses about 1500 lines of code (mostly cut & pasted to each new one), and this app has 24+ forms, plus the main form. I'd say it's up to around 35,000+ lines of code in total now. Yikes.

Link to comment
Share on other sites

Just a quick clarification:

The six added rooms are currently not used at all...and the original Adventure code shared 9 screens in addition to the 4 that are shared between the two versions (the castles and the number room). These are the shared bitmaps in the original game:

Castle (used for 3 screens)

Number room (used for 3 screens)

Below the yellow castle (used for 3 screens)

Side Corridor (used for 2 screens)

Top Entry Room (used for 2 screens)

 

What this means is that if you are working with the original binary, and change (for example) the Side Corridor bitmap, the screen to the left of the catacombs and the screen to the right of the catacombs will BOTH change! (only 1 bitmap exists for both of those screens). In the revised binary, all of this sharing has been eliminated (besides the castles and the game select screen). I didn't bother unsharing those screens for 3 reasons:

- The castles need to be all set up in a way that they won't interfere with the operation of the gates, so they are all similar anyway.

- The game select screen is not used in gameplay at all.

- By taking the above into account, I was able to add in more user-customizable screens.

 

Also in the original game, 6 lines of GFX are shared between 6 sets of screens (the upper or lower row of pixels)...so if the room links are changed in the original binary, there's a possibility of not being able to move to the next room when you play it!

 

Since you are making an editor that will allow the user to change the GFX of any screen as well as the room links, it's essential that you use the updated binary that has all of this bitmap sharing disabled. Otherwise it's going to get a bit confusing if a user edits a screen and finds out that up to 2 other ones automatically changed as well...or that the upper or lower line of a room is changed without his knowledge.

 

Sorry about not being clear the first time around :P

Link to comment
Share on other sites

You could still allow the user to link to the game select screen (even tho editing it will change whatever GFX is made for the 6th custom screen). I figured it was a minor tradeoff to be able to use that bitmap without having the number token getting in the way ;)

 

Anyone have any luck converting this assembly to 8k? That would provide enough space for the entire run of 64 custom screens.

Link to comment
Share on other sites

Nukey,

 

Maybe you could help me clear something else up regarding the optimized code. Could you help me identify which rooms in the code are currently being used in the game, which are extras, and where they are located in the map? I know I could figure this out by looking at the room linking, but if you already know the answers, it would save me a little time.

 

Side Corridor = ?

 

Number Room Definition = Actual Level Select Rooom

 

Below Yellow Castle = Actually below yellow castle?

 

Below Yellow Castle 2: = Room right below the entrance to the blue maze?

 

Below Yellow Castle 3: = ?

 

Side Corrodor = Room below white castle?

 

Side Corridor2 = Room to the right of the invisible maze?

 

NumberRoom2 Definition = Not currently used in game?

 

NumberRoom3 Definition = Not currently used in game?

 

Top Entry Room = Green Dragon room in game 1?

 

top Entry room2 = Room to the right and below Invisible Maze?

 

Custom room 1 - 5 = Not currently used?

Link to comment
Share on other sites

Side Corridor = the room that has all 4 exits...seen below the white castle and on the other end of the catacombs (the room data adds a panel to either the right or left side)

 

Number Room = The screen that appears when you pick the game level. It shares the bitmap with the last added room

 

Below Yellow Castle = Actually below yellow castle? - Yes

 

Below Yellow Castle 2: = Room right below the entrance to the blue maze? - Yes

 

Below Yellow Castle 3: = the secret message room

 

Side Corridor = Room below white castle? - yes

 

Side Corridor2 = Room to the right of the invisible maze? - yes

 

NumberRoom2 = the top room in the lower/right catacombs area

 

NumberRoom3 = The 2nd room in the black castle in game 1

 

(Note: these 2 you had reversed)

Top Entry Room2 = Green Dragon room in game 1 (this becomes the room to the right and below the invisible maze in game 2/3)

Top Entry room = Room to the LEFT and below Invisible Maze (2 screens below white castle)

 

Custom room 1 - 5 = Not currently used? yep...these are currently just placeholders for whatever room you allow the user to put in. And custom room #6 = Number room for graphics (which is why it appears in the assembly last)

 

Note: the two-exit room only appears in game 1 (1st black castle room)

Link to comment
Share on other sites

This area lists the room differences for game 1 and game 2/3...

 


* $FDB0 (in the template...I dunno what it is in the original binary offhand)


;Room differences for different levels (level 1,2,3)

RoomDiffs:

      .byte $10,$0F,$0F           ;Down from Room 01

      .byte $05,$11,$11           ;Down from Room 02

      .byte $1D,$0A,$0A           ;Down from Room 03

      .byte $1C,$16,$16           ;U/L/R/D from Room 1B (Black Castle Room)

      .byte $1B,$0C,$0C           ;Down from Room 1C

      .byte $03,$0C,$0C           ;Up from Room 1D (Top Entry Room)

 

I had a bit of trouble understanding this as well...but the way that it works is that whenever the program loads the direction for the next room and it has the high bit set (+$80), the program looks at the above table to get the correct room number it should be going to for that game variation. This might be difficult to implement in an editor, since the program will have to lay the correct 3 bytes in order depending on which $80 value appears on the list first (I hope that makes sense!). So $80 looks at the first line of 3 values, $83 looks at line 2, $86/line 3, $89/line 4, $8C/line5, $8F/line 6. If differences are going to be allowed, it must be absolutely clear that there is no possible way to access rooms that are not part of that game variation (or objects might wind up in "hyperspace" if the bat brings them there or you drop them off-screen). Pretty tricky for the editor to pull off!!

Link to comment
Share on other sites

Guest moonshot22

Hi, I was wondering if it would be possible to implement the following features into your editor?

 

1 A feature to change the speed of dragons

2 the ability to add another dragon to the game

3 the ability to add another castle

4 the ability add a feature such as a shield that renders the dragons unable to bite you(I saw this feature added to a very cool adventure clone for pc's)

5 Addition of music that plays when a dragon is chasing you might be cool.

 

I imagine that adding features 2-5 would take quite a bit more coding but hopefully it's in the realm of possability if you're willing to take it on. :)

I apologize if this gets posted twice--this is my first time on the board.

Link to comment
Share on other sites

See other post. The editor doesn't really "add" anything...it just lets you reorganize what is already there by changing bytes in the binary. For anything more complex, you'd need to do an assembly hack (which is beyond the scope of what this editor is aiming for - so that anyone can hack Adventure with no programming knowledge required).

Link to comment
Share on other sites

Here's something cool...

 

Using Channel2's Avalon as a guide (because I still don't know how display kernals work :lol: ) I increased the rom size to 8k...which allows enough space to put in the full 64 custom screens

 

-plus-

 

The screens can have more detail. Rather than reloading a new group of bytes every 16th scanline, it can be done every 8th for every one of those 64 screens (the bitmaps were 21 bytes each, now they are 42). And there was still enough room to put the signature back in with a lot of space left over (especially in the 2nd bank - where I took out all of the maps and graphic images).

 

Here's a quick demo. Since I was impatient to see if it would work, you won't notice anything different until you exit NORTH from the signature room. It's a smaller version of the inside of the white castle :) Going around and exiting that, you'll be in a long corridor that loops endlessly to the right until you go back up again.

 

If you go around this smaller area, go down, and then to the LEFT instead, the huge custom room area will be entered. All the rooms are currently just corridors (some with panels)...and I messed the panels up a bit, but you can see just how big the game could get. They all pretty much look the same because I copied/pasted the data over and over...but each one of those screens could have a unique 40x14 bitmap made for it.

 

Since you need to enter via secret message room, the entire area in this demo is off-limits to dragons and the bat (unless you bring them there).

 

Don't get lost!

 

Anyone care to make a slightly scaled-down version of Indenture? :)

a8k.zip

post-222-1081330186_thumb.jpg

Link to comment
Share on other sites

Not a very big update today, I've been busy most of the day with my REAL job. :( I've been working on optimizing the VB code, I've shaved about 400K from the last build. I've also begun adding Sprite changes as a feature. I'm not ready to release the new build yet, as the sprite editing function isn't complete, but I'm including a screenshot so you can check my progress. :)

 

Here's something cool...  

 

Cool Indeed. :D You never cease to amaze me, Nukey, that is awesome.

post-2143-1081376357_thumb.jpg

Link to comment
Share on other sites

BTW you can't use a zero as the first byte that's read...this will signal to the game that the sprite bitmap is over, and it won't be displayed

 

Yeah, actually I knew that, I just threw together a quick "dragon" so the screenshot picture wouldn't be blank. :) I'll make a note on the top of the sprite form so people don't make that mistake though, thanks for the reminder.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...