Asmusr Posted April 26, 2018 Share Posted April 26, 2018 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: 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 9 Quote Link to comment Share on other sites More sharing options...
broettger Posted April 26, 2018 Share Posted April 26, 2018 (edited) 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 April 26, 2018 by broettger Quote Link to comment Share on other sites More sharing options...
+adamantyr Posted April 26, 2018 Share Posted April 26, 2018 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. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 26, 2018 Author Share Posted April 26, 2018 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. 1 Quote Link to comment Share on other sites More sharing options...
artrag Posted April 27, 2018 Share Posted April 27, 2018 This is a good starting point https://codeincomplete.com/posts/rotating-tower-platformer/ 1 Quote Link to comment Share on other sites More sharing options...
RXB Posted April 27, 2018 Share Posted April 27, 2018 Would you use XB to make a starting framework and later upgrade to Assembly? Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 28, 2018 Author Share Posted April 28, 2018 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. 1 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 28, 2018 Author Share Posted April 28, 2018 This is a good starting point https://codeincomplete.com/posts/rotating-tower-platformer/ Do you think he using any technique that we can transfer to the 9918A? I assume, without looking at the code, that he is wrapping an image around a cylinder and then adding the platforms and ladders afterwards. Quote Link to comment Share on other sites More sharing options...
artrag Posted April 28, 2018 Share Posted April 28, 2018 (edited) 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 April 28, 2018 by artrag Quote Link to comment Share on other sites More sharing options...
TheMole Posted April 28, 2018 Share Posted April 28, 2018 My 4k game contest idea was a barebones version of Nebulus. These are the tower graphics I used: 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: 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 3 Quote Link to comment Share on other sites More sharing options...
artrag Posted April 28, 2018 Share Posted April 28, 2018 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 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 28, 2018 Author Share Posted April 28, 2018 Won't you run into the 4 sprites per line limitation very soon if you use sprites for everything but the tower bricks? Quote Link to comment Share on other sites More sharing options...
artrag Posted April 28, 2018 Share Posted April 28, 2018 You need to render as tiles platforms, doors and ladders. I think they have to be encoded twice each to keep into account the brick patterns. Keeping sprites only enemies could work Quote Link to comment Share on other sites More sharing options...
artrag Posted April 28, 2018 Share Posted April 28, 2018 (edited) 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 April 28, 2018 by artrag Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted April 28, 2018 Share Posted April 28, 2018 Would you use XB to make a starting framework and later upgrade to Assembly? I use XB to produce mock-ups. But for two games I am working on they are assembly in bitmap mode. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 30, 2018 Author Share Posted April 30, 2018 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? Quote Link to comment Share on other sites More sharing options...
RXB Posted April 30, 2018 Share Posted April 30, 2018 My 4k game contest idea was a barebones version of Nebulus. These are the tower graphics I used: all_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: animated.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. Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted April 30, 2018 Share Posted April 30, 2018 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. 1 Quote Link to comment Share on other sites More sharing options...
PeteE Posted April 30, 2018 Share Posted April 30, 2018 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. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted April 30, 2018 Author Share Posted April 30, 2018 TheMole's graphics take 1K uncompressed but you can get by with less if you reuse patterns. Quote Link to comment Share on other sites More sharing options...
artrag Posted May 2, 2018 Share Posted May 2, 2018 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. 1 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted May 2, 2018 Author Share Posted May 2, 2018 Here's a basic (not BASIC) spinning tower drawn using 12 patterns by updating the name table. It can easily be drawn at 60 Hz, but that's too fast so I have slowed it down to 30 Hz. tower8.bin tower.dsk 3 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted May 2, 2018 Author Share Posted May 2, 2018 This version has a background. tower8.bin tower.dsk 7 Quote Link to comment Share on other sites More sharing options...
ti99iuc Posted May 2, 2018 Share Posted May 2, 2018 Cool ? Quote Link to comment Share on other sites More sharing options...
+OLD CS1 Posted May 2, 2018 Share Posted May 2, 2018 So f-ing cool. I think slowing the background down a little will add to the perception of depth. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.