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.


Messages - Astrosynthesist

Pages: [1] 2 3
1
Feature Requests and Bug Reports / Re: DotsSprite double dot
« on: January 14, 2018, 07:36:18 PM »
What about drawing the undesired dots with an intensity of zero?

2
Also multiple notes overlap each other when called with the music function. I would personally prefer the ability to use ABC to specify which voice gets which note. In other words it should work such that "ABC(NG2,nil,nil)" always uses voice number 1 so that I can reserve one or both of the other voices for sound effects and low level control.
This will give away what I'm up to but anyways you can hear some of these notes overlap when they are played even though they should all be one after the other. It does this whether I use the ABC function or not:
Code: [Select]
tempo = 2
strekMusic = {{ABC(NA3),9*tempo},{ABC(ND4),3*tempo},{ABC(NG4),18*tempo},{ABC(NFS4),6*tempo},{ABC(ND4),4*tempo},{ABC(NB3),4*tempo},_
    {ABC(NE4),4*tempo},{ABC(NA4),21*tempo},{ABC(NA4),3*tempo},{ABC(NCS5),24*tempo}}
strekMusic = Music(strekMusic)
call play(strekMusic)

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
Code: [Select]
call play(music({{NA4, 12}}))

4
Okay then, strong recommend a note in the manual then! :)

5
What about using appendArrays to append the old array to {{moveTo,x,y}} or have BASIC recognize there is no moveTo,0,0 at the beginning of the array when the sprite is initialized and adding it before creating the sprite in the first place?

6
I'm not certain.
What about inserting a moveSprite ahead of it in the drawing list if there is no initial moveTo?

7
Two things:
In the Vectrex32 manual on page 63, the code example for "spriteTranslate" uses the call "spriteTranslation"
Code: [Select]
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.

8
Feature Requests and Bug Reports / DotsSprite double dot
« on: January 05, 2018, 06:37:24 PM »
Code: [Select]
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.

9
Feature Requests and Bug Reports / Re: Janky Sprite Rotation
« on: December 30, 2017, 02:13:34 PM »
Ah, that makes sense. Thankfully your description of how to fix the problem is still true. :)

10
Code Swap / Re: Vecci graphics user export script
« on: December 30, 2017, 01:46:00 AM »
Here it is with end of line correction.
Code: [Select]
StringBuffer buffer = new StringBuffer();
StringBuffer line = new StringBuffer();
Vector allvectors = vecci.getVectors();
GFXVector onvector =(GFXVector)  allvectors.elementAt(0);
Vertex start = onvector.start;
int linelength = 100;
line.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() )
  {    if (line.length() >= linelength )
    {
      buffer.append(line + ",_\n    ");
      line.setLength(0);
      linelength = 179;
    }
    else
    {
      line.append(",");
    }
    line.append("{MoveTo,"+(int)start.x()+","+(int)start.y()+"}");
  }
  if (line.length() >= linelength)
  {
    buffer.append(line + ",_\n    ");
    line.setLength(0);
    linelength = 179;
  }
  else
  {
    line.append(",");
  }
  line.append("{DrawTo,"+(int)end.x()+","+(int)end.y()+"}");
  old_end = end;
}
buffer.append(line + "}");
out += buffer.toString();

11
Code Swap / Vecci graphics user export script
« on: 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.
Code: [Select]
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!

12
Feature Requests and Bug Reports / Re: Janky Sprite Rotation
« on: December 27, 2017, 09:57:38 PM »
Silly me. This is great though, thank you!

13
Feature Requests and Bug Reports / Janky Sprite Rotation
« on: 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...
Code: [Select]
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!

14
General Discussion / Re: Large arrays
« on: December 27, 2017, 08:15:45 PM »
Ah yes, the almighty underscore! Thanks.

15
General Discussion / Large arrays
« on: 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:
Code: [Select]
array1 = {{1,2,3},{4,5,6}}but then I can only index single values from that array:
Code: [Select]
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:
Code: [Select]
array2 = {({1,2,3}),({4,5,6})}But now I cannot subindex single values of that array without assigning each row to another variable:
Code: [Select]
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!

Pages: [1] 2 3