Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, 1 invisible), 584 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Planning to convert a large program to C-Lite? #184864
02/21/08 04:31
02/21/08 04:31
Joined: Oct 2002
Posts: 2,256
Oz
L
Locoweed Offline OP
Expert
Locoweed  Offline OP
Expert
L

Joined: Oct 2002
Posts: 2,256
Oz
Don't do it!

A large program being 100,000 lines of code or more, hundreds of resources(models, bitmaps, etc) with high Nexus (200+), and many dll's and such. It is just too much of a pain in the arse. Just wait until your next project and start a virgin program with C-Lite.

After about a month plus of converting to even get it to compile (and never getting it to compile on lower end machines that worked with C-Script), googles of crashes with no errors (those being Windows crashes), hunting those crashes with no idea what caused them except for thousands of diag()'s in code (basically using diag()'s as a bubble sort to find where it crashed, usually dll related, but not always), and having put in so much time you really have no choice but to get it converted, you will eventually realize it wasn't such a good idea after all.

Trust me.


Later,
Loco

P.S. I am not saying it can't be done, but I don't see the gains versus the problems I have had being worth the trouble to convert a very large program at this time. Just too much trouble and not even sure now that I have all running correctly in Test Runs with SED or WED whether I can get the very large program to Publish with C-Lite correctly just yet, which is also somewhat worrisome.

And yes, I can convert little programs of 10,000 codes or less from C-Script to C-Lite in a day or two and publish them no problem. So if you have a small program I suggest converting it, although you will still have to learn quite a bit before you can do that in a day. While you are learning the process, it might take you a week or more the first time.



Professional A8.30
Spoils of War - East Coast Games
Re: Planning to convert a large program to C-Lite? [Re: Locoweed] #184865
02/21/08 05:06
02/21/08 05:06
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
well I too started of conversion of a c-script game to lite-C but so far the compiler has been fairly accurate in telling the changes that need to be done.
Are you talking about conversion from C/c++ projects to liteC ?

regards
zazang


I like good 'views' because they have no 'strings' attached..
Re: Planning to convert a large program to C-Lite? [Re: zazang] #184866
02/21/08 05:16
02/21/08 05:16
Joined: Oct 2002
Posts: 2,256
Oz
L
Locoweed Offline OP
Expert
Locoweed  Offline OP
Expert
L

Joined: Oct 2002
Posts: 2,256
Oz
Hi zanzag,

No, I am talking C-Script to C-lite.

How big is your program, how many resources do you have, what Nexus do you have to have to run program in C-Script, and are you running many dll's with program?

I am saying don't waste time trying to convert a very large program, not small or medium ones.

I mean just the conversion process for let's say changing 100 panels to
panel* = and changing all the some_panel.visible = on; and
some_panel.visible = off; in code to
set(some_panel,VISIBLE); or reset(some_panel,VISIBLE)
(or even some_panel.flags |= VISIBLE; if you like) can take days if you have a 100 panel definitions.

------------
Lol, heres one of many for you, use
set(some_panel,VISIBLE);
and accidentally forget the ; at end like
set(some_panel,VISIBLE) or set(some_entity,PASSABLE)
which easily happens coverting large programs and see what C-Lite tells you after compile crashes
compiling......................................................
Aknex.exe Encoutered a Error, must Puke and Shutdown - Woot!
(I am always tempted to send that error report to Microsoft when it asks)
with no error and no data and try to find that line of code in 250,000 lines of code then you will start to get the idea.
If you didn't know the line of code because I told you the line of code, think about finding that without nothing to go on.
That wasn't even the worse one, but that is an easy one to test out yourself. Leave the ; off of set() or reset(), see what info C-Lite gives you on that. No biggie with 10,000 lines of code, disasterous to find with 100,000 + lines of code.
The perverbial find the needle in the haystack baby. All you know is the compile crashed and you have to start commenting out all the included files, then once you find the file, then try to find the function by commenting them all out one at a time, then once you find the function then you have to find the line (and every time you comment out a included file or function it effects something else resulting in different errors). Not much fun when you have tons of code and this is only the compile phase. Not much fun at all.
-------------

Anyhow, I was talking about very large programs. I have just been frustrated with conversion of this very large program and even after I get it running well in test runs, not even being sure if I can get I to publish after what will soon be months of work (Of course, the program itself is like 3 years of code, 700mb, and oh 500 resources or so in it). I have converted many smaller medium programs like my Locoweed's Multiplayer tutorial in short order with no problem.

I am done talking about my frustration, it is just a warning for people considering converting large programs over to C-Lite.

Niters,
Loco

Re: Planning to convert a large program to C-Lite? [Re: Locoweed] #184867
02/21/08 06:11
02/21/08 06:11
Joined: Oct 2003
Posts: 702
Z
zazang Offline
User
zazang  Offline
User
Z

Joined: Oct 2003
Posts: 702
Aha I think Your program is way too large than mine !

I have 36 c-script files with on an average 500 lines each
which means around 18000 lines in all.Its a LABORIOUS task really
but we plan to use the same code in another future project with new cool
features of liteC,so we just have to do it.The worst of all
this conversion part is changing flags like my.invisible to
a set(my,INVISIBLE)...After the entire conversion is done,then we have to check
if everything is as good as it worked in c-script..Hopefully that wont be
a big pain:P


I like good 'views' because they have no 'strings' attached..
Re: Planning to convert a large program to C-Lite? [Re: zazang] #184868
02/21/08 06:20
02/21/08 06:20
Joined: Oct 2002
Posts: 2,256
Oz
L
Locoweed Offline OP
Expert
Locoweed  Offline OP
Expert
L

Joined: Oct 2002
Posts: 2,256
Oz
Yeah zazang,

I am not telling people not to convert, because after I converted some smaller programs, I saw a noticeable difference in performance for the good, especially fps, which is why I decided to convert the larger program. I am just warning people after they convert some small and medium projects and think, wow, let's convert the larger project. to seriously consider if it is really worth it. Because once you start and invest all the time in it, it gets to a point you have to try to finish it off, even though the gains end up not being worth the time you spent to do it. It will become very time consuming. I was converting for a month before the dang thng even ended up compiling, and I wasn't really sure if I would ever get it to compile. Now after that, I thought the hard part was done, but still trying to change and get all dll's and other stuff working and parameters right has been just as tough, with many other quirky stuff.

Sincerely,
Loco

Re: Planning to convert a large program to C-Lite? [Re: zazang] #184869
02/21/08 06:21
02/21/08 06:21
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
Would worry more about compile time during conversion


smile
Re: Planning to convert a large program to C-Lite? [Re: D3D] #184870
02/21/08 06:52
02/21/08 06:52
Joined: Oct 2002
Posts: 2,256
Oz
L
Locoweed Offline OP
Expert
Locoweed  Offline OP
Expert
L

Joined: Oct 2002
Posts: 2,256
Oz
I will give one example of many that will get you the dreaded Aknex.exe Crashed after the compile process is done also. Might help someone.

Old dll stuff will get you crashed with no warning very easily. Not to mention the changing of the dll code itself.

C-Script Version:

Let's say we had an old dll function declared as
dll_function SendString(some_string);
string temp_string;
now we call the SendString function with
SendString(temp_string);
or
SendString("Hi Mom!");
This works fine in C-Script.


C-Lite version of dll function:

function SendString(STRING* some_string);
STRING* temp_string = "#16";
now we call SendString function with
SendString(temp_string); // this is ok
or
SendString("Hi Mom!"); // Oops, we get one of those damn Aknex crashes with no data on this line
it should be
SendString(_str("Hi Mom!")); // this is right

But if you don't get it right, don't expect C-Lite to tell you what happened because it won't. You will have to hunt this line of code down in your own slow painful way.

This is not the only post compile aknex.exe crash with no info you can get, there are quite a few, but just a common one that might help others when it comes to passing temp strings to dll functions.

Now I am done, off to bed,
Loco


Professional A8.30
Spoils of War - East Coast Games
Re: Planning to convert a large program to C-Lite? [Re: Locoweed] #184871
02/21/08 09:47
02/21/08 09:47
Joined: Feb 2008
Posts: 11
Portugal
T
Thiago_7 Offline
Newbie
Thiago_7  Offline
Newbie
T

Joined: Feb 2008
Posts: 11
Portugal
The find and replace option doesn't help?

Did you do that game alone? It took 3 years?


"i dunno"
Re: Planning to convert a large program to C-Lite? [Re: Thiago_7] #184872
02/21/08 10:48
02/21/08 10:48
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
the lite-c crashes with no helpful information really are horrible. debugging in SED is a pain too. for example if the engine crashes SED quits and you have to load everything again. i hope this gets improved soon.

i had many problems because my and you behave differently in lite-c and that i didn't write the original code myself didn't really help either.

Re: Planning to convert a large program to C-Lite? [Re: ventilator] #184873
02/21/08 11:40
02/21/08 11:40
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
Quote:

i had many problems because my and you behave differently in lite-c



Could you expand on that? What's different?

Page 1 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