z2

I agree. Take me to the spicy page.
It is currently Tue Oct 17, 2017 3:55 am

All times are UTC




Post new topic Reply to topic  [ 291 posts ]  Go to page Previous  1 ... 13, 14, 15, 16, 17, 18, 19, 20  Next
Author Message
 Post subject:
PostPosted: Sat Nov 20, 2010 1:22 am 
Offline
OH YES! USE VINE WHIP! <3
User avatar

Joined: Tue Sep 11, 2001 9:11 am
Posts: 1738
Location: scabsboro
Fuck conveyors.

In an external program I wrote to just get the logic down without messing around with actual ZZT elements:
Image

This "a" happily rotates around the center.


Use the exact same code in Tyger?
Image
the gem will just skip some spaces for no apparent reason.

http://pastebin.com/DEqrFjwT Convey.py
http://pastebin.com/JwJ5T8tG Tyger

_________________
<asgromo> Dr Dos; What is this monstrocity?
<Spectere> Aura 2
<asgromo> This thread is useless... I'll just... read the Featured Games article.
<asgromo> ... I'll just look for boners.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 20, 2010 3:47 am 
Offline
fgsdfs
User avatar

Joined: Wed Mar 12, 2003 5:44 pm
Posts: 2421
Location: :noitacoL
does it always skip the same spaces?

_________________
*POW* *CLANK* *PING*


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 20, 2010 7:17 am 
Offline
OH YES! USE VINE WHIP! &lt;3
User avatar

Joined: Tue Sep 11, 2001 9:11 am
Posts: 1738
Location: scabsboro
Yep.

_________________
<asgromo> Dr Dos; What is this monstrocity?
<Spectere> Aura 2
<asgromo> This thread is useless... I'll just... read the Featured Games article.
<asgromo> ... I'll just look for boners.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 20, 2010 9:16 am 
Offline
fgsdfs
User avatar

Joined: Wed Mar 12, 2003 5:44 pm
Posts: 2421
Location: :noitacoL
plot vectors around the conveyor instead, like szzt water?

_________________
*POW* *CLANK* *PING*


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 20, 2010 3:01 pm 
Offline
fgsdfs
User avatar

Joined: Wed Mar 12, 2003 5:44 pm
Posts: 2421
Location: :noitacoL
Code:
array = [board.room[x-1][y-1], board.room[x-1][y], board.room[x-1][y+1],
board.room[x][y-1],                       board.room[x][y+1],
board.room[x+1][y-1], board.room[x+1][y], board.room[x+1][y+1]]


your array is one element short

_________________
*POW* *CLANK* *PING*


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 20, 2010 7:15 pm 
Offline
OH YES! USE VINE WHIP! &lt;3
User avatar

Joined: Tue Sep 11, 2001 9:11 am
Posts: 1738
Location: scabsboro
No it should be 8 elements, I don't care about the conveyor in the middle, just the 8 tiles around it.

_________________
<asgromo> Dr Dos; What is this monstrocity?
<Spectere> Aura 2
<asgromo> This thread is useless... I'll just... read the Featured Games article.
<asgromo> ... I'll just look for boners.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 21, 2010 2:49 am 
Offline
fgsdfs
User avatar

Joined: Wed Mar 12, 2003 5:44 pm
Posts: 2421
Location: :noitacoL
well it's not the same size array as the one you use for the code that works...

I don't know python but couldn't for a in range(0,8) address 9 elements?

_________________
*POW* *CLANK* *PING*


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 21, 2010 9:50 am 
Offline
OH YES! USE VINE WHIP! &lt;3
User avatar

Joined: Tue Sep 11, 2001 9:11 am
Posts: 1738
Location: scabsboro
For python a range is a list of numbers from the start up to but not including the last number.

_________________
<asgromo> Dr Dos; What is this monstrocity?
<Spectere> Aura 2
<asgromo> This thread is useless... I'll just... read the Featured Games article.
<asgromo> ... I'll just look for boners.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 22, 2010 10:57 pm 
Offline
Level 17 Accordion Thief
User avatar

Joined: Fri Sep 12, 2003 1:41 am
Posts: 1423
Location: Edmonds, WA
I think there's an easier way to do this. You're really trying to do two things at once: (1) determining what stuff can be moved by the conveyor, and (2) actually moving that stuff.

It might help if you solved the problem in two separate stages: figure out what can move first, and move everything second. That way, you can troubleshoot each half of the problem and identify where the bug is.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 23, 2010 4:14 am 
Offline
fgsdfs
User avatar

Joined: Wed Mar 12, 2003 5:44 pm
Posts: 2421
Location: :noitacoL
I'm still thinking somewhere along the lines of arrays with vectors

clockwise:

x =
[+1,+1,0]
[0,0,0]
[0,-1,-1]

y=
[0,0,+1]
[-1,0,+1]
[-1,0,0]

_________________
*POW* *CLANK* *PING*


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 23, 2010 3:18 pm 
Offline
Level 17 Accordion Thief
User avatar

Joined: Fri Sep 12, 2003 1:41 am
Posts: 1423
Location: Edmonds, WA
What makes this problem hairy is that some tiles always block movement (walls), some tiles never block movement (empty, fake), and then there are tiles which sometimes block movement (most pushable stuff). I say sometimes because boulders act like walls if they themselves are blocked.

This leads to fun stuff like the following, where you can't rotate anything until you've looked at all the tiles around the conveyor (S = solid, o = boulder, / = conveyor):

Code:
ooo       ooo
o/o       o/o
Soo       ooo
         
nothing   everything
moves     moves


I like the vector approach, though. You could do the rotation right on the board, instead of copying to another array first.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 22, 2010 1:31 am 
Offline
the Gargoyle.
User avatar

Joined: Tue Jul 25, 2006 10:02 am
Posts: 601
More creature/bullet weirdness. Load this one in ZZT and sit there, wait for a bullet to approach the ricochets and watch it go nuts.

http://www.mediafire.com/file/e1ncd5cbx ... et-zzt.zip

This gives me a better idea of how ZZT handles creatures shooting, if you are interested :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 22, 2010 7:57 am 
Offline
OH YES! USE VINE WHIP! &lt;3
User avatar

Joined: Tue Sep 11, 2001 9:11 am
Posts: 1738
Location: scabsboro
You've just discovered a bullet capable of killing JFK. Though this is more "ZZT doesn't like having the stat limit hit" than "ZZT doesn't understand bullets and ricochets"

_________________
<asgromo> Dr Dos; What is this monstrocity?
<Spectere> Aura 2
<asgromo> This thread is useless... I'll just... read the Featured Games article.
<asgromo> ... I'll just look for boners.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 27, 2010 8:12 pm 
Offline
Level 17 Accordion Thief
User avatar

Joined: Fri Sep 12, 2003 1:41 am
Posts: 1423
Location: Edmonds, WA
To be precise, ZZT hits stats it doesn't like! </Thomson>

Normally, when someone fires a bullet, ZZT:
- creates a new stat
- stores the bullet's direction in the latest stat
- puts a bullet tile on the board

But when the board has reached its stat limit, ZZT only:
- stores the bullet's direction in the latest stat

So I think this is what happens on Saxxonpike's board: The first tiger shoots west, and a west-moving bullet is created. The next tiger tries to shoot west, but the stat limit has been reached, and so instead of creating a new bullet, the shot causes the old bullet to keep on moving west. Do this several times a second, and now that one bullet refuses to go any direction except west (or wherever the tigers are shooting).

tl;dr: first shot creates the bullet, subsequent shots change the bullet's direction.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 07, 2011 11:37 pm 
Offline
the Gargoyle.
User avatar

Joined: Tue Jul 25, 2006 10:02 am
Posts: 601
I don't know if this is useful, but I have been doing some digging around the ZZT executable and found the internal structure it uses to store element data.

TOTAL: 195 bytes.
00 default char
01 default color (FF=none)
02 if 1, destructable by projectiles
03 if 1, pushable
04 (flag not used)
05 if 1, projectiles allowed
06 if 1, is a floor
07 if 1, has special draw code
08 offset of draw code
0A segment of draw code
0C default cycle (FF=is not a stat element)
0E offset of execution code
10 segment of execution code
12 offset of player interaction code
14 segment of player interaction code
16 editor category (0=not in editor menus)
18 editor key
19 name
2E category string
43 edit parameter 1 string
58 edit parameter 2 string
6D edit parameter 3 string
82 edit destination board string
97 edit step name
AC edit code name
C1 ??? (only a few creatures)

Going to parse this shortly from a memory dump of the game (since it isn't stored in the file this way, it is actually constructed at runtime.) Super ZZT uses this format except the unused flag at 04 isn't stored at all, so the structure is one byte shorter.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 291 posts ]  Go to page Previous  1 ... 13, 14, 15, 16, 17, 18, 19, 20  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group