Jump to content

Photo

TI-99/4a disk-based CRPG


226 replies to this topic

#1 adamantyr ONLINE  

adamantyr

    Stargunner

  • 1,125 posts

Posted Sat Feb 6, 2010 12:23 PM

(Copied and reposted from Homebrew Discussions, now that we have a 99'ers board on Atari Age)

Greetings all. I decided I should make a semi-permanent topic about my ongoing project.

Some lengthy background...

While finishing my C.S. degree in college, I was overwhelmed with a desire to dig out my old computer from the basement and fire it up again. The old hardware actually still worked, although I had to get the keyboard replaced. The old membrane-driven keyboards decay over time. The mechanical in there now that should outlast the silicon.

After playing around with it for awhile, and finding some great resources on the web I completely lacked in the old days, I decided I wanted to do some vintage assembly projects.

Why? Well, I blame the fact I hadn't programmed in ten years, and that hobby-wise, I was still back there, a 13-17 year old, desiring to write a game but lacking the skills, patience, and knowledge to do so.

My first project was to convert a game written in BASIC to pure assembly. I learned a lot about the process by doing so, and I was amazed that the complete assembly program was only about 5k, roughly half the size of the BASIC listing. And WAY faster.

My second project, which is incomplete, was to covert the famous "Eastern Front: 1941" game for the Atari 8-bit home computers to my TI. I got the bemused permission from Chris Crawford himself to do so. (He remarked that the project was rather quixotic.) I had a complete listing of the program in 6502 assembly, with a few comments thrown in.

I got a decent amount of the way into it before stopping. Part of the problem was it just wasn't that fun converting someone else's work. The other was trying to understand how the A.I. worked was maddening from the assembly perspective... and I realized I could never be certain I had captured the original game play or not. I may go back and finish this one later.

Having decided to set out on my own original project instead, it was a quick decision as to what I wanted to make: a disk-based CRPG.

The TI-99/4a lacked a great deal of the more sophisticated software of other computers of its time, because very few 99'ers owned disk systems when it was still actively supported. Complicating matters was the unique assembly language it had. Unlike the Apple, Commodore, and Atari systems which all had 6502 chips, porting programs was much more difficult.

So all of the CRPG greats like Wizardry, Ultima, Might & Magic, were nowhere to be found on the TI... it had a very good dungeon crawler called Tunnels of Doom, but that was it. A later developer created a decent clone of Phantasie called Legends, but it ran in Extended BASIC and was rather small-scale, about comparable to Ultima I in scope and complexity.

Anyway, it's been five years since I started... the project's been interrupted by job hunting, loss of interest, emulator problems, design issues, and so forth. I'm fired back up recently thanks to a brisk emulation development curve, but work slowed me down a bit... I'm presently working on the combat engine controls, a terrible task I've put off for far too long.

Feel free to read up on my efforts, and offer your comments and criticisms. (The two I usually hear are "why in assembly?" and "why waste time on a vintage system?")

Posted Image
Preliminary title screen

First project: TI Trek

Second project: Eastern Front 1941

CRPG Page (updated seldomly)

Ongoing Development Blog


Adamantyr

#2 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,246 posts
  • Location:Cookeville, TN

Posted Sat Feb 6, 2010 12:40 PM

Glad you're here. :). I hope we can be of some service to you and I have to say that your title screen looks lovely!!! Check out my "Legend of Beryl Reichardt" thread.... I'm nowhere near as far along as you are, but I think we are running on similar tracks here. I am creating an XB/AL hybrid RPG, "disk based", and intend for the scope of it to be fairly large. With Classic99 as my emulator of choice, the sky's the limit on what can be accomplished. As long as it can reside in 360k of space, all is well. The majority of the memory-hogging stuff will be in assembly, and disk access will be widely used. Please keep us posted on your progress... I will certainly be monitoring your posts, and I am certainly glad to see you posting here!

#3 The Codex OFFLINE  

The Codex

    Dragonstomper

  • 573 posts
  • Location:Richmond, VA

Posted Sat Feb 6, 2010 12:50 PM

Woot, welcome to the TI space, man! Been following your blog regularly and the game remains a fascinating project. Hurrah for TI RPGs! :love:

#4 retroclouds OFFLINE  

retroclouds

    Stargunner

  • 1,530 posts
  • Location:Germany

Posted Sat Feb 6, 2010 1:06 PM

Feel free to read up on my efforts, and offer your comments and criticisms. (The two I usually hear are "why in assembly?" and "why waste time on a vintage system?")


Because programming TMS9900 assembly language is sexy and I rather waste my time on a vintage system as hanging in
front of the TV all evening :D

Welcome! I've been reading your blog for a while now and find it very interesting.
Looking forward seeing how your CRPG develops ;)

#5 adamantyr ONLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,125 posts

Posted Sat Feb 6, 2010 1:20 PM

Also, I recently moved my blog to Wordpress, after Blogspot decided not to support FTP publishing anymore. Like I'd trust Google's servers now... the reason they got hacked was they didn't bother to upgrade past IE6 and an older version of Adobe on their servers. And the hackers KNEW it and wrote a zero-day hack to deliberately target them.

The target controls are going to be really a bother to code and debug. I think I'm in the home stretch; I just need to do the actual controls for moving the cursor about or scrolling a menu. As a bonus, I get the item/spell handling for travel for free, since it and combat use the same system.

Adamantyr

#6 InfernalKeith OFFLINE  

InfernalKeith

    Dragonstomper

  • 634 posts
  • Location:Toledo, OH

Posted Sat Feb 6, 2010 3:31 PM

Also, I recently moved my blog to Wordpress, after Blogspot decided not to support FTP publishing anymore. Like I'd trust Google's servers now... the reason they got hacked was they didn't bother to upgrade past IE6 and an older version of Adobe on their servers. And the hackers KNEW it and wrote a zero-day hack to deliberately target them.

The target controls are going to be really a bother to code and debug. I think I'm in the home stretch; I just need to do the actual controls for moving the cursor about or scrolling a menu. As a bonus, I get the item/spell handling for travel for free, since it and combat use the same system.

Adamantyr




Adam,

Very happy to see you surface here! I've had your blog bookmarked since well before I started my own programming 'rebirth,' and I check it regularly for updates.

I hope this forum inspires you; it definitely seems to have kicked off a little bit of a frenzy of activity.

#7 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,246 posts
  • Location:Cookeville, TN

Posted Sat Feb 6, 2010 5:04 PM

Any chance we can see some in-game screen shots, or is this an "under-wraps" project? :)

#8 adamantyr ONLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,125 posts

Posted Sat Feb 6, 2010 7:40 PM

Any chance we can see some in-game screen shots, or is this an "under-wraps" project? :)


I have some on my blog site. Whenever I hit an "interesting" update stage where there's something visual to share I'll put it up.

Adamantyr

#9 matthew180 OFFLINE  

matthew180

    River Patroller

  • 2,382 posts
  • Location:Castaic, California

Posted Wed Feb 10, 2010 7:52 PM

Feel free to read up on my efforts, and offer your comments and criticisms. (The two I usually hear are "why in assembly?" and "why waste time on a vintage system?")


Because programming TMS9900 assembly language is sexy and I rather waste my time on a vintage system as hanging in
front of the TV all evening :D

Welcome! I've been reading your blog for a while now and find it very interesting.
Looking forward seeing how your CRPG develops ;)


I second retroclouds' comments. Anyone who asks "why assembly" really has no clue, which is also probably why they ask the second question.

I have also been watching your project since you started it, and I read the pages you set up a few times a year. The review of CRPG's you did is awesome, and I like reading about your progress. Personally I like your original page better than the blog format you moved to, but I also like Wordpress so I'll have to go check out the changes.

Keep up the good work! Can't wait to play the game.

Matthew

#10 adamantyr ONLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,125 posts

Posted Thu Feb 11, 2010 10:48 AM

I have also been watching your project since you started it, and I read the pages you set up a few times a year. The review of CRPG's you did is awesome, and I like reading about your progress. Personally I like your original page better than the blog format you moved to, but I also like Wordpress so I'll have to go check out the changes.


Yeah, I wasn't happy to switch blog sites, but Blogspot left me little choice. Their servers or the highway. I chose the highway. Wordpress does have decent tools, and the spam filter's already proven itself. My only complaint is their "themes" are not edit-friendly; despite changing background or font for the entry of a given tag, NO change on the blog appeared.

My original site is nice, I would like to write more articles to put up on it. However, it's not a blog, and a blog structure works better. I'm not particularly keen on investigating writing my own blog software; it's a bit of time and expense, and why reinvent the wheel? I figure when I hit a major milestone I'll put up a new article... preferably about the combat engine.

Adamantyr

#11 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,246 posts
  • Location:Cookeville, TN

Posted Thu Feb 11, 2010 10:51 AM

Ooooh.... Combat engines... :). Can't wait to read up on that.... It's really the logic that gets me hung up there... Deciphering how to randomize all the different variables into tiny windows of acceptable output.... I'm working on it though. :)

#12 adamantyr ONLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,125 posts

Posted Thu Feb 25, 2010 1:16 PM

Ooooh.... Combat engines... :). Can't wait to read up on that.... It's really the logic that gets me hung up there... Deciphering how to randomize all the different variables into tiny windows of acceptable output.... I'm working on it though. :)


Yeah, combat engines are TOUGH. I've ran the gambit from rough clone of other CRPG's like Avernum to actually crafting my own system from absolute scratch. Mainly because the complexities of assembly language dictated it be so. With such a small memory space, you need to prioritize what you really want. Complicated simulationist mechanics like a lot of tabletop RPG's have is just not worth the hassle.

I've got the combat controls done, now it's translating those orders into on-screen action. I'm having to step back and do a little re-design here and there; I hadn't had all the mechanics fully worked out. It will be awhile before I have a full "playable" combat engine.

Adamantyr

#13 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,246 posts
  • Location:Cookeville, TN

Posted Thu Feb 25, 2010 1:37 PM

Well, I look forward to watching your progress and learning what I can from it. :). Thanks for your suggestions for my game as well.

#14 matthew180 OFFLINE  

matthew180

    River Patroller

  • 2,382 posts
  • Location:Castaic, California

Posted Thu Feb 25, 2010 1:49 PM

Adamantyr, can you describe briefly what some of the complexities are? I'm assuming the combat will be turn based, and in that I'm not understanding where all the complexity comes from. Of course I've never written such a thing, so it could just be that the problem does not look hard until you try to solve it.

Matthew

#15 adamantyr ONLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,125 posts

Posted Thu Feb 25, 2010 3:37 PM

Adamantyr, can you describe briefly what some of the complexities are? I'm assuming the combat will be turn based, and in that I'm not understanding where all the complexity comes from. Of course I've never written such a thing, so it could just be that the problem does not look hard until you try to solve it.


Well, if you look at a lot of old CRPG's from the late 70's/early 80's, many of them are basically just a clone of the Dungeons & Dragons rules systems. For example, nearly every one has ability scores for strength, dexterity, etc. I think a lot of old game designers not only didn't know how to really craft their own systems, they also were afraid if they deviated too much, people would say "that's not an RPG!" and not play it. Early marketing woes, I suppose.

So, when I first sat down and sketched out a character system, I had something pretty advanced with ability scores, a complex skill system, and no real classes beyond what was defined in the mechanics. The problems became apparent, when I actually started looking at the code.

Combat resolution in almost all CRPG's always boils down to two numbers; an attacker and a defender score. If one is greater than the other, an attack either succeeds or fails.

So let's look at a system example:

We have a system multiple ability scores like Strength (STR) and Dexterity (DEX). So, let's say you have a melee attack. You decide it's Strength + half the Dexterity score + character level + a class bonus for the attempted hit.

In BASIC, this would be calculated like this:
HIT = INT(STR + LVL + CLASS_BONUS + (DEX/2))

In assembly, though, things get much more complicated:
       MOV @STR,R0
       A   @LVL,R0
       A   @CBS,R0
       MOV @DEX,R1
       SLA R1,1
       A   R1,R0
       MOV R0,@HIT

Consider that for a single attack type, I just spent about 10 bytes in memory variables and 24 bytes in opcodes. Doesn't seem so bad, right? Wait a moment... how are those memory variables getting filled? Let's say I got all my player data stored in an array that's 80 bytes with static positions:

* Level - Offset 2 (byte)
* Strength - Offset 6 (byte)
* Deterity - Offset 7 (byte)
* Class bonus (melee) - Offset 20 (byte)
* W80 - Data word, value 80
       MOV  @PACTIVE,R0
       MPY  @W80, R0
       MOVB @CHRDAT+2(R1),R0
       SRL  R0,8
       MOV  R0,@LVL
       MOVB @CHRDAT+6(R1),R0
       SRL  R0,8
       MOV  R0,@STR
       MOVB @CHRDAT+7(R1),R0
       SRL  R0,8
       MOV  R0,@DEX
       MOVB @CHRDAT+20(R1),R0
       SRL  R0,8
       MOV  R0,@CBS

Well, that's looking a little more involved. Of course, this is a pretty linear and inefficient way to read static data in. I could make the process simpler by doing it like this:

MELEEH DATA 4,2,6,7,20
...
       MOV  @PACTIVE,R0
       MPY  @W80, R0
       MOV  @MELEEH,R3
       LI   R4,MELEEH+2
       CLR  R0
MLOOP  MOV  *R4+,R2
       LI   R5,CHRDAT
       A    R2,R5
       MOVB *R5,R6
       SRL  R6,8
       A    R6,R0
       DEC  R3
       JNE  MLOOP
       MOV  R0,@HIT

This method is data-driven, and while not as easy to read, is better structured for the computer. Ideally, values that have synergistic qualities should be kept close together or in an order that makes sense for the computer, NOT the user.

Except... I didn't get my dexterity divided it half! Argh! Now I ask myself, is it REALLY worth the trouble to create this system? Or maybe find something that's more agreeable to the language and platform?

More to come...

Adamantyr

Edited by adamantyr, Thu Feb 25, 2010 3:41 PM.


#16 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,246 posts
  • Location:Cookeville, TN

Posted Thu Feb 25, 2010 4:44 PM

That's pretty in-depth stuff man! :). Can't wait to read more.

#17 adamantyr ONLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,125 posts

Posted Wed Mar 3, 2010 10:52 AM

I've put up a video recorded in Classic99 on my blog. However, I've had at least one complaint that nothing could be seen. Is anyone else having difficulty viewing it?

It's at http://www.adamantyr.com/blog

Thanks,
Adamantyr

#18 InfernalKeith OFFLINE  

InfernalKeith

    Dragonstomper

  • 634 posts
  • Location:Toledo, OH

Posted Wed Mar 3, 2010 11:01 AM

I've put up a video recorded in Classic99 on my blog. However, I've had at least one complaint that nothing could be seen. Is anyone else having difficulty viewing it?

It's at http://www.adamantyr.com/blog

Thanks,
Adamantyr



Not working for me. I'm seeing the same little 'lightshow' I see when I play a CD through Windows Media Player. :(

#19 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,246 posts
  • Location:Cookeville, TN

Posted Wed Mar 3, 2010 11:03 AM

Oh hell yes, man!!! I love it!!! You know what you should do? Upload that sucker to youtube and post it here. You can post it right to this forum.

I really like the user interface... It's very involved, but simple at the same time. Eric Seablade looks like a bad MoFo. =) Great stuff, keep up the great work!

#20 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,246 posts
  • Location:Cookeville, TN

Posted Wed Mar 3, 2010 11:07 AM

I just subscribed to your blog... now I won't miss an entry. =) BTW, is there a way to see all subscribers? I'm new to this blog thing, and if I wanted to view who's watching the feed for my blog, how would I do that?

Edited by Opry99er, Wed Mar 3, 2010 11:07 AM.


#21 The Codex OFFLINE  

The Codex

    Dragonstomper

  • 573 posts
  • Location:Richmond, VA

Posted Wed Mar 3, 2010 11:21 AM

Video's not working here either, Adamantyr. It's all black, sorry.

#22 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 8,246 posts
  • Location:Cookeville, TN

Posted Wed Mar 3, 2010 11:32 AM

Adamantyr--- I read in your blog that you use Excel spreadsheets for your array maintenance... I've just started working on my array variables and was wondering if there was a better way to maintain them other that notepad... Thanks for the tip. Also, would you care to attach a small example of your spreadsheet to the list here? Seeing how you handle that stuff would be a great help to me. :). If you'd rather not, I totally understand.

#23 Christophero Sly OFFLINE  

Christophero Sly

    Quadrunner

  • 5,000 posts

Posted Wed Mar 3, 2010 11:52 AM

The video only gives me about 5 secs. of this:

Attached File  Vid.png   33.66KB   8 downloads

#24 adamantyr ONLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,125 posts

Posted Wed Mar 3, 2010 12:54 PM

The video only gives me about 5 secs. of this:

Attached File  Vid.png   33.66KB   8 downloads


If you're using Firefox, be sure to download the Firefox Windows Media Player plug-in.

Meanwhile, you can download the video directly from here: http://www.adamantyr...deo/Combat1.avi

If the raw file doesn't work, then it's probably some codec issue or something. I recorded it through Classic99, then used AVS4You's Video editor to convert it to MPG4 format.

Adamantyr

Edited by adamantyr, Wed Mar 3, 2010 12:54 PM.


#25 adamantyr ONLINE  

adamantyr

    Stargunner

  • Topic Starter
  • 1,125 posts

Posted Wed Mar 3, 2010 3:10 PM

Adamantyr--- I read in your blog that you use Excel spreadsheets for your array maintenance... I've just started working on my array variables and was wondering if there was a better way to maintain them other that notepad... Thanks for the tip. Also, would you care to attach a small example of your spreadsheet to the list here? Seeing how you handle that stuff would be a great help to me. :). If you'd rather not, I totally understand.


Well, Excel files are hard to share out. Like any Office file, they can have macros embedded in them that could be a security hazard. And any screen shot or truncated file I attach has to be stored somewhere on the web; it won't let me directly embed them.

Basically, I use a spreadsheet to space out the individual bits/bytes with a numeric index. Then I can use comments and a text line underneath it to indicate blocks of array data.

I also use a sheet to track what's going on in VDP memory. I make use of the DEC2HEX function in Excel to calculate the hexidecimal values for easier tracking purposes. In the pre-2007 versions of Office, you may need to activate the scientific module to have access to them.

Typically, I'll have a few worksheets to store raw data, then I'll have a sheet that compiles it into a series of hex strings. I can then use Hex Workshop (a very useful stand-alone hex editor) to directly insert the data into pre-existing files.

I don't use this technique for everything... creating maps, for example, I went to the trouble to write an editor for. Not much fun drawing landscapes abstractly.

Adamantyr




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users