Jump to content

Photo

Nebulus/Tower Toppler game


42 replies to this topic

#1 Asmusr ONLINE  

Asmusr

    River Patroller

  • 2,736 posts
  • Location:Denmark

Posted Thu Apr 26, 2018 2:40 PM

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:

 

Attached File  tower.png   91.45KB   3 downloads

 

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?

 

 

Attached Files



#2 broettger OFFLINE  

broettger

    Space Invader

  • 26 posts
  • Location:Burnsville, MN

Posted Thu Apr 26, 2018 3:56 PM

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, Thu Apr 26, 2018 3:56 PM.


#3 adamantyr OFFLINE  

adamantyr

    Stargunner

  • 1,314 posts

Posted Thu Apr 26, 2018 4:12 PM

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.



#4 Asmusr ONLINE  

Asmusr

    River Patroller

  • Topic Starter
  • 2,736 posts
  • Location:Denmark

Posted Thu Apr 26, 2018 5:29 PM

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.c...trum/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.



#5 artrag OFFLINE  

artrag

    Dragonstomper

  • 911 posts

Posted Fri Apr 27, 2018 5:11 AM

This is a good starting point
https://codeincomple...wer-platformer/

#6 RXB OFFLINE  

RXB

    River Patroller

  • 3,023 posts
  • Location:Vancouver, Washington, USA

Posted Fri Apr 27, 2018 8:55 AM

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



#7 Asmusr ONLINE  

Asmusr

    River Patroller

  • Topic Starter
  • 2,736 posts
  • Location:Denmark

Posted Sat Apr 28, 2018 12:00 AM

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.



#8 Asmusr ONLINE  

Asmusr

    River Patroller

  • Topic Starter
  • 2,736 posts
  • Location:Denmark

Posted Sat Apr 28, 2018 12:08 AM

This is a good starting point
https://codeincomple...wer-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.



#9 artrag OFFLINE  

artrag

    Dragonstomper

  • 911 posts

Posted Sat Apr 28, 2018 12:50 AM

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, Sat Apr 28, 2018 1:41 AM.


#10 TheMole ONLINE  

TheMole

    Dragonstomper

  • 769 posts
  • Location:Belgium

Posted Sat Apr 28, 2018 1:30 AM

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

Attached File  all_frames.png   1KB   1 downloads

 

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:

Attached File  animated.gif   4.17KB   1 downloads

 

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....csjlgz5AI?t=45s

 

 



#11 artrag OFFLINE  

artrag

    Dragonstomper

  • 911 posts

Posted Sat Apr 28, 2018 2:09 AM

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

#12 Asmusr ONLINE  

Asmusr

    River Patroller

  • Topic Starter
  • 2,736 posts
  • Location:Denmark

Posted Sat Apr 28, 2018 2:31 AM

Won't you run into the 4 sprites per line limitation very soon if you use sprites for everything but the tower bricks?



#13 artrag OFFLINE  

artrag

    Dragonstomper

  • 911 posts

Posted Sat Apr 28, 2018 2:49 AM

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

#14 artrag OFFLINE  

artrag

    Dragonstomper

  • 911 posts

Posted Sat Apr 28, 2018 5:03 AM

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, Sat Apr 28, 2018 5:35 AM.


#15 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • 5,115 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Sat Apr 28, 2018 11:18 AM

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.



#16 Asmusr ONLINE  

Asmusr

    River Patroller

  • Topic Starter
  • 2,736 posts
  • Location:Denmark

Posted Mon Apr 30, 2018 10:53 AM

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?

#17 RXB OFFLINE  

RXB

    River Patroller

  • 3,023 posts
  • Location:Vancouver, Washington, USA

Posted Mon Apr 30, 2018 11:43 AM

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....csjlgz5AI?t=45s

 

 

 

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



#18 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • 5,115 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Mon Apr 30, 2018 11:59 AM

 

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.


  • RXB likes this

#19 PeteE OFFLINE  

PeteE

    Chopper Commander

  • 139 posts
  • Location:Beaverton, OR

Posted Mon Apr 30, 2018 12:12 PM

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.



#20 Asmusr ONLINE  

Asmusr

    River Patroller

  • Topic Starter
  • 2,736 posts
  • Location:Denmark

Posted Mon Apr 30, 2018 1:09 PM

TheMole's graphics take 1K uncompressed but you can get by with less if you reuse patterns.

#21 artrag OFFLINE  

artrag

    Dragonstomper

  • 911 posts

Posted Wed May 2, 2018 3:20 AM

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.

#22 Asmusr ONLINE  

Asmusr

    River Patroller

  • Topic Starter
  • 2,736 posts
  • Location:Denmark

Posted Wed May 2, 2018 12:42 PM

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.

Attached Files



#23 Asmusr ONLINE  

Asmusr

    River Patroller

  • Topic Starter
  • 2,736 posts
  • Location:Denmark

Posted Wed May 2, 2018 1:07 PM

This version has a background.

Attached Files



#24 ti99iuc OFFLINE  

ti99iuc

    Stargunner

  • 1,402 posts
  • Location:Italy

Posted Wed May 2, 2018 1:48 PM

Cool 😎

#25 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • 5,115 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Wed May 2, 2018 2:45 PM

So f-ing cool.  I think slowing the background down a little will add to the perception of depth.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users