|
Post by mountaingoat on Aug 20, 2015 19:47:03 GMT -5
Guys, I got tired of having to call Rot_VL_ab and also trying to create the pre-rotated list of vectors by hand. So I created a small Java utility that does it and outputs the vector lists in assembly - that can be simply included into a Vectrex program. Here is the code, feel free to use it - I know I will use it a lot. Any questions, just ask here. github.com/mountaingoate/vectrex/blob/master/util/VecRot/src/VecRot.javaI just set up this GitHub account so if you have any problems, just let me know.
|
|
|
Post by mountaingoat on Aug 21, 2015 18:20:29 GMT -5
I apologize for replying to my own post but just realized that this should have been posted in the "programming" sub-section.
Maybe a moderator could move it.
Thank you.
|
|
|
Post by VectorX on Aug 21, 2015 18:27:48 GMT -5
(poof) Done
|
|
|
Post by cNp on Aug 24, 2015 10:33:51 GMT -5
Sounds cool, will try it soon!
cNp
|
|
|
Post by mikiex on Aug 28, 2015 17:00:41 GMT -5
Nice work, if I ever get around to making another game I might add something like this to my vector exporter for photoshop.
|
|
|
Post by vectrexrc on Oct 2, 2015 17:49:37 GMT -5
wow cool utility - will definitely use this!
|
|
|
Post by garryg on Oct 10, 2015 20:51:34 GMT -5
I had a look, it definitely seems better than pushing the graph paper around in 45 degree turns
|
|
|
Post by christophertumber on Oct 11, 2015 0:37:28 GMT -5
|
|
|
Post by mountaingoat on Oct 13, 2015 5:49:00 GMT -5
Yes, I used the java utility to rotate everything in Sub Wars. Both subs, torpedoes and even the countermeasures.
I will definitely check out V-Model as well as it seems really nice to have the drawing part build in already.
|
|
|
Post by christophertumber on Oct 13, 2015 9:45:36 GMT -5
V-Model a bit of a PITA to get running because DOS.
I haven't had a chance to look at yours yet, but, two functions I could not do without in V-Model are:
- Rotate through a series (ie; rotate an object X degrees Y times [though I did it in powers of two at equivalent degrees in order to give full circle rotation]) - It sounds like you may already have this?
- Maximize vector lengths for a series a shapes (rotations). Take the longest vector. Set it to 127 or -127 and rescale all vectors on that basis. For maximum drawing efficiency.
|
|
|
Post by mountaingoat on Oct 13, 2015 19:01:37 GMT -5
Christopher, mine is simpler than V-model. (Simpler in a less functionality kind of way :-) )
Mine basically does a 360 rotation and creates all vector lists. If you want a subset you just don't use all the 64 created lists.
It does warn if you go above 127 (-128) but will not rescale the vectors. It is a very good idea though, I think I will add an option to do so.
For output it gives you assembler with a some comments on how to use the created list of vector lists.
I only made it because doing it by hand was such a pain that it was actually way faster to create and debug the java tool :-)
|
|
|
Post by cNp on Apr 29, 2016 6:55:23 GMT -5
Finally got around to trying this and it works great... just selected one of the first rotations to test and it works great, thanks for sharing. Plan is to have the diver in Big Blue angle up and down slightly if you're swimming up or down the screen. There's also an 'enemy' I will be adding that will really benefit from being able to have rotating.
I've changed it for me to output fcb -1, ... instead of db
Having it rescale to make the maximum value throughout all the rotations as 127 or -127 would be great if you ever get time... think my java is so rusty and was never very good that I'd spend forever trying to do it and not get it right!
|
|
|
Post by mountaingoat on May 1, 2016 7:06:48 GMT -5
I think the re-scaling is a very good idea, probably will add it as an option.
|
|