Author Topic: Progress on Project MONOLITH... some technical mumbo jumbo inside  (Read 4377 times)

nodtveidt

  • Guest
For all of you waiting for updates on this project... I'm bringing in a few updates now.


This is the "dark castle" tileset. A lot of detail for so few colors.


A quick test of the shiny new Shift-JIS based dynamic text render code. All of the text is stored as Shift-JIS characters and is displayed using dynamic tile RAM updating; the font itself is pulled from the system card in realtime. It turned out to be less memory-intensive to just store all the text (even the English text) as Shift-JIS sequences rather than to use a lookup table (since there's so little actual text in the game).

In order to pull off the dialogue, I wrote a script "compiler" specifically for this project that uses my "famous" (haha) ETX scripting format. ETX (Etended TeXt) is a scripting format I developed in the late 1990s for RPG dialogue. It looks a bit like HTML. For the image above, this is the code:

Code: [Select]
;test script!
=english
%0
This is a test
script! LOGIC!
<END>
The ; line is a comment line, the = line tells the compiler which language to process, and the % line is an "entry point". The compiler generates the compiled script and a text file that can be copied 'n pasted into the source code that contains the entry points for each dialogue block. This is the method I should have used for MSR, but by the time I came up with it, it was way too late.

So... yeah... that's what's up right now. Oh, and the village shown in the second image has a whole bunch of women wandering around... lol. :) Only one is shown here. Their code is handled by the same code that went into the action scenes; it's based on some code Arkhan used for Insanity that is able to handle a large amount of data way faster than HuC can do by itself.

A new video will be put out once the village is more fleshed out.

nodtveidt

  • Guest
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #1 on: December 25, 2011, 03:12:49 PM »
OK here's another quick test shot from the script function.



Yeah, I put a chick on the roof. :) The main thing of this shot was... I took a count of the unique colors... 86 in total. 86 freakin' unique colors. As Fragmare said before... the PCE is a palette monster. :)

nectarsis

  • Hero Member
  • *****
  • Posts: 3607
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #2 on: December 25, 2011, 03:14:35 PM »
REALLY digging the "dark castle" tileset pic.
My Blogger profile with all my blogs of wonderment:<br><a href="http://www.blogger.com/profile/08066967226239965436" class="bbc_link" target="_blank">http://www.blogger.com/profile/08066967226239965436</a>

roflmao

  • Hero Member
  • *****
  • Posts: 4830
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #3 on: December 25, 2011, 03:38:42 PM »
Rover, you are a god. Wow, very impressive stuff.

cabbage

  • Sr. Member
  • ****
  • Posts: 342
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #4 on: December 25, 2011, 04:22:13 PM »
Looks like the project is progressing nicely! Those screenshots are excellent and now I'm looking forward to the new video. Thanks for sharing and especially for including "some technical mumbo jumbo" :D

HercTNT

  • Hero Member
  • *****
  • Posts: 1460
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #5 on: December 25, 2011, 04:30:05 PM »
completely agree! I love the sliver moon in the back ground, its a really nice touch.

nodtveidt

  • Guest
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #6 on: December 26, 2011, 03:36:46 AM »
I've been verifying the character set lookup table inside the compiler... so far so good. Had to make a few changes, and made some minor code tweaks in the script decoder inside the game code. I was running into a weird VRAM usage issue that hopefully doesn't cause any problems when it comes to doing the Japanese text. It's not a problem for the English text since English tends to use a lot of spaces, but such is not the case in Japanese so hopefully I can figure out a way to deal with the problem if it arises. Starting at a lower VRAM address will probably solve it.

Man... I really should have done something like this for MSR... oh well. Lesson learned. :) Now, changing text is just a matter of making changes to the script file, running it through the compiler, then copy-n-pasting the entry point list into the game code. Freakin' easy peasy. With MSR, the script file gets changed too, but then I have to manually go into MSR's source code and update every f*cking text pointer by hand. This can take hours, depending on how much data got moved around.

Anyway, today I'll be adding more of the control set to the script compiler, and will probably finish the NPC collision stuff so it will actually work like a real dialogue system (right now, you just press SELECT to bring up a pre-set dialogue sequence... works great for testing but is obviously useless in a real game). I also plan on finishing at least the outside of the village. NPC movement is kinda like Cadash meets Zelda 2... some NPCs move in pre-set patterns (like in Cadash), and some just walk and walk and walk and if they go off the map bounds, they just respawn on the other side (like in Zelda 2).

TheOldMan

  • Hero Member
  • *****
  • Posts: 958
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #7 on: December 26, 2011, 04:15:51 AM »
Quote
Man... I really should have done something like this for MSR... oh well. Lesson learned. Smile
Only one of many, I'm sure :)

Quote
changing text is just a matter of making changes to the script file, running it through the compiler, then copy-n-pasting the entry point list into the game code

Why not make the compiler dump the entry point list to a text file, and include it in the source?
(Just Curious).

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #8 on: December 26, 2011, 04:37:56 AM »
how bout all the fancy databloblolomgsomanyenemies stuff? :)
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.

nodtveidt

  • Guest
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #9 on: December 26, 2011, 04:39:25 AM »
Quote
Why not make the compiler dump the entry point list to a text file, and include it in the source?
(Just Curious).
They reside in different directories. When the compiler is finished, I'll probably copy it over to the game directory, but for now, this is a terribly minor detail and it sure beats the snot out of the method used for MSR. :) It already dumps the entry point list to a text file. I could probably just copy the file itself into the game directory to save an extra 2 seconds, hehe.

nodtveidt

  • Guest
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #10 on: December 26, 2011, 05:07:00 AM »
OK... monkeying around a bit more, I've added bold text.



It works by taking each of the 32 bytes in the font buffer, then calculating a shifted value in both directions, then ORing the results back onto the data.

Code: [Select]
for(checkx1=0;checkx1<32;checkx1++)
{
highbyte = bytebuffer[checkx1] << 1;
lowbyte = bytebuffer[checkx1] >> 1;
bytebuffer[checkx1] = bytebuffer[checkx1] | highbyte | lowbyte;
}
which works ok. The only problem with this is that the text is stored character-by-character in the buffer, so bits on the edges are lost, producing some very obvious seams. This can be remedied by using the buffer as a per-line buffer rather than a per-character buffer, but the amount of work required to get the pixels onscreen goes up by quite a bit. However, doing that also opens the possibility of adding italics as well, so it'll be implemented at some point here.
« Last Edit: December 26, 2011, 05:08:53 AM by The Old Rover »

nodtveidt

  • Guest
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #11 on: December 26, 2011, 05:42:59 AM »

Figured it might be useful to include the ability for English text to directly specify Shift-JIS characters. Might have limited use, but for any characters which aren't included in the supported 95 character Roman lookup table, it might serve a purpose. The Japanese script parser already reads strings of Shift-JIS sequences.

TheOldMan

  • Hero Member
  • *****
  • Posts: 958
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #12 on: December 26, 2011, 05:48:33 AM »
Quote
I could probably just copy the file itself into the game directory to save an extra 2 seconds, hehe.
Or you could just specify where the file is in the include line....
(ie, .include "../dir1/dir2/file.txt" ).
It does work in Huc, but may take a bit of experimenting to get the right location. We do it to keep graphics and such out of the way :)

nodtveidt

  • Guest
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #13 on: December 26, 2011, 05:55:00 AM »
Yeah, I could probably do that. I normally store things in subdirectories of the project directory... only source files go in the project directory proper. The script file, for example, goes in ./binscripts with all the other datablob-type stuff. Keeps things organized better if I have to move project folders around for backups or whatnot.

Arkhan

  • Hero Member
  • *****
  • Posts: 14142
  • Fuck Elmer.
    • Incessant Negativity Software
Re: Progress on Project MONOLITH... some technical mumbo jumbo inside
« Reply #14 on: December 26, 2011, 06:11:42 AM »
Insanity was one big folder of shit for awhile.

Then, that stopped right away and now it doesn't happen anymore. lol

iirc, it uses / not \ even if you're on Windows.  :)
[Fri 19:34]<nectarsis> been wanting to try that one for awhile now Ope
[Fri 19:33]<Opethian> l;ol huge dong

I'm a max level Forum Warrior.  I'm immortal.
If you're not ready to defend your claims, don't post em.