Jump to content



1

gravitar physics techdemo


27 replies to this topic

#1 jum OFFLINE  

jum

    Star Raider

  • 58 posts
  • Location:Cape Town

Posted Thu Oct 20, 2005 2:40 PM

here's a preview of a gravitar or spout type game I'm messing with.

press X to thrust.

any gameplay ideas welcome.

- jum


Updated 2005-10-07: uploaded a new version (james1.zip). See what u think.
Updated 2005-11-24: another new version which uses scrolling bg sprite to make a much larger "cave"
Updated 2005-12-05: updated wip version with tilemapped bg sprite and animated ufo.

Attached Files


Edited by jum, Mon Dec 5, 2005 6:57 AM.


#2 Zeptari1 OFFLINE  

Zeptari1

    Stargunner

  • 1,094 posts
  • Location:Massachusetts

Posted Thu Oct 20, 2005 7:22 PM

I get a circle array of dots that fall and then a red line at the bottom of the screen. I don't think Handy like's your game demo too much. I'll mess around with it some more...

#3 jum OFFLINE  

jum

    Star Raider

  • 58 posts
  • Location:Cape Town

Posted Fri Oct 21, 2005 2:29 AM

it's just a quick experiment with vertical scrolling, vector rotation, particles and gravity physics.

the triangular player ship is represented by dots at it's 3 corner points.

thrust as soon as it starts.

#4 Zeptari1 OFFLINE  

Zeptari1

    Stargunner

  • 1,094 posts
  • Location:Massachusetts

Posted Fri Oct 21, 2005 5:21 PM

OK, I get it now.....

So is this a start of a Gravitar clone? I played that game almost every day on my way to school at a local mom and pop store. I also have it for the 2600.... great little game...

anyways looks like your of to a great start....

-Rick

#5 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 8,111 posts
  • Location:Baden-Württemberg, Germany

Posted Fri Oct 21, 2005 11:57 PM

i would like to see the source code... (if it's written in asssembler...) any chance?

#6 jum OFFLINE  

jum

    Star Raider

  • 58 posts
  • Location:Cape Town

Posted Mon Oct 24, 2005 3:28 AM

The source code is in (low-level) C. If you want it email me: <removed>

I was thinking of combining a gravitar-type game with "spout" (ie: no fire button, you use your thrust jet to destroy enemies).

Also I'm undecided on whether to implement using vector gfx (raw lines and dots) as it is now, or whether to use sprites.

Yeah the 2600 gravitar is impressive.

- jum

Edited by jum, Mon Nov 28, 2005 3:49 AM.


#7 TailChao OFFLINE  

TailChao

    Moonsweeper

  • 348 posts
  • Jaja.
  • Location:United States

Posted Wed Oct 26, 2005 3:37 AM

Very nice, a tad laggy but nice. Might I suggest though, that you move the display window to scroll instead of using a massive 160x306 rendered buffer and relocating the read position? It would be much more RAM, and speed, efficient.

#8 jum OFFLINE  

jum

    Star Raider

  • 58 posts
  • Location:Cape Town

Posted Wed Oct 26, 2005 5:33 AM

I need the 160x306 buffer because (like spout), I want to be able to blast the walls/landscape with the thrust blast.

I've locked the framerate to 20fps now. It's maybe a bit sluggish, but at least it doesn't slow down and speed up all the time. I'll post a new version soon.

#9 sage OFFLINE  

sage

    Moonsweeper

  • 391 posts
  • Location:Germany

Posted Thu Oct 27, 2005 4:18 AM

jum, on Wed Oct 26, 2005 10:33 AM, said:

I need the 160x306 buffer because (like spout), I want to be able to blast the walls/landscape with the thrust blast.

View Post


One more reason to use a sprite instead of the render buffer.

#10 jum OFFLINE  

jum

    Star Raider

  • 58 posts
  • Location:Cape Town

Posted Thu Oct 27, 2005 6:30 AM

Please explain how to implement "deformable terrain" using sprites.

Thanks

- Jum

#11 TailChao OFFLINE  

TailChao

    Moonsweeper

  • 348 posts
  • Jaja.
  • Location:United States

Posted Thu Oct 27, 2005 2:18 PM

jum, on Thu Oct 27, 2005 7:30 AM, said:

Please explain how to implement "deformable terrain" using sprites.

Thanks

- Jum

View Post

You could set up a simple tile engine (8x8 blocks perhaps) With each tile having say, 4 modes (blank, semi deformed, deformed, nonexistant) and draw the screen like that, you would get a massive speed boost.

#12 T2KFREEKER OFFLINE  

T2KFREEKER

    Dragonstomper

  • 580 posts

Posted Thu Oct 27, 2005 4:00 PM

:P Cool little demo. I think it would be a cool little Lynx game when finished. It is at least the kind of game you want to play on a hand held. I'll keep checking to see what the progress is. :D

#13 jum OFFLINE  

jum

    Star Raider

  • 58 posts
  • Location:Cape Town

Posted Fri Nov 4, 2005 9:27 AM

Uploaded a new version of the demo. See the first post.

- jum

#14 Lamer Deluxe tm OFFLINE  

Lamer Deluxe tm

    Space Invader

  • 30 posts
  • Location:Netherlands

Posted Sat Nov 5, 2005 5:12 AM

Very nice, keep on going, this could become a really cool game.

You are using a lot of memory with the large buffer, but with this you are saving on screen redraw, which leaves you extra system power to do neat effects with.

You could speed up getpixel and setpixel by using a multiplication table (y*80) instead of the <<6 and <<4 you're using now.

calc_ship_verts could be sped up by not using generic sin and cos tables but premultiplying them to give the right distance from the center of the ship.

I see you are already using mean(?) (point1+point2)/2 values to create extra interpolation points with little calculation cost. You could also interpolate from the bottom two points to the center of the ship, for a nice spaceship shape.

Programming the Lynx in C looks nice BTW, I've been using ASM, which is fast but cumbersome.

Your game is inspiring to look at.

#15 jum OFFLINE  

jum

    Star Raider

  • 58 posts
  • Location:Cape Town

Posted Sun Nov 6, 2005 3:04 AM

Lamer Deluxe tm, on Sat Nov 5, 2005 6:12 AM, said:

Very nice, keep on going, this could become a really cool game.

You are using a lot of memory with the large buffer, but with this you are saving on screen redraw, which leaves you extra system power to do neat effects with.

You could speed up getpixel and setpixel by using a multiplication table (y*80) instead of the <<6 and <<4 you're using now.

calc_ship_verts could be sped up by not using generic sin and cos tables but premultiplying them to give the right distance from the center of the ship.

I see you are already using mean(?) (point1+point2)/2 values to create extra interpolation points with little calculation cost.  You could also interpolate from the bottom two points to the center of the ship, for a nice spaceship shape.

Programming the Lynx in C looks nice BTW, I've been using ASM, which is fast but cumbersome.

Your game is inspiring to look at.

View Post


Thanks for your input man.

I'm not concentrating on optimising right now (rather get some good gameplay first), but if you would like to write a fast ship-drawing routine in asm, please do, and I will integrate it into the source code.

I can only work out the correct "scaling" of the sin/cos tables once I've figured out whether I need to use 8:8 fixed point or 10:6 or whatever. Also I'm going to cut the sin/cos tables from 256 values to 64 values.

- jum

#16 Lamer Deluxe tm OFFLINE  

Lamer Deluxe tm

    Space Invader

  • 30 posts
  • Location:Netherlands

Posted Mon Nov 7, 2005 4:15 PM

jum, on Sun Nov 6, 2005 9:04 AM, said:

Thanks for your input man.

I'm not concentrating on optimising right now (rather get some good gameplay first), but if you would like to write a fast ship-drawing routine in asm, please do, and I will integrate it into the source code.

I can only work out the correct "scaling" of the sin/cos tables once I've figured out whether I need to use 8:8 fixed point or 10:6 or whatever. Also I'm going to cut the sin/cos tables from 256 values to 64 values.

- jum

8:8 would probably be faster, but positioning within the large display buffer would be more complicated.

I'm not used to doing asm combined with C in CC65, but I'll see if I can mess around with it a little bit :)

#17 sage OFFLINE  

sage

    Moonsweeper

  • 391 posts
  • Location:Germany

Posted Tue Nov 8, 2005 5:03 AM

jum, on Thu Oct 27, 2005 11:30 AM, said:

Please explain how to implement "deformable terrain" using sprites.

View Post


Use unpacked sprites, use "getpixel" and "setpixel" on them instead of the screen memory.
1 bitplane should be enough for b/w terrain.

This is how I do it for my tron clone (which is still somewhere floating around in the net).

#18 jum OFFLINE  

jum

    Star Raider

  • 58 posts
  • Location:Cape Town

Posted Wed Nov 9, 2005 2:51 AM

I used the "setpixel/getpixel on unpacked sprite" in my ChopperX game, for the scrolling terrain (320x50 sprite).

I was trying to avoid losing cycles to large sprites, but on the other hand a 300x300 "virtual background" would suit this game better.

Do you still have the source code to your Tron game?

#19 _cooper_ OFFLINE  

_cooper_

    Space Invader

  • 19 posts

Posted Wed Nov 9, 2005 5:49 PM

Interesting Techdemo Jum, i'm looking forward to see the further versions!

#20 jum OFFLINE  

jum

    Star Raider

  • 58 posts
  • Location:Cape Town

Posted Thu Nov 17, 2005 1:15 AM

update: I have now switched to using a 320x512 1 bitplane unpacked sprite for the background, and have made setpixel and getpixel routines that read and write to the sprite.

now busy with creating 32 animation frames for the ship rotation. also need to speed up the setpixel/getpixel routines.

- jum

#21 sage OFFLINE  

sage

    Moonsweeper

  • 391 posts
  • Location:Germany

Posted Wed Nov 23, 2005 3:21 AM

jum, on Wed Nov 9, 2005 7:51 AM, said:

I used the "setpixel/getpixel on unpacked sprite" in my ChopperX game, for the scrolling terrain (320x50 sprite).

I was trying to avoid losing cycles to large sprites, but on the other hand a 300x300 "virtual background" would suit this game better.

Do you still have the source code to your Tron game?

View Post


Yes I have, but it is completly in assembler.

#22 jum OFFLINE  

jum

    Star Raider

  • 58 posts
  • Location:Cape Town

Posted Fri Nov 25, 2005 12:58 AM

see new version at beginning of thread.

sage: I can do assembler if I have to. Please email or post your asm source for putpixel.

thanks.

- jum

ps: I have since done the 32 sprites for the ship rotation (actually, 8 sprites that are flipped horizontally or vertically as needed (thank you Lynx designers :) ).

Edited by jum, Fri Nov 25, 2005 1:06 AM.


#23 sage OFFLINE  

sage

    Moonsweeper

  • 391 posts
  • Location:Germany

Posted Fri Nov 25, 2005 6:15 AM

jum, on Fri Nov 25, 2005 5:58 AM, said:

see new version at beginning of thread.

sage: I can do assembler if I have to. Please email or post your asm source for putpixel.


I am not sure if it will help you, because i was using 4 plane background (8 lightcycles -> 8 colors+background color) and a fixed sprite width.
But anyway i will send you part of the code. maybe you want to do a color version, too.

#24 jum OFFLINE  

jum

    Star Raider

  • 58 posts
  • Location:Cape Town

Posted Tue Dec 6, 2005 1:04 AM

Uploaded another new version. See first post.

- jum

#25 Lamer Deluxe tm OFFLINE  

Lamer Deluxe tm

    Space Invader

  • 30 posts
  • Location:Netherlands

Posted Tue Dec 6, 2005 6:23 AM

Wow, great improvements! The ship controls very nicely. The deformable landscape works really well and is a very cool effect. The anti-aliasing on the ship is a nice touch.

I'm looking forward to seeing this turn into a real game. It's very interesting to be able to follow it's progress.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users