Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:48 27 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : new year

     Page 2 of 2    
Author Message
PeteCotton

Guru

Joined: 13/08/2020
Location: Canada
Posts: 368
Posted: 10:01pm 02 Jan 2024
Copy link to clipboard 
Print this post

  matherp said  The one that could be done using the 3D commands is Elite. The models are available but use a different format to modern 3D syntax and would need converting. I've looked at this but can't see an easy way of automating it.


I hand converted the Cobra MK III back when we were first talking about the 3D stuff on the CMM2. It was a pretty cool data format where they only recorded the data for half of the ship and then reflected the other half over the centre axis. Every byte was precious back then. Obviously not a concern anymore.

It's been a dream of mine to do an Elite type game every since I saw it back in the 80's. But alas, it will have to take a back burner to other projects!
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 11:21pm 02 Jan 2024
Copy link to clipboard 
Print this post

Battlezone was implemented by Vegipete in 2022

https://www.thebackshed.com/forum/ViewTopic_mobile.php?TID=14697&P=6

@vegipete, how did you implement the rotation on the Y axis? (To turn the tank left and right)
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1109
Posted: 03:06am 03 Jan 2024
Copy link to clipboard 
Print this post

Most of the magic happens in the 3D engine itself. Each object has its own direction, which for enemy tanks and the stargate can change with time. The player also has a heading. The object heading and the player heading are added when generating the quaternion. This is used to rotate the object, then it is drawn in 3D space, with the engine making it visible as required.
  math q_euler object(n,3)+h,0,0,q()
  draw3d rotate q(),object(n,6)
  draw3d write object(n,6),x,0,y

Moving was harder - since the camera (the player) can't move, all the other objects had to move instead, and wrap at the extents of the world. The other fun is that the camera looks in the (negative?) z direction, so coordinates are not as expected - Y represents up and all 3D objects exist on the XZ plane. Thus the coordinates of an object are (x,0,y). The field of view is such that objects only need to be drawn if abs(x) < y.
Visit Vegipete's *Mite Library for cool programs.
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 06:14am 03 Jan 2024
Copy link to clipboard 
Print this post

I had some issues trying to rotate the player, what means, rotating the entire world around the camera. Don you have some simple example?
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 11:03am 03 Jan 2024
Copy link to clipboard 
Print this post

Possibly a New Project for 2024



some Code to test it out
the scroling Text should be replaced by Tile Based Graphic

'Isometric Scroll test
MODE 2:Font 9
nr=0
Dim cl(15):cl(0)=0:Restore colr:For f=1 To 15:Read cl(f):Next
FRAMEBUFFER layer 2
FRAMEBUFFER write l
create_layer
t=Timer
FRAMEBUFFER write n
For n=1 To 1000
 k$=String$(15,Hex$(nr,1)):m$=Hex$(nr,1)+Hex$(nr,1)
 Text 200,0,k$
 For f=8 To 160 Step 8:Text 304,f,m$:Next
 For f=1 To 8:Sprite scroll -2,-1:Next :Inc nr:nr=nr And 15
 Box 0,0,16,240,,0,0:Box 0,232,320,8,,0,0
Next
Print Timer-t

Sub create_layer
 Local integer f
 FRAMEBUFFER write l:CLS 0
 'Build the Mask
 Box 32,8,268,192,,cl(8),cl(8)
 Triangle 32,115,32,8,246,8,0,0:Triangle 240,200,300,200,300,172,0,0
 '
 '
 Text 8,0,"TOP 000000",,,,cl(3):Text 8,16,"1UP 000000"
 Text 20,83,"H",,,,cl(4):Text 20,178,"L",,,,cl(2)
 Text 70,210,"FUEL",,,,cl(2):Text 109,210,"E",,,,cl(4)
 Text 237,210,"F",,,,cl(4)
 Text 264,200,"ENEMY":Text 264,208,"PLANE":Text 264,216," =00"
 For F=99 To 170 Step 16:Line 19,F,27,f+4,,cl(3):Next
 For f=117 To 229 Step 8
 Line f,210,f,217,,cl(14):Line f+1,210,f+1,217,,cl(4)
 Line f+2,211,f+2,216,,cl(14):Line f+3,211,f+3,216,,cl(4)
 Line f+4,212,f+4,215,,cl(14):Line f+5,212,f+5,215,,cl(4)
 Line f+6,213,f+6,214,,cl(14):Line f+7,213,f+7,214,,cl(4)
 Next
 Triangle 265,217,272,220,265,223,cl(4),cl(4):Line 265,220,267,220,,cl(3)
 Pixel 269,220,cl(3)
End Sub

colr:
Data RGB(BLUE),RGB(GREEN),RGB(CYAN),RGB(RED)
Data RGB(MAGENTA),RGB(YELLOW),RGB(WHITE),RGB(MYRTLE)
Data RGB(COBALT) ,RGB(MIDGREEN),RGB(CERULEAN),RGB(RUST)
Data RGB(FUCHSIA),RGB(BROWN),RGB(LILAC)

' font_BBC
' Font type    : Full (96 Characters)
' Font size    : 8x8 pixels
' Memory usage : 768
DefineFont #9
60200808
00000000 00000000 18181818 00180018 006C6C6C 00000000 6CFE6C6C 006C6CFE
7CD07E10 0010FC16 3058AC46 0084CA64 76386C38 0076CCDC 00301818 00000000
30303018 00183030 18181830 00301818 3C7E1800 0000187E 7E181800 00001818
00000000 30181800 7C000000 00000000 00000000 00303000 180C0602 00C06030
7E6E663C 003C6676 18183818 007E1818 0C06663C 007E3018 1C06663C 003C6606
6C3C1C0C 000C0C7E 067C607E 003C6606 7C60301C 003C6666 180C067E 00303030
3C66663C 003C6666 3E66663C 00380C06 18180000 00181800 18180000 30181800
6030180C 000C1830 007C0000 0000007C 0C183060 00603018 180C663C 00180018
AA9A423C 003C409C 7E66663C 00666666 7C66667C 007C6666 6060663C 003C6660
66666C78 00786C66 7C60607E 007E6060 7C60607E 00606060 6E60663C 003C6666
7E666666 00666666 1818187E 007E1818 0C0C0C3E 00386C0C 70786C66 00666C78
60606060 007E6060 6B7F7763 0063636B 7E766666 0066666E 6666663C 003C6666
7C66667C 00606060 6666663C 00366C6A 7C66667C 0066666C 3C60663C 003C6606
1818187E 00181818 66666666 003C6666 66666666 00183C66 6B6B6363 0063777F
183C6666 0066663C 3C666666 00181818 180C067E 007E6030 30303038 00383030
3060C080 00060C18 18181838 00381818 00663C18 00000000 00000000 00FE0000
00183030 00000000 063C0000 003E663E 667C6060 007C6666 663C0000 003C6660
663E0606 003E6666 663C0000 003C607E 7C30301C 00303030 663E0000 3C063E66
667C6060 00666666 18380018 003C1818 18380018 70181818 6C666060 00666C78
18181838 003C1818 7F360000 0063636B 667C0000 00666666 663C0000 003C6666
667C0000 60607C66 663E0000 07063E66 766C0000 00606060 603E0000 007C063C
307C3030 001C3030 66660000 003E6666 66660000 00183C66 6B630000 00367F6B
3C660000 00663C18 66660000 3C063E66 0C7E0000 007E3018 60303018 00183030
18181818 00181818 0C181830 00301818 CCD66600 00000000 C66C3810 00FE8282
End DefineFont

then it could look like this on Pico


'no comment
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4238
Posted: 11:20am 03 Jan 2024
Copy link to clipboard 
Print this post

That already looks very much like zaxxon.
I need to watch some demo movies, since I never owned an msx, so never played it.
PicomiteVGA PETSCII ROBOTS
 
Martin H.

Guru

Joined: 04/06/2022
Location: Germany
Posts: 1113
Posted: 01:08pm 03 Jan 2024
Copy link to clipboard 
Print this post

  Volhout said  That already looks very much like zaxxon.
I need to watch some demo movies, since I never owned an msx, so never played it.

This isn't a MSX thing, you might try the Arcade Version
'no comment
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9307
Posted: 10:07pm 03 Jan 2024
Copy link to clipboard 
Print this post

  stanleyella said  I'm gonna try not buying stuff when I'm pissed :)
It looks a bargain at the time ... sometimes is, sometimes not.


I hear that!    
Smoke makes things work. When the smoke gets out, it stops!
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024