Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 552 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
VSCode instead of SED #483133
05/05/21 13:14
05/05/21 13:14
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hey.

I just wanted to cover migration from SED to VSCode on my own experience (thx to MasterQ32 for helping me out with this in the past!).
SED is a complete oldass compared to VSCode and lacks a lot of modern additions (autoformating, autocomplete/IntelliSense, build-in git, etc).
When your project grows bigger and bigger it's just not comfortable to work with SED (especially when you once tried working with VSCode).

Migration is quite simple, and most of the things work out of the box.
To do that follow these steps:
Quote
1) install VSCode from the official page (don't forget to select both Add "Open with Code" (see screenshot bellow));
2) open VSCode, go to the 'Extentions' tab on the left side of the screen (or simply press Ctrl+Shift+X);
3) in 'Search Extensions in Marketplace' type 'C/C++ Microsoft';
4) from the searching results select the very first extension and install it (see screenshot bellow);
5) copy .vscode folder from the attached archive into your projects folder;
6) open launch.json and c_cpp_properties.json files and make sure, that path to Acknex is correct;
7) make sure that your main script is called 'main.c' (contains main function), otherwise change it in the launch.json;
8) right click inside of your projects root folder and press "Open With Code";
9) when your project will open with VSCode, to run it press CTRL + F5 (without debugging) or F5 (with debugging)

I recommend to swap 'Start Debugging' and 'Run Without Debugging" keybindings, because I didn't really find debugging being useful.

Keybindings:
Quote
-autoformat: Shift + Alt + F
-run project: F5 (or CTRL + F5)

Known issues:
It's mainly related to the autoformatting, since it doesn't recognize Lite-C specific code, f.e. it doesn't recognize this:
Code
ENTITY *view_ent = 
{
	layer = 2;
}

PANEL *example_pan = 
{
	flags = UNTOUCHABLE;
}
So it marks it like a mistake and formats it wrong too...
[Linked Image]
It DOES compile, since compiler has nothing to do with VSCode. But it just looks ugly.
The solution: define all panels, entities, materials as pointer and initialize them by hand, but don't forget to remove them on exiting the engine!
Or you can write this kind of specific code in SED and don't format it in VSCode to avoid making it ugly. But I would recommend the first solution.
If the project is big (has many separate .c/.h included files), and you include new script in it, it might take a little time for VSCode to link all 'includes' between each other.
This leads to global variables not being 'recognized' in the newly included script, and VSCode will mark those variables as mistakes + IntelliSense won't work.
The solution is simple, reopen the project + open 'main.c' (where all includes are listed). But even like this it might take 1-2 minutes.

Step 1:
[Linked Image]
Steps 2, 3, 4:
[Linked Image]
Run keybindings:
[Linked Image]

.vscode:
Download link

All credit goes to MasterQ32 who originally helped me out.

Best regards!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: VSCode instead of SED [Re: 3run] #488146
03/01/24 19:06
03/01/24 19:06
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
With the new version of the C/C++ Extension (1.19.4) I've encountered problems with the IntelliSense. Moving back to an older versions (at least 1.19.0) helps to solve the issue.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung

Moderated by  HeelX, rvL_eXile 

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