2D & 3D Vector Graphics Engine

Monkey Archive Forums/Monkey Projects/2D & 3D Vector Graphics Engine

Uncle(Posted 2012) [#1]
Hello,

I've been working on a new vector graphics engine for the past couple of weeks. We hope to make a few iOS and Android games with it once its all done. I knocked up a small demo based on my all time favorite game, and here's the engine running on Android...




slenkar(Posted 2012) [#2]
very cool


therevills(Posted 2012) [#3]
Great work! Love the Star Wars demo!


c.k.(Posted 2012) [#4]
Uncle, that is very cool. But you're not my uncle. :D


muddy_shoes(Posted 2012) [#5]
I've always been a fan of line vector graphics. I wonder if there's a nostalgia/retro market for games in that style in the same way as there is for "pixel-art".

Nice job. The trench run is a good candidate for tilt controls.


Neuro(Posted 2012) [#6]
Original Tron anyone :)? This looks great!


Rex Rhino(Posted 2012) [#7]
Cool! How are you drawing the lines?


slenkar(Posted 2012) [#8]
would it be possible to use mojo polygon drawing commands to make solid objects instead of wireframe?
(also textured poly :) )


Uncle(Posted 2012) [#9]
The engine supports ploys as well, but not textured. We wanted to add polys to allow us to create translucent objects.



The vector engine supports hidden line removal as well as kinda shown above. The lines are just glLineStrips, and everything is stored in VBOs. I had written a BMax version of this engine before but that used display lists, so it look a little time to convert everything over to VBOs.

For textured polys I think Adams minib3d is the way to go.


MikeHart(Posted 2012) [#10]
Andrew, that looks awesome! So you don't use mojo at all for it, right?


Uncle(Posted 2012) [#11]
Thanks Mike. Its opengl, so no direct mojo.


cs6505(Posted 2012) [#12]
Very nice! This brings back memories. I've been wanting to make a Star Castle clone ever since I saw this.

Do you have any plans on licensing the engine?


dooz(Posted 2012) [#13]
Cooool! I wanted to build that game, I love Star Wars!

Great job. I look forward to it on iPad!!!


Uncle(Posted 2012) [#14]
Small update to the demo Im working on. Now the turrets fire back and all the collisions are working...



Next thing to add is the players lasers. Im thinking they will be auto targeting as steering and firing will be pretty tough. Anyone else have any other ideas?


muddy_shoes(Posted 2012) [#15]
The original combined steer and aim with the target cross-hair leading the steering, didn't it? It was part of the play mechanic that you had to steer towards what you wanted to shoot.


Uncle(Posted 2012) [#16]


Another small update. I've spent some time working on the 2D routines and they are now working all ok. I tested out the routines by knocking up the attract screens and level select. This is all 2d.

I also worked on making sure the game could be scaled to different resolutions so now it works nicely on my little HTC Desire as well. The one thing I did learn is the accelerometer reading in Android are consistent. I needed to switch the x,y readings depending on the devices natural orientation e.g. on my tablet its natural orientation is landscape, however my phones is portrait. Would be some much easier if they stuck to one method.

Next step is to sort out a calibration screen, and then I will get the cross-hair moving and firing.


slenkar(Posted 2012) [#17]
you could do the official port of star wars


Paul - Taiphoz(Posted 2012) [#18]
looking better every time I see it mate, well done.


Neuro(Posted 2012) [#19]
This is really cool, can definitely see this being used for a Tron game! BTW, thats the second time i mention Tron in this thread :).


Uncle(Posted 2012) [#20]
Im still working on this, and now have the camerapick working so I can now shoot stuff. Quite pleased that the speed is still good.



Now onto the other two levels.

PS I know the video quality isn't brill but you get the idea.


therevills(Posted 2012) [#21]
Nice!

How are you now controlling the ship and the cursor?


Sammy(Posted 2012) [#22]
Looks great, does it intentionally fade towards the screen edge?


Uncle(Posted 2012) [#23]
Hello,

Im still experimenting with the controls at the moment. The version shown uses a virtual track pad on bottom left hand side of the screen. I tried tilting to get the cursor position but it was very playable. I might mix the two methods together i.e. tilt to position the ship, and track pad to move the cursor.

Referencing fading at the edge, I think this is just the poor video quality ;) however it would be easy to add with just a layover.


wiebow(Posted 2012) [#24]
Beautiful!


dopeyrulz(Posted 2012) [#25]
Yeah - great!


Sammy(Posted 2012) [#26]
[quote]Referencing fading at the edge, I think this is just the poor video quality ;) however it would be easy to add with just a layover[\quote]

Ah I see, well I actually think the fading at the edge gives it a worn out CRT effect that actually compliments the authentic look of the vector display.


MonkeyPlotter(Posted 2012) [#27]
Very impressive looking!


ordigdug(Posted 2012) [#28]
This looks cool! I wonder how the progress is going.
@Uncle -- Any updates?


Uncle(Posted 2012) [#29]
Hello,

The first level (the tie fighter space battle) was nearly finished but I haven't had time to code anything for about 6 weeks now. Hoping real life will calm down soon so I can back to it.


MikeHart(Posted 2012) [#30]
Hi Andrew, wish you all the best and that you get back on track soon.


Uncle(Posted 2013) [#31]
Finally found some more time to work on this :) Stage 2 is almost complete...



Sorry for the crappy video quality.


wiebow(Posted 2013) [#32]
So cool!


silentshark(Posted 2013) [#33]
Amazing..


Chroma(Posted 2013) [#34]
This was one of my favorite games at the arcade when I was a kid. Looking forward to playing this.


Sammy(Posted 2013) [#35]
Amazing attention to detail, well done!

BTW how are you handling the 3D transformations?


Uncle(Posted 2013) [#36]
Hi and thanks to all. Its a fun little project this one :)

@Veggie the 3D transformation are handled by opengl thankfully.


Sammy(Posted 2013) [#37]
Thanks Uncle, the reason I asked is that I tried to make a similar engine but when a 3d point was projected behind the camera I got a negative Z value in the 3d-2d (gluProject) point. Any advice on getting this would be GREATLY appreciated Uncle?