Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Astrosynthesist

#1
Hello everyone!

I am a huge fan of the Vectrex32 and I hate that I have been sitting on this code for a year and a half and that I have never completed the game. I want this platform to succeed in the Vectrex community, so I would rather give away my starter code than see it go to waste and never get completed. Please note that I stagnated development around the 1.15 release as there were some bugs I was helping Bob uncover at the time that limited my ability to complete the game... I don't think that it is so much of a problem now however. Unfortunately in my own tumultuous life I have not had the ability to pick the project back up - my Vectrex has been sitting sad and unplugged for a few months. :(

So! I have 360 degrees of star trek enterprise, klingon birds of prey, and star bases, as well as a pretty reliable game engine. All that's left is to make the mines and mine layers, and most of the game logic and sound. If you are interested in picking up this project from where I am leaving off please leave a reply and I can send you a nice big fat zip file with everything I have done so far. I am also happy to offer support on what I have written as my commenting was, well, poor.

I hope that someone is interested in picking this up and all I ask is that I get a credit in your final game, either in the basic code or preferably in the on-screen credits.
#2
Hello! I am back into developing again!

I am going to write a few observations on the current feature set for the sound engine on the Vectrex 32 v1.17, based on the development I've been doing so far.

The Play() function:
I am really happy that the Play() function has been fixed so that it doesn't play that interesting random set of tones anymore after completing! I haven't tested Play() polyphonically, however I have tried to make a monophonic melody with it. It was simple to do, and I very much appreciated that simplicity, however I personally feel it was almost too simple. A monophonic melody produced using the Play() function has what I perceive to be a bit of a flaw, but others might perceive it as a creative limitation. It appears to use dynamic voice allocation, allowing a previously played tone envelope to complete and starting the next tone on a new voice, creating an overlap of tones while the previous tone fades out. This is a perfectly valid voicing mode, however control over this behaviour would be excellent. In my case, I want a clear melody without voice allocation (using only voice A, for example), and the only way I can achieve this is with low-level control using the Sound() function. To summarize essentially I would love for there to be a new playMode() function which takes parameters for the following:
- Voice allocation mode when using less than 3 voices
- General envelope shape and length control (One setting for all voices to abide by using the chip's built in envelope)
- General amp control (To allow the creation of software defined envelopes for all voices)
Granted, I don't know how this is implemented in the backend but I am working on the assumption you have created voice allocation code in order to create this effect and have preset envelope and amp settings when using this mode.
Otherwise I will basically never use the Play() function except for the wonderfully useful Play(nil) option, opting for the low level control offered by Sound(), as I am a musician, and a synthesizer player at that, and thus I am a picky bastard.

On that note (hah, nice pun), I would really like for the built-in note constants to be mapped to hex numbers so that they can be used interchangeably between Sound and Play (Aka for Play to accept hex arguments instead of integer arguments), or for another set of constants to be created with this mapping. I am currently hunting down the perfect tunings by ear and slightly adjusting and fine tuning the hex values I'm using with Sound() and there has to be a better way to achieve temperament. At the very least include the pertinent hex values for each standard tuning note in the manual please!

Finally, a built-in function to use the chip as a D/A converter/PCM player as described here in the Advanced Techniques section https://www.revolvy.com/page/General-Instrument-AY%252D3%252D8910 would be super cool, however I realize that is likely to be a lot of work. Something to think about if you have some spare time to play with it in the future. If I have time I might try something simple as a proof of concept now that we have codeSprites to play with, but I have to get my current project out the door first!
#3
This was not the case in 1.14 if I recall correctly but now whenever I call music using the "play" command (including running yankee.bas) random noise and notes are played at the end of the music. This does not seem to affect built in music, only ones which were created using the "Music" command
call play(music({{NA4, 12}}))
#4
Two things:
In the Vectrex32 manual on page 63, the code example for "spriteTranslate" uses the call "spriteTranslation"
a = linesSprite({{DrawTo,50,0}})
call spriteTranslate(a,{10,10})

Since there is no initial moveTo, spriteTranslate only moves the end point of the linesSprite and not the beginning point of it, distorting the vector rather than translating it.
#5
call scaleSprite(32)
call dotsSprite({{0,128}})

If a coordinate is greater than 127 two dots drawn on screen, similar to how drawing a line longer than 127 creates multiple line segments to complete the draw. Similarly if a coordinate is greater than 255 then three dots are drawn on screen.
#6
Code Swap / Vecci graphics user export script
December 28, 2017, 07:40:53 PM
Hi everyone.

I got tired of manually writing my own vector lists after fleshing them out in vecci (the vide vector drawing utility), so I wrote my own script to manually output the vectorlists in user export mode. The only issue is that it does not account for lists longer than 200 characters. I'm not super familiar with working in what I assume is javascript (this is javascript, right?) I just wrote this based on the other exports as examples.
StringBuffer b = new StringBuffer();
Vector allvectors = vecci.getVectors();
GFXVector onvector =(GFXVector)  allvectors.elementAt(0);
Vertex start = onvector.start;
b.append("{{MoveTo,"+(int)start.x()+","+(int)start.y()+"}");
Vertex old_end = start;
for (int i=0; i<allvectors.size(); i++)
{
  onvector =(GFXVector)  allvectors.elementAt(i);
  start = onvector.start;
  Vertex end = onvector.end;
  if ( start.x() != old_end.x() || start.y() != old_end.y() )
  {
    b.append(",{MoveTo,"+(int)start.x()+","+(int)start.y()+"}");
  }
  b.append(",{DrawTo,"+(int)end.x()+","+(int)end.y()+"}");
  old_end = end;
}
b.append("}");
  out += b.toString();


If anyone wants to add the 200 character correction (adds an underscore and newline for every 170 characters) I would be very grateful if you reply to this post with it but this as it is is still much more convenient. Enjoy!
#7
Feature Requests and Bug Reports / Janky Sprite Rotation
December 27, 2017, 08:36:40 PM
Hello again. I will include a small code snippet to illustrate my issue. Not sure if this is a bug or just an inevitability of the way the floating point unit works...
call setFrameRate(30)
lockArray = {{MoveTo,2,10},{DrawTo,0,5},{DrawTo,-2,10},{DrawTo,2,10},{MoveTo,2,-10},{DrawTo,0,-5},{DrawTo,-2,-10},{DrawTo,2,-10},_
    {MoveTo,10,2},{DrawTo,5,0},{DrawTo,10,-2},{DrawTo,10,2},{MoveTo,-10,2},{DrawTo,-5,0},{DrawTo,-10,-2},{DrawTo,-10,2}}
call scaleSprite(255)
call returnToOriginSprite()
lock = linesSprite(lockArray)
while True
call waitForFrame(0,0,0)
call spriteRotate(lock, 1)
endwhile

But yeah, on my Vectrex that sprite just dances all over the place while rotating, probably the same on others too. Please let me know if this can be avoided!
#8
General Discussion / Large arrays
December 27, 2017, 11:50:52 AM
I'm having a few issues, which I hope can be easily addressed, and both of which have to do with arrays.
First; Suppose I have a very large array in order to define a complex sprite. Is there some way to hardcode the vector list into the array in spite of the 200 character limit? I cannot find a convenient way to create a sprite over multiple lines unless I just create multiple sprites and overlap them or initialize an empty array and populate it over multiple lines, which I could do but would prefer not to.
Secondly, I cannot find a way to extract rows from multidimensional arrays;
I can define an array like this:
array1 = {{1,2,3},{4,5,6}}
but then I can only index single values from that array:
print array1[1,2]
2
print array1[1]
print array1[1]
      ^ Wrong number of indices inside []

Now I cannot reference rows in that array, I would have to iterate over them in a for loop.
Alternatively I could define the array like this:
array2 = {({1,2,3}),({4,5,6})}
But now I cannot subindex single values of that array without assigning each row to another variable:
myrow = array2[1]
print myrow
{1,2,3}
print myrow[2]
2
print array2[1,2]
      ^ Wrong number of indices inside []
print array2[1][2]
               ^ Expected end of line

So as far as I understand it I cannot have my cake and eat it too, I can either have my cake or eat it. :)
I'm just wondering if I'm missing something in the syntax or if this is how it needs to be worked with.

Thanks!
#9
I am back!

First of all, I'm sad to see very little community involvement since I left. I hope to change that!
I am excited by the prospect of the V-prize and just attempted to install v1.15 in preparation for making my ports of those games... I got to the screen saying I successfully updated the V32, but now whenever I reboot the Vectrex I go straight to minestorm and my computer doesn't see a drive with the contents of the V32. Uh oh!

Please let me know if I can provide more information. I really want to see this project flourish and would like to get my V32 up and running again so I can bash out these ports! :)
#10
v1.14
Boot Vectrex32, hit ^C to enter live shell
I noted that if I'm in the middle of creating a while loop in the live shell, such as:
move = 122
while 1
call MoveSprite(-50,0)
call TextSprite(move

And then I realize I forgot something so I break to get out of it:
move = 122
while 1
call MoveSprite(-50,0)
call TextSprite(move^C

I usually have to hit enter for the break to register.
Then the very next command I enter soft crashes the Vectrex 32.
(The two I've tried are print(move), print(), and call MoveSprite(50,0), all of which crash the Vectrex32.
It then reboots to the standard menu (no errors output on terminal)
Then I once had it crash again and reboot without even connecting to the shell.

From the testing I've done, this happens in these circumstances but it's hard to make happen using any general commands. It might involve function calls as this also works:
while 1
call MoveSprite(0,50)
call MoveSprite(1,50)^C
#11
Has anyone successfully adjusted the frame rate for LL?

I tried calling setFrameRate(120) at the beginning of the code, which did speed up the text and stop the text from flickering, but then when the game starts everything runs very slowly (as in the timing seems to be wrong: rotations are slow, gravity is slow, etc, but the unit itself is running at the correct speed) and the flicker is still present. I'm wondering if I'm missing something.

Thanks
#12
I always like to stress test things to find their limits... I only have three things to report so far.

Firmware 1.14:

1. In lunar lander. If I decide I want to be facetious and leave lunar orbit rather than land, I find that reaching 20,000 feet the Vectrex screen starts to flash at approximately 10-15 fps. From there, up to about 24,000 feet it continues to flash and then finally crashes (screen goes black, unit is unresponsive). Requires a hard reset to operate again.

2. In 3d Demo, adding too many crafts makes the screen flicker again (about 5) and they have to be in frame. If 5 crafts are generated and then some are excluded from the frame, it is fine. Eventually with too many in frame at once the unit crashes as above and requires a hard reset to operate again. I originally thought it was too many lines but that doesn't explain why the unit crashes. Also it slows down to about 10-15 fps and doesn't slow down proportionally with every new craft added, so it's hard to explain from my end. I have not looked into the code for the 3d Demo yet.

3. Also in 3d Demo I can move the crafts off screen far enough to crash the Vectrex32 like before. Pressing buttons 2 and 3 together produces undocumented behaviour that I can't really explain as well (zooming functinos it appears).

That's all for now. I'm having a lot of fun so far. Thanks for all your hard work!
#13
Hello,

I'm using firmware 1.14 on my Vectrex32.

As we're all aware lunar lander has a scaling issue - the terrain widens and shrinks in accordance to Joystick 1 Y position. The greater the Y value, the wider the terrain. The lower the Y value (including to negative values even though the code excludes them immediately when assigning the value joyY) the more shrunken the terrain. After assigning joyY the code never references controls[1, 2] again, and since negative values of Joystick 1 Y still affect the terrain scale, then the bug cannot be in the code for Lunar Lander.

With that in mind I decided to then change the Lunar Lander code such that it relied only on Joystick and controller 2. This is where further testing is required. I have never tested my Joystick 2 port as I have no multiplayer games nor a second compatible controller. When I set up Lunar Lander to use controller port 2 some peculiar things happened:
The terrain scale issue disappeared.
The buzzing of my Vectrex changed in pitch with the vertical movement of Joystick 2  (up made pitch rise, down made pitch fall) which normally means something should be changing on screen however I could not see any visual effects
The controls[2, 2] value would not update, it was always stuck at 0

So for me Joystick 2 Y is permanently assigned the value 0 (in digital mode as well)
I decided to try Joystick 2 X for thrust instead.

Once again no terrain scaling issues. The X values functioned as expected and I was able to play but with a new bug (I haven't actually recorded this effect explicitly, I can only describe the effect right now)
At full thrust (Joystick 2 X full right) the game produced full thrust.
At full thrust (Joystick 2 X full right) and button 2 pressed, the game rotated the craft and reduced thrust so that it was not at maximum thrust.
At full thrust (Joystick 2 X full right) and button 3 pressed, the game rotated the craft and reduced thrust so that it was less than when button 2 was pressed.
I did not record the actual change in values but once again this was almost definitely due to a bug in the WaitForFrame function as this would imply that the value in controls was incorrectly assigned.

In summary:
1. Somehow Joystick 1 Y affects terrain scale
2. Joystick 2 Y is only assigned a 0 from waitForFrame() (but affects the pitch of the buzz for some reason)
3. Joystick 2 X value is affected by Joystick 2 buttons 2 and 3 from waitForFrame()

I have also managed to make the Vectrex32 crash in a few different ways. I'll make a separate thread for that.