HP Forums

Full Version: LINE_P() and TRIANGLE_P help!!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a question about the LINE_P and TRIANGLE_P commands. Both of them have optional advanced syntax, the help hints that it can be used for 3D functions and the such!! I have a hard time understanding the help on it is could someone could show me and give an example, the help is very appreciated Wink
Hello,

Han is the specialist in this domain. He uses the functions extensively in his 3D grapher.

Cyrille
Here's a short article that should help you get started for TRIANGLE_P; LINE_P should be very similar.

http://www.hpmuseum.org/forum/thread-5122.html
Thanks Wink
Would this be applicable for a game, or even fast enough?
Hello,

It depends what you want to do, how many triangles you have to draw...
It is not slow as Han's 3D drawer shows, but it is not rocket fast either...

Cyrille
I was thinking for a game I am making in 2D, MinePrime over at Codewalr.us. From the start I wanted to make it 3D but never thought I could, I would have o make th POV really small so I wouldn't have to draw so many. There would probably be < 200 but textures would be impossible xD
hello,

Yep, sorry, at this point in time, triangle only colors, but does not texture.

cyrille
*uses triangles for every pixel on block

*gets < 0.000000000000001 FPS Tongue
(01-31-2016 05:17 AM)alexgt Wrote: [ -> ]*uses triangles for every pixel on block

*gets < 0.000000000000001 FPS Tongue

If my maths is right, that is about 1 frame per 32 million years, isn't it?

I think I am going to need some long-life batteries...
And you will have to be a time lord xD
The Prime can do graphics pretty quickly. Have a look at http://www.hpmuseum.org/forum/thread-5628.html
Wow! Nice Smile

What method did you use for the 3D effect?
It's described as Pseudo 3d: parallax scrolling for the background, proper 3d rendering for the road segments and blit the car at the bottom of the screen.

That the Prime can hold png files with transparency within an application structure and blit them to the screen very quickly really helps.

To stop flicker, build up your graphics in say G1 and when complete blit them to G0.

Have a look at this fantastic set of tutorials:

http://codeincomplete.com/posts/2012/6/2...ipt_racer/
Yeah, I use drawing to G1 then to G0 to solve flicker quite a lot but I was interested in the 3D Tongue
Reference URL's