Native coding tutorials with examples?

Discussions about Coding and Scripting
Post Reply
User avatar
Dizzy
Experienced
Posts: 109
Joined: Tue May 21, 2013 3:57 pm
Personal rank: Oaf
Contact:

Native coding tutorials with examples?

Post by Dizzy »

Do any simple tutorials exist for getting started with native coding in UT?
Join the BunnyTrack.net Discord chat server: https://www.bunnytrack.net/discord
User avatar
Gustavo6046
Godlike
Posts: 1462
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Resident Wallaby
Location: Porto Alegre, Brazil
Contact:

Re: Native coding tutorials with examples?

Post by Gustavo6046 »

It's just writing C++ with the UT public headers.
"Everyone is an idea man. Everybody thinks they have a revolutionary new game concept that no one else has ever thought of. Having cool ideas will rarely get you anywhere in the games industry. You have to be able to implement your ideas or provide some useful skill. Never join a project whose idea man or leader has no obvious development skills. Never join a project that only has a web designer. You have your own ideas. Focus on them carefully and in small chunks and you will be able to develop cool projects."

Weapon of Destruction
Sapphire
Posts: 2
Joined: Tue May 16, 2017 8:17 pm

Re: Native coding tutorials with examples?

Post by Sapphire »

Gustavo6046 wrote: Tue Feb 23, 2021 11:09 pm It's just writing C++ with the UT public headers.
Great reply. :gj:
User avatar
Dizzy
Experienced
Posts: 109
Joined: Tue May 21, 2013 3:57 pm
Personal rank: Oaf
Contact:

Re: Native coding tutorials with examples?

Post by Dizzy »

Gustavo6046 wrote: Tue Feb 23, 2021 11:09 pm It's just writing C++ with the UT public headers.
Is there not a layer of added complexity in making the code compile against and interact with UT, though?

I would love to see a simple tutorial like beginning a native mod from scratch - even as simple as writing "hello world" to the in-game chat.
Thanks, I'll take a look, although it seems like those are for Unreal classic and not UT, if that makes any difference.
Join the BunnyTrack.net Discord chat server: https://www.bunnytrack.net/discord
User avatar
Gustavo6046
Godlike
Posts: 1462
Joined: Mon Jun 01, 2015 7:08 pm
Personal rank: Resident Wallaby
Location: Porto Alegre, Brazil
Contact:

Re: Native coding tutorials with examples?

Post by Gustavo6046 »

Dizzy wrote: Thu Feb 25, 2021 10:06 pm Is there not a layer of added complexity in making the code compile against and interact with UT, though?
Kind of. UnrealScript abstracts away a lot of things, whereas in C++ you have to do a lot of stuff yourself.

I would love to see a simple tutorial like beginning a native mod from scratch - even as simple as writing "hello world" to the in-game chat.

In-game chat is an UnrealScript thing. Really, there's little reason to do most things in C++, unless you want to change something very internal about the game (like rendering), or unmediated, direct access to outside the game environment (like networking or the filesystem).
Sapphire wrote: Thu Feb 25, 2021 10:04 pm
Gustavo6046 wrote: Tue Feb 23, 2021 11:09 pm It's just writing C++ with the UT public headers.
Great reply. :gj:
Apologies, that sounded quite rude. My intention was to summarize what "native modding" means. I think people exaggerate it too much, it's nothing particularly extraordinary, nor is it really all that useful. Will it be faster? Depending on what exactly you're doing, maybe. Will it be worth it? Probably not. Unless you're doing something that is performance intensive, like rendering, or something that UnrealScript (or the Unreal VM's object-oriented aspect itself) would squander too many cycles trying and end up making unbearably slow, like a particle system.
"Everyone is an idea man. Everybody thinks they have a revolutionary new game concept that no one else has ever thought of. Having cool ideas will rarely get you anywhere in the games industry. You have to be able to implement your ideas or provide some useful skill. Never join a project whose idea man or leader has no obvious development skills. Never join a project that only has a web designer. You have your own ideas. Focus on them carefully and in small chunks and you will be able to develop cool projects."

Weapon of Destruction
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Native coding tutorials with examples?

Post by sektor2111 »

I'm not going for a looong post but what I would do at C++ Level:
- making a debugger support in run-time for finding non-colliding surfaces or stupid extra colliding spots- borked geometry;
- hunting brush dimensions;
- attempting a better "Paths Build" replacement;
- bringing in stage "Level Validate" command - it doesn't work anywhere, not even in newer 469 patch;
- replacing function DescribeSpec in the way how I want it and not what 469 has;
- perhaps an advanced paths debugger - C++ can get over iterations limitation from UScript.
- C++ working linked with OS natives definitely can use multi-core support - and yes, it's faster in all the way.
sn260591
Average
Posts: 75
Joined: Sat Jun 01, 2013 10:38 am

Re: Native coding tutorials with examples?

Post by sn260591 »

Dizzy wrote: Thu Feb 25, 2021 10:06 pm Thanks, I'll take a look, although it seems like those are for Unreal classic and not UT, if that makes any difference.
At least "hello word" works for UT as well, if you use these headers and change a couple of settings in the project (tested with vs2019).
User avatar
anth
Adept
Posts: 257
Joined: Thu May 13, 2010 2:23 am

Re: Native coding tutorials with examples?

Post by anth »

The UT v432 public source distribution includes a native "hello world" mod, but the entire project needs some tweaking if you want it to work with modern versions of Visual Studio.

When 469b launches, we will publish an updated public source distribution on GitHub. These headers will work with Visual Studio 2019 and the latest versions of gcc/clang.

Aside from the sample native mod, I'm not aware of any real tutorials. You can, however, ask the OldUnreal devs for help on discord or on the native coding board @ oldunreal.com.
Post Reply