Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 4 5 [6] 7 8 ... 11   Go Down

Author Topic: Hacking: Open Contribution Thread  (Read 76776 times)

0 Members and 1 Guest are viewing this topic.

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Hacking: Open Contribution Thread
« Reply #75 on: May 23, 2012, 11:24:39 PM »

you appear to be missing a number of banners? (i.e. those which have automatic colouring)

http://www.ultimateamiga.co.uk/HostedProjects/GamesCorner/TheCryptOfBloodwych/Maps/bw_keep_3.jpg

^^ look in th efirst main room after the recruitment area... there are various signs i have shown as 'white' which are generated at random (or rather, seeded "random"...)

here is my stone-wall code, which includes banners and gems etc.

like before, it probably uses some modulo functions where it would be better using bit-test functions... sorry about that!


to read about how switches are defined, see also here:
http://www.ultimateamiga.co.uk/index.php/topic,8908.msg39953.html#msg39953
because the below code refers to a function which reads-in the relevant switch operation.

Code: [Select]
_DESC1:

   OPTION(11)=True



   LINE$(10)="STONE WALL"


If CC=>8 : Rem - has something on it

   OPTION(12)=True

      If CC=$8 or CC=$C : Rem - north
         LINE$(11)="FACING NORTH         "
 Else If CC=$9 or CC=$D : Rem - east
         LINE$(11)="FACING EAST          "
 Else If CC=$A or CC=$E : Rem - south
         LINE$(11)="FACING SOUTH         "
 Else If CC=$B or CC=$F : Rem - west
         LINE$(11)="FACING WEST          "
      End If


      If BB mod 4=0 : Rem Shelf
            LINE$(12)="SHELF         "

 Else If BB mod 4=1 : Rem Sign

Rem --- sign colours

         LINE$(12)="SIGN"
         OPTION(13)=True

       If AA=0 and BB=1 : Rem - seed sign
            LINE$(13)="GENERATED COLOUR"
  Else If AA=0 and BB=5 : Rem - serp sign
            LINE$(13)="SERPENT        "
  Else If AA=0 and BB=9 : Rem - dragon sign
            LINE$(13)="DRAGON       "
  Else If AA=0 and BB=13 : Rem - moon sign
            LINE$(13)="MOON          "
  Else If AA=1 and BB=1 : Rem - chaos sign
            LINE$(13)="CHAOS         "
  Else If BB mod 4=1 : Rem -- remainders are wall text
            LINE$(13)="SCROLL"+Str$((((AA*16)+BB)/4)-4)
   End If


 Else If BB mod 4=2 : Rem Switch

      OPTION(13)=True

         If(AA*16)+BB>=$7
             LINE$(12)="SWITCH"

                         If BB=$2 or BB=$A : Rem switch unused
                     LINE$(14)="LIT"
                   Else If BB=$6 or BB=$E : Rem switch used
                     LINE$(14)="DIM"
                    End If

                OPTION(14)=True

                EE=(AA*16)+BB
                SWITCH=(EE/8)-0
                LINE$(13)="REFERENCE:"+Str$(SWITCH)

   ' now lets talk about what the switch does

         SWITCHTYPE= Fn SWITCHTYPE
                  If SWITCHTYPE=0 : RESULT$="NO EFFECT"
             Else If SWITCHTYPE=2 : RESULT$="REMOVE"
             Else If SWITCHTYPE=4 : RESULT$="TOGGLE WALL"
             Else If SWITCHTYPE=6 : RESULT$="OPEN METAL DOOR"
             Else If SWITCHTYPE=8 : RESULT$="ROTATE WALL"
            Else If SWITCHTYPE=10 : RESULT$="TOGGLE PILLAR"
            Else If SWITCHTYPE=12 : RESULT$="PLACE PILLAR"
            Else If SWITCHTYPE=14 : RESULT$="ROTATE WOODEN"
                               Else RESULT$="INVALID"
             End If

         LINE$(16)=RESULT$
         LINE$(17)="X: "+Right$(Hex$( Fn SWITCHX+$100),2)+" Y: "+Right$(Hex$( Fn SWITCHY+$100),2)
            OPTION(16)=True
            OPTION(17)=True




      Else : LINE$(12)="SWITCH"
             LINE$(13)="EMPTY" : End If

 Else If BB mod 4=3 : Rem crystal hole

         LINE$(12)="SOCKET"
         OPTION(13)=True
         OPTION(14)=True

     EE=(AA*16)+BB

       If EE>=$0 and EE<=$7 : Rem -- serpent
            LINE$(13)="SERPENT"

  Else If EE>=$8 and EE<=$F : Rem -- chaos
            LINE$(13)="CHAOS"

  Else If EE>=$10 and EE<=$17 : Rem -- dragon
            LINE$(13)="DRAGON"

  Else If EE>=$18 and EE<=$1F : Rem -- moon 
            LINE$(13)="MOON"

  Else If EE>=$20 and EE<=$27 : Rem -- grey 
            LINE$(13)="GREY"

  Else If EE>=$28 and EE<=$2F : Rem -- bluish
            LINE$(13)="BLUISH"

  Else If EE>=$30 and EE<=$37 : Rem -- brown
            LINE$(13)="BROWN"

  Else If EE>=$38 and EE<=$3F : Rem -- tan
            LINE$(13)="TAN"

  Else If EE>=$40 and EE<=$FF : Rem -- everything else that isnt
            LINE$(13)="INVALID"

   End If

      If BB=$3 or BB=$B : Rem --- if full
            LINE$(14)="FULL"

 Else If BB=$7 or BB=$F : Rem -- if empty

            LINE$(14)="EMPTY"
  End If

  End If


Else
         LINE$(11)="PLAIN"

End If

Return
« Last Edit: May 23, 2012, 11:31:25 PM by Hungry Horace »
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

MadMunky

  • Forum Mod
  • A600
  • *****
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Hacking: Open Contribution Thread
« Reply #76 on: May 24, 2012, 07:12:07 AM »

Good spot, missed that group off..



Also I'm looking into a new features which will let me support real time map editing in the Amiga/ST Versions when played on a emulator, also this will allow you to have a real time map which updates the player location :)
« Last Edit: May 24, 2012, 07:16:34 AM by MadMunky »
Logged

MadMunky

  • Forum Mod
  • A600
  • *****
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Hacking: Open Contribution Thread
« Reply #77 on: May 25, 2012, 10:03:27 AM »

Real Time Player tracking is now working for Steem, I need to clean up the code and decide if I want to read all of the ST Memory so I can update the whole map (open/closed doors etc) then once this is all working nicely I'll add in a WinUAE option

Logged

MadMunky

  • Forum Mod
  • A600
  • *****
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Hacking: Open Contribution Thread
« Reply #78 on: May 26, 2012, 01:13:22 PM »

I got real time tracking working with winaue also.

Horace any chance you want to share the source of your editor so I can try add all the same features as I can see any reason why I cant make my version support the same + Atari/PC support also

Had to add the option for winuae to rescan the memory as sometimes it will find the data in the HDD image not the live game :)

« Last Edit: May 27, 2012, 04:03:43 PM by MadMunky »
Logged

MadMunky

  • Forum Mod
  • A600
  • *****
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Hacking: Open Contribution Thread
« Reply #79 on: May 28, 2012, 02:58:21 PM »

Not sure if you guys know this but the Level Data is always 5122 Bytes apart

So MOD0 + 5122 bytes = Serpent Tower Data

This is the same on Atari and Amiga
Logged

MadMunky

  • Forum Mod
  • A600
  • *****
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Hacking: Open Contribution Thread
« Reply #80 on: May 29, 2012, 02:24:45 PM »

So live mapping is now working (read-only atm) but with the live data there is some different values have you seen these two before?

01 43
00 43

This is normally a Pillar/Bed but do you know what that 4 Means?

Also do you have any code for the different doors as I still need to fix this.

*UPDATE* Ah its cause there is items on the floor :)
« Last Edit: May 29, 2012, 02:38:15 PM by MadMunky »
Logged

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Hacking: Open Contribution Thread
« Reply #81 on: May 29, 2012, 05:22:55 PM »

i will upload the source for you when i get the chance :)

looking at map data as AB CD, in your example C = 4

bits are switched on/off in this value, to show what is 'occupying' the space. You will generally only see this when you look at 'live' data

this is entirely from memory, but i *think*....

bit 0 (usually C=1 ) is used for a door lock , bit 2 (C=4) you have just said is an object....   bit 3 (C=8) iirc is a person (monster or champion).... that leaves bit 1 (C=2) must be a spell in that location. e.g. a fireball that has been launched or similar.

obviously these can then also be combined if several of them are true!


what door code are you after? metal doors? i posted this already... :)

http://www.ultimateamiga.co.uk/index.php/topic,8806.msg44182.html#msg44182
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

MadMunky

  • Forum Mod
  • A600
  • *****
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Hacking: Open Contribution Thread
« Reply #82 on: May 30, 2012, 09:00:09 PM »

Cheers again Horace not sure how i missed the door code :s

Doors now working :)
Logged

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Hacking: Open Contribution Thread
« Reply #83 on: June 06, 2012, 10:41:40 PM »

as promised, attached is the editor source code. i cant be 100% it's the latest version, but it has all of the map code (converting to both text, and AMOS style draw commands) in it.

I'm not sure there is much 'extra' to learn from it... i did try to create a "standard" input/output file format that could potentially become cross-platform (the .map and .obj files that it creats be substituted directly into the PC version for example) ... however, when i tried to put my new levels into the ST version, it didnt want to run - this may be related to the ST versions copy protection though. 


to answer your other PM question MM, i have never created any remake of BW... i have some basic wall-drawing code for AMOS but i didnt write it, and it isnt very good tbh!! (for map/editing purposes your ST/UAE plugins are far better!!)

anyway, hope this helps, and sorry for the delay - kind of been busy of late!!
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

MadMunky

  • Forum Mod
  • A600
  • *****
  • Karma: 2
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Hacking: Open Contribution Thread
« Reply #84 on: June 07, 2012, 08:06:36 AM »

Thanks Horace, just taken a quick read though and its amazing how similar we have done things but I cant see any code about objects in the file which is what I was really after

Also did you have any of the graphics still like monster images/object images as all the ones I ripped where from the PC version so will need to redo them otherwise, any chance in your Bloodwych font saves me having to make it :)

I'll make sure your not reading any map data I've missed and then on that side we should be same, do you happen to know if the location of the Bloodwych data is different in different version of the Amiga disks/HDD version as I'll try add support to import/export as many formats as possible
Logged

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Hacking: Open Contribution Thread
« Reply #85 on: June 07, 2012, 08:54:37 AM »

there should be object code, because there is an object stack-editor and a way to place them.

they arent 'displayed' on the map though. i will check the most recent code for you later today if i can :)

there are definitely two different versions on the amiga, with different offsets for the data - i think they may have fixed a couple of bugs (like where some objects on the floor are displayed in front of the wrong things, like people's feet) .... not sure of the exact changes!!

i will also dig out the monster /character graphics for you, but the font was made by my brother, so i may have to simply 'draw' all of the font-characters onto an image file for you!!
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Hacking: Open Contribution Thread
« Reply #86 on: June 07, 2012, 11:01:25 AM »

ok, so it seems you were right - that code was quite out of date!

I have exported the code from the last version i had - you should find this more useful i hope!!


edit: all monsters / characters .gif attached also ;)

edit 2: and now the font image thing .... although you may need a 'pure' output, this is just a screen grab from OSX... let me know if you need it 'clean'

« Last Edit: June 07, 2012, 03:20:53 PM by Hungry Horace »
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

copse

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 30
Re: Hacking: Open Contribution Thread
« Reply #87 on: August 13, 2012, 10:36:30 PM »

Real Time Player tracking is now working for Steem, I need to clean up the code and decide if I want to read all of the ST Memory so I can update the whole map (open/closed doors etc) then once this is all working nicely I'll add in a WinUAE option
Any chance you can open source your map viewer code?  Don't worry about clean up, everyone's code is a mess ;)  It'd be another resource for the rest of us that might want to spend time bringing Bloodwyche out of the darkness.  I know I've tried disassembling it several times, but unfortunately given up.
Logged

Hungry Horace

  • Amorphous Blue-Blob Man
  • Site Admin
  • A4000T
  • ******
  • Karma: 307
  • Offline Offline
  • Gender: Male
  • Posts: 3,364
  • Don't forget... Ameboid's need love too!
    • AUW
Re: Hacking: Open Contribution Thread
« Reply #88 on: August 16, 2012, 08:47:45 PM »

Any chance you can open source your map viewer code?  Don't worry about clean up, everyone's code is a mess ;)  It'd be another resource for the rest of us that might want to spend time bringing Bloodwyche out of the darkness.  I know I've tried disassembling it several times, but unfortunately given up.

shame - i'd love to see the Amiga Bloodwych fully disassembled and commented.... then we could start thinking about adding new functions, switches, objects, etc :D

i can dream!!
Logged
Quote from: KillerGorilla
because winuae is made of code and your amiga is made of stuff

copse

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 30
Re: Hacking: Open Contribution Thread
« Reply #89 on: September 23, 2012, 01:38:43 AM »

shame - i'd love to see the Amiga Bloodwych fully disassembled and commented.... then we could start thinking about adding new functions, switches, objects, etc :D

i can dream!!
10 grand and I'll disassemble it and provide you with portable C source code.  Maybe even an Android port.  Too many other things to do, otherwise.
Logged
Pages: 1 ... 4 5 [6] 7 8 ... 11   Go Up
 

TinyPortal 2.2.2 © 2005-2022