Gamestudio Links
Zorro Links
Newest Posts
zorro license, IB connection
by miwok. 12/06/23 16:32
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (miwok, AndrewAMD, TipmyPip, 3run, Quad, 1 invisible), 645 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Points and faces [Re: FBL] #345813
10/29/10 23:53
10/29/10 23:53
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
I did a conversion for the source code to Lite-C.
It had some major quirks, but compiles now.

The problem is that I get some sort of empty pointer error in the add_segment() function which I can't seem to figure out in all this Spaghetti code.

Guess I'm stuck with this... frown

Re: Points and faces [Re: FBL] #345830
10/30/10 13:28
10/30/10 13:28
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
i still don't know what exactly you need this for?

are you working in 2d or 3d?

do you create the polygon shapes yourself? if so, can't you follow some rules (for example connect the holes to the outer border manually) to make it easier for the algorithm?

maybe instead you could work with pixels and a marching squares algorithm to generate a mesh? could be much easier.

or i would further investigate different open source mesh libraries and check if they have useable triangulation algorithms. openmesh, assimp, cgkit, blender, wings3d,...



edit: oh! reading the previous posts you made on the forum i guess you are trying to automatically convert a3 games to a7/a8 or something? laugh

Re: Points and faces [Re: ventilator] #345850
10/30/10 14:03
10/30/10 14:03
Joined: Dec 2008
Posts: 271
Saturnus Offline
Member
Saturnus  Offline
Member

Joined: Dec 2008
Posts: 271
As ventilator already said, probably it would be more efficient to use a stable library for this. But I also have to note, that doing it yourself is also a fascinating task. At least that's what gets me motivated to do such things. laugh

Perhaps you don't mind to share the source of your conversion?

Re: Points and faces [Re: Saturnus] #345860
10/30/10 14:39
10/30/10 14:39
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
got it narrowed down to Lite-C resolving return a++; differently than standard C++ compilers...

Together with the if expression resolving problem of Ltie-C I got it fixed...



at least the included sampel is working. YAY!

Thanks for all your help.

Re: Points and faces [Re: FBL] #345861
10/30/10 14:41
10/30/10 14:41
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
I can share the modified version of the original source so it does compile and (at least seems to) operate with Lite-C.


But it has Spaghetti code functions with more than 600 lines (ouch!).
I did not try to fully understand it - but got to understand more than I wanted for resolving the compiler problems.

@ventilator: the input data is fixed (and can be very wild). I cannot take care to create compatible stuff. You assumption is not far off.

Re: Points and faces [Re: FBL] #346098
11/01/10 10:39
11/01/10 10:39
Joined: Sep 2003
Posts: 9,859
F
FBL Offline OP
Senior Expert
FBL  Offline OP
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
Lite-C for some reason messes up with bigger shapes.
I don't know what is going wrong. The code for triangulation is clearly written not nice. In fact it is extremely ugly.

Maybe there is still a flaw hidden where I forgot to patch the code for Lite-C or some internal stack has problems (doubtful).

Anyway I could not solve this and now I compiled all the mess into a DLL and use this one from Lite-C. This works fine.


...and it shows off a big problem of Lite-C. Porting things should not be such a hassle.

Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1