Jump to content
IGNORED

Nebulus/Tower Toppler game


Asmusr

Recommended Posts

Has anyone thought about making a Nebulus/Tower Toppler game for the TI?

 

 

It occurred to me the other day that you could get quite far using a very limited character set, and by updating the name table only:

 

post-35226-0-76704900-1524774283_thumb.png

 

This should be enough to generate a smoothly spinning tower with openings and "platforms".

 

Note that vertical lines between bricks would have to be at least 8 pixels apart, but that's similar to other versions, and vertically the scrolling would have to be by character, but I thinks that's acceptable.

 

Sprites would be used for enemies, elevators, etc.

 

Any ideas for how to do the rest of the graphics, or insights in how the original algorithm worked?

 

 

tower.mag

  • Like 9
Link to comment
Share on other sites

Interesting game. I have been thinking of finding a game to convert to the TI now that I have taken it out of storage and started playing with it again.

 

How do you guys go about converting a game like this? Do you usually start from scratch or do you try to find a copy of the source from another platform? Since I haven't written any code for the TI in over 30 years, I was planning to find something where the source is available and work on converting it. I am sure I have a lot of learning to do.

Edited by broettger
Link to comment
Share on other sites

For most game conversions, you rarely have the source code to look at, and even if you do, it isn't always helpful because it's in a low-level language so the algorithms aren't clear.

 

I think the first thing to do would be to create a prototype of the movement algorithm.

 

The effect is basically a pseudo-3D one, but if you think about it, it would be no different if all sides of the tower were "unwrapped" and visible on the screen, with wrapping on the screen edges happening. All you're doing is projecting only part at a time, with a little pattern magic with the bricks and some look-up tables for the sprites so you can determine if one is visible, not visible, or partly cut off based upon position.

Link to comment
Share on other sites

Interesting game. I have been thinking of finding a game to convert to the TI now that I have taken it out of storage and started playing with it again.

 

How do you guys go about converting a game like this? Do you usually start from scratch or do you try to find a copy of the source from another platform? Since I haven't written any code for the TI in over 30 years, I was planning to find something where the source is available and work on converting it. I am sure I have a lot of learning to do.

 

The only game I have converted from the source code was Knight Lore, and that was only possible because both the source code and the data structures were very well documented. It's rare to find good documentation for retro games AFAIK. One exception is this site: http://www.icemark.com/spectrum/index.html. I made my port of Sabre Wulf before I knew this site existed.

 

It's often possible to grab and convert the graphics, which saves a lot of time. Magellan is very helpful for that.

 

I suggest to choose a game that you like and know by heart. I have ported several games where I realized later that I didn't know the basic, underlying rules.

 

Watch out for games that still belong to an active company. It's annoying to spend several month developing a port and then feel you don't really own your work. Not that anyone has ever come after me.

  • Like 1
Link to comment
Share on other sites

Would you use XB to make a starting framework and later upgrade to Assembly?

 

I sometimes make prototypes of graphics algorithms, but then I do it in Java on a PC where I have a small library of routines to simulate a 9918A screen. I used this technique to understand the data structures in Knight Lore before I went on to convert the Z80 code.

 

XB also works well as a prototyping language, but in this case I think it would have to be compiled to get a sense of the spinning tower effect.

  • Like 1
Link to comment
Share on other sites

The useful part is the transformation formula from cylinder to screen

function tx(x, r) {

return r * Math.sin((normalizex(x-camera.x)/tower.w) * 2*Math.PI);

}

As is, (as a table) it can be used for sprites.

This same formula can be used to build a table to map brick tiles to be shown while a circle of bricks rotates.

Edited by artrag
Link to comment
Share on other sites

My 4k game contest idea was a barebones version of Nebulus. These are the tower graphics I used:

post-33891-0-54298600-1524899928.png

 

I set up 8 pattern tables (on 2k boundaries) in vram, populating each with two character rows from the above image (1+5, 2+6, 3+7, 4+8, 5+1, 6+2, 7+3, 8+4) and each x frames set the appropriate pattern generator pointer. Vertical scrolling is by characters, but I only scroll everything in one go when the character lands after a jump, which means the scrolling is so fast pixel-by-pixel scrolling wouldn't show anyway.

 

Animated it looks like this:

post-33891-0-04695900-1524899984.gif

 

I was doing the platforms with (magnified and zoomed) sprites, which also had animated patterns to "disappear" behind the curve of the tower. Same principle could be applied to the doors (which I do not have), even with the same patterns, just more sprites stacked on top of each other, and a different offset.

 

I wasn't planning on doing doors or elevators in the 4k version though, just projectiles/enemies coming in from the sides making your life harder. The target would've been to get as high as possible. pretty simple, just never found the time to go beyond a quick prototype. The rotating tower looks nice though :)

 

The technique is explained pretty well here:

 

Here's an MSX video showing how smooth vertical scrolling by character after a jump actually looks:

https://www.youtube.com/watch?v=3wcsjlgz5AI?t=45s

 

 

  • Like 3
Link to comment
Share on other sites

Themole, your circle of tiles looks fine, but if you plot it using the above formula, it will be perfect. Just plot the tile boundaries on a circle spread at a fixed angle and project them on the screen using the transformation above. Do this for all the frames needed in the rotation of circle (8 frames should be enough), collect unique tiles and tile sequences, and you have all the needed to rotate a full tower

Link to comment
Share on other sites

If the number of items to put in the map is limited a table with a line per item and a column per angle could be used to translate the 2d map to the tower representation.

8 items and 128 angles to map 180 degrees give 1KB data. Consider that more than single objects one has to map transitions between 2d blocks, so maybe you will end up with more than 8 objects

Edited by artrag
Link to comment
Share on other sites

If the number of items to put in the map is limited a table with a line per item and a column per angle could be used to translate the 2d map to the tower representation.

8 items and 128 angles to map 180 degrees give 1KB data. Consider that more than single objects one has to map transitions between 2d blocks, so maybe you will end up with more than 8 objects

Could you elaborate on this? What would you store in the table? How would this deal with merging of the object with the tower bricks? And how would you handle that objects are further away from the center of the tower than the bricks?

Link to comment
Share on other sites

My 4k game contest idea was a barebones version of Nebulus. These are the tower graphics I used:

attachicon.gifall_frames.png

 

I set up 8 pattern tables (on 2k boundaries) in vram, populating each with two character rows from the above image (1+5, 2+6, 3+7, 4+8, 5+1, 6+2, 7+3, 8+4) and each x frames set the appropriate pattern generator pointer. Vertical scrolling is by characters, but I only scroll everything in one go when the character lands after a jump, which means the scrolling is so fast pixel-by-pixel scrolling wouldn't show anyway.

 

Animated it looks like this:

attachicon.gifanimated.gif

 

I was doing the platforms with (magnified and zoomed) sprites, which also had animated patterns to "disappear" behind the curve of the tower. Same principle could be applied to the doors (which I do not have), even with the same patterns, just more sprites stacked on top of each other, and a different offset.

 

I wasn't planning on doing doors or elevators in the 4k version though, just projectiles/enemies coming in from the sides making your life harder. The target would've been to get as high as possible. pretty simple, just never found the time to go beyond a quick prototype. The rotating tower looks nice though :)

 

The technique is explained pretty well here:

 

Here's an MSX video showing how smooth vertical scrolling by character after a jump actually looks:

https://www.youtube.com/watch?v=3wcsjlgz5AI?t=45s

 

 

 

24K alone for the rotating tower alone, so I see only the SAMS as a viable option here to run this game.

Link to comment
Share on other sites

 

24K alone for the rotating tower alone, so I see only the SAMS as a viable option here to run this game.

 

Well, that is 24k on (what looks like) a Sega Genesis. I can assure you the graphics used for the C64 did not consume 24k, and without bump-mapping and lower color depth it should occupy... say 1/10 of the space on the TI (2.4k?) Just a shot in the dark.

  • Like 1
Link to comment
Share on other sites

The mickey video showed the slice size was 192x16 pixels - that would be 24x2 characters on the VDP, or 48 characters per animation frame. You could replace those 48 characters in VDP RAM to rotate the tower to any of the 16 animation frames. The total animation frames for Mode 1 would be 48 chars * 8 bytes/char * 16 = 6k. For Bitmap mode it would be 48 chars * 16 bytes/char * 16 = 12k.

Link to comment
Share on other sites

Could you elaborate on this? What would you store in the table? How would this deal with merging of the object with the tower bricks? And how would you handle that objects are further away from the center of the tower than the bricks?

I will do some experiments on it asap. Back soon.

  • Like 1
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...