Jump to content
Heaven/TQA

Pro Eye Needed - Gremlins

Recommended Posts

as i am studing sprite engines in Antic E i need your help... please have a look at the game Gremlins... are all sprites moving at 1 frame? or how many does the engine move in 1 VBL? or all after each other separated by a frame?

 

are there any other antic e games i should have a look? i went far into zone ranger any other?

 

all researches needed for my Beyond Evil...

 

thanks for any help here?

 

btw...i am sure that Gremlins (as a 5200 game) does not double buffer?

Share this post


Link to post
Share on other sites

I think Gremlins only moves 2 objects per frame. That is what slowing the Emulator down to 10% seems to show.

Share this post


Link to post
Share on other sites

No double buffering.

 

But the engine is very interesting. I analyzed video sequence taken in emulator using VirtualDub and I have found frames with one up to five (!)moving objects...

 

F.

Share this post


Link to post
Share on other sites

Robotron? Although I suspect it might use Mode 4. Plus, everything seems to move in a chunky, char-boundary focussed kind of way.

 

DropZone. Defender. Shamus.

Share this post


Link to post
Share on other sites
as i am studing sprite engines in Antic E i need your help... please have a look at the game Gremlins... are all sprites moving at 1 frame? or how many does the engine move in 1 VBL? or all after each other separated by a frame?

 

are there any other antic e games i should have a look? i went far into zone ranger any other?

 

all researches needed for my Beyond Evil...

 

thanks for any help here?

 

btw...i am sure that Gremlins (as a 5200 game) does not double buffer?

Pengo

Donkey Kong

Share this post


Link to post
Share on other sites

Note that sprites in Gremlins are drawn by XORing with screen contents. With that in mind, I don't see anything special about this engine.

Share this post


Link to post
Share on other sites

of course Gremlins has a "simple Antic E XOR engine" but the interesting thing is...no flicker like in Zone Ranger f.e. and it even is fluid in NTSC...

Share this post


Link to post
Share on other sites
does anybody have an idea how to have a look into the Menace Sources? Are they Mac/65 format?

 

I am pretty sure that Menace was Antic 4, not Antic E.

Share this post


Link to post
Share on other sites

Menace is Antic 4. just load the demo and change the VBL to set the font back to $e000 and you see the chars... but i was not able to print out the source code so i am not sure what kind of assembler the guys used...

Share this post


Link to post
Share on other sites
Menace is Antic 4. just load the demo and change the VBL to set the font back to $e000 and you see the chars... but i was not able to print out the source code so i am not sure what kind of assembler the guys used...

 

Menace source code is a pure MAC/65. See the attachment for transfered files.

 

F.

 

Moderator Edit: Attachment removed after request from Jetboot Jack.

Share this post


Link to post
Share on other sites

ok....just for the guys who are interested.... a simple prototype how you would go for a soft sprite engine in antic 4... (for simplicity no background envolved or restored but anyway you should get it...)

 

1 GRAPHICS 15
2 OPEN #1,4,0,"H:SOFTSPRITES.MIC"
3 BGET #1,DPEEK(88),7680
4 CLOSE #1
5 SCR=DPEEK(88)
6 FONT=$7000
10 SPRTAB=$6000
20 X=0:Y=0
90 FOR K=0 TO 3
100   FOR J=0 TO 2
110	 FOR I=0 TO 15
120	   A=PEEK(SCR+I*40+J+K*3)
130	   POKE SPRTAB+I+J*16+K*48,A
140	   POKE SCR+I*40+J+K*3,$FF
150	 NEXT I
160   NEXT J
170 NEXT K
200 GRAPHICS 12
210 POKE 756,FONT DIV 256
220 FOR I=0 TO 7:POKE FONT+I,0:NEXT I
230 FOR X=0 TO 127
240   EXEC SETSPRITE
250   REM GET K
260 NEXT X
999 END 
1000 PROC SETSPRITE
1001   Y=X
1005   XP=X DIV 4:YP=Y DIV 8
1006   CLS #6
1010   A=X MOD 4
1015   A=A*48:TAB=A+SPRTAB
1020   B=Y MOD 8
1025   FOR I=0 TO 71:POKE FONT+264+I,0:NEXT I
1030   MOVE TAB,FONT+264+B,16
1040   MOVE TAB+16,FONT+264+B+24,16
1050   MOVE TAB+32,FONT+264+B+48,16
1110   POSITION XP,YP:PRINT #6;"ADG"
1120   POSITION XP,YP+1:PRINT #6;"BEH"
1130   POSITION XP,YP+2:PRINT #6;"CFI"
1199 ENDPROC

post-528-1189967193_thumb.png

post-528-1189967217_thumb.png

Edited by Heaven/TQA

Share this post


Link to post
Share on other sites

@ Allas... simply because I don't have that proggie...and it is shareware so i am not sure if the download version is a 30 days trial or not...

 

@ all interested

 

attachted a simple demo in assembly to demonstrate how char based softsprite could work... source code etc included in the archive.... the demo moves one nasty of Beyond Evil from left to right and little in y-direction.

 

when pressing START the font is switched back to the OS font so you can see that all is an illusion... ;)

 

 

what is missing here for simplicity reasons:

 

- complete vertical positioning

- background restore

- all 9 chars which are needed for a 8x16 sprite are drew but if the sprite is set on x-pos 0,4,8,12,16,... we could left the empty "buffer char". same to the y buffer sprite at 0,8,16,24,32,...

sprite2.zip

Edited by Heaven/TQA

Share this post


Link to post
Share on other sites
what is missing here for simplicity reasons:

 

- complete vertical positioning

- background restore

- all 9 chars which are needed for a 8x16 sprite are drew but if the sprite is set on x-pos 0,4,8,12,16,... we could left the empty "buffer char". same to the y buffer sprite at 0,8,16,24,32,...

 

One more item is missing, which may or may not be what you are calling background restore: The sprite needs to overlay the background/other sprites. Somewhere I have a routine that did this, but I cannot find it on my machine at the moment.

 

The current version of Beyond Evil may not have to worry about overlaying a background (since you can simply draw on the black screen), but sprite/sprite overlap is probably required... even if you don't allow sprites to actually overlap!

 

For example (assuming 8x12 sprites):

Sprite 1 might be at pixel position (0,0) and Sprite 2 might be at pixel position (5,14). The sprites themselves don't overlap, but the character cells do. This could be even worse if 3 sprites share the same cell.

 

A few possibilities:

1) Ignore the overlapping - this will cause the sprites to flicker when the get close.

2) Do the overlap correctly, which will require extra processing

3) It might be possible to avoid this case by restricting actual movement to pure horizontal (x4 at a time) and pure vertical movement (x8 at a time). This way, the sprites still move smoothly, but are less likely to overlap at a cell level.

 

To handle case 2, you will need a loop that looks something like:

 

loop
   lda spriteData,y
   and maskData,x
   eor bgData,x
   sta dest,x
   inx
   dey
   bpl loop

 

Then between each character, update the pointers to bgData. If sprites never actually overlap each other or the background, then the mask step could be skipped.

Share this post


Link to post
Share on other sites

yeah. in theory i wanted to avoid complete background/sprite overlaying at all... so it is visible that they are charbased... but i have only 4 active sprites each time so it might be fast enough to do the whole approach. but let us have a look at dropzone. the main screen is antic 4 as well and archer used soft sprites as well... and as far as i remember he avoided "background shines through" as well...

Share this post


Link to post
Share on other sites

ok...small update, now with vertical movement...check it out in atari800win or PAL machine... NTSC flickers but simply because of the clr_vram routine as this is not the smartest way to clear the screen... ;)

 

its now more clear how it works... :D

 

next will be the background handling...

 

btw. does Menace move sprites in vertical resolution smaller than 8 pixel per move? i went through the code (which is quite readable btw even without comments) but haven't found any smart vertical positioning (coping) of the sprite data into the sprite chars?

post-528-1190405249_thumb.png

sprite2.zip

Share this post


Link to post
Share on other sites

Maybe off-topic a bit, but maybe check the routine used in Burgers! Although the objects aren't animated but there may be dozens of them moving in independent ways without any slowing down.

Share this post


Link to post
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...