I give up, help programmers friends ... [Archive] - UnrealTournament Siege, Bunnytrack, Combogib, Instagib, UT99, UT4 clan & Server Discussion

PDA

View Full Version : I give up, help programmers friends ...



i_remember_my
07-27-2013, 09:13 PM
hello all. I give up. someone give me some advice?
programmers. I know enough of the unreal editor, but the only thing I can not understand is the unreal script editor. as it is, without that is not going to run right into the unreal.
only ask for advice to understand the functions of unreal script. is used languages ​​C + + and java.
I know they could study in computer systems engineering. but does not give me time.
if there is a quick way to learn, in good time.
thanks in advance

OuTlaW
07-28-2013, 10:00 AM
This is called Coding, it's so complicated
Some of the people that might help you : (that i know)
Feralidragon
Higor
Wildcards

|uK|fleecey
07-28-2013, 12:07 PM
Im sure Sam, chis, Higor, fluke....etc know how to help you!

Higor
07-28-2013, 02:27 PM
Start here:
UT99.org | Development School (http://www.ut99.org/viewforum.php?f=57)

Tutorials with small samples:
Legacy:UnrealScript Lessons - Unreal Wiki (http://wiki.beyondunreal.com/Legacy:UnrealScript_Lessons)

What is an actor?
Legacy:Actor (UT) - Unreal Wiki (http://wiki.beyondunreal.com/Legacy:Actor_%28UT%29)

How does unreal's networking does it's job?
UDN - Three - ReplicationHome (http://udn.epicgames.com/Three/ReplicationHome.html)
And in UT99's case alone:
Legacy:Replication De-Obfuscation - Unreal Wiki (http://wiki.beyondunreal.com/Legacy:Replication_De-Obfuscation) >> I learnt a lot here.

What happens when you load a map:
What happens at map startup - Unreal Wiki (http://wiki.beyondunreal.com/What_happens_at_map_startup)

What happens when you create an actor:
What happens when an Actor is spawned - Unreal Wiki (http://wiki.beyondunreal.com/What_happens_when_an_Actor_is_spawned)


My very little description of what the engine is.

Instruction:
It's an action performed by the 'machine'.

Low level language:
The instruction set generated runs directly on the cpu.

High level language:
The instruction set generated runs via a low level program.


Most apps coded in c++, c, basic, and specially with ASM blocks run faster, the cpu processes their actions at greater speeds. (CPU > program)
Then you have java, .NET and other scripting modules that are actually ran by a parser. (CPU > parser program > script)

Unreal Engine is a nice mix of both, how do you tell what is in c++ or in unrealscript?
Simple: the code you don't see is in low level language, this is basically because it runs 15-20x faster than it's UnrealScript counterpart.
The name we'll give to that hidden code is NATIVE code.

Examples of this includes rendering and physics calculations.
You'll find lots of 'native' functions in Actor, the guides above will tell you what these functions do (because unrealscript doesn't provide the code).
Making a mod in unrealscript is basically creating a Virtual Machine environment that Unreal's native script parser compiles and reads later.

Some modders, me included, have gone a bit further, creating their own low level implementations (aka DLL's and native code) for their own unrealscript mods, but you'd have to know a bit of c++ and a lot about how the engine works when attempting to try this.

A map of how the UT EXE and core work:
> Main loop (loop function)
> Update engine
> Update level
> Update world (all actors, via Tick)
> Render world (not on dedicated servers)
> Process replication (not in single player)
And go back up again, this whole process is a single 'frame'.
Making a simple weapon would require you to know about:
- World update (when does the weapon code comes up)
- Rendering (because you may want to add stuff to screen)
- Replication (because your weapon may not work otherwise)

Yes, a simple weapon is the worst place to start coding for Unreal.
Before you make a weapon, you should make a simple level, with simple 'custom' experiment actors you make and see how they perform.
The LOG() function gives you a lot of information of how and when stuff happens.

--- Updated ---

Ah, and before you ask anything else:
The best UT modders aren't the ones that understand the language, but those that understand the engine.

What makes the ultimate UT modder:
10% - UnrealScript
75% - Engine understanding > Many lack this, the guides i posted above teach a lot, the UT 432 public sources also teach a LOT about the engine.
10% - Imagination
5% - Ability kill a bug in less than 30 minutes (aka, debugging techniques).

So yeah, first try to understand how the engine works.

i_remember_my
07-29-2013, 12:40 AM
thanks Higor muchas gracias...

][X][~FLuKE~][X][
07-29-2013, 05:57 AM
Took me two years to learn the Uscript I have learned around RX coding, best way to learn is to look into the .uc script files of default UT functions and mess with them to see how they work.

Feralidragon
07-29-2013, 03:03 PM
Well put Higor, that's pretty much it.


What makes the ultimate UT modder:
10% - UnrealScript
75% - Engine understanding > Many lack this, the guides i posted above teach a lot, the UT 432 public sources also teach a LOT about the engine.
10% - Imagination
5% - Ability kill a bug in less than 30 minutes (aka, debugging techniques).
I guess my score is 65% lol (10% + 45% + 6% + 4%).
My problem with the last one is not even discovering the bug, but actually fix it sometimes when they involve a massive turn around or really ugly hacks... (generally related with engine bugs and limitations).

But I would say that the engine understanding is only about 50% of it, whereas the last 25% is defining the architecture and algorithms. The mainstream regex algorithms are good examples on how bad things can go when you go straight to code (talking about something taking years to process vs a few microseconds in a worst case scenario).
So here's an advice to new developers: think about the code you're going to write before you actually start writing it. Architecture and algorithms are far more important than code itself, so structure things first, then translate that structure to code. You will thank yourself by doing so, every time your architecture proves to be good enough for you to never need to change it to implement new things or fix bugs, rather than waste a lot of time rewriting or restructuring something.

Higor
07-29-2013, 09:45 PM
but actually fix it sometimes when they involve a massive turn around or really ugly hacks...
I know that feeling, I had to rewrite some core Siege aspects (category, constructor, item spawner) entirely from scratch to get around the limitations :(


Architecture and algorithms are far more important than code itself, so structure things first,
And the second reason of the most rewrites, your nailed it.

8% -> I was, I am, I will ever be an ape at uwindow.
60% -> The UT432 headers profide great understanding of the engine (enough to put you on 50% lol), but also...
I found a collection of Engine .cpp files for something that's an incomplete mix of Unreal Engine 1 and Unreal Engine 2, with the actual code for most iterators and latent states :ape:, an eye opener here (IRC should be a safer place to discuss this stuff).
3% -> Mappers have the greatest imagination IMO, it takes a really creative mind and I've only finished 3 (?) maps in my entire UT modding history, I just create a new system when I need to get around limitations I find.
5% -> Making dozens of builds a day =)

~V~
07-30-2013, 01:55 AM
I've learned quite a bit about UWindows since I began XConsole, but I'm still finding new tricks to play with.

It's the other side of things that I need to improve on really, but I'm getting there gradually.

One of the most helpful things I think is to be able to run your own server locally to test mods on.

Feralidragon
07-30-2013, 07:47 AM
As for UWindow, it's really messy so I don't blame you. That's why when I made my mod, since it had to have menus for the settings as such (they were a must), I created a far simpler straightfoward menu system on top of UWindow, where all I have to do is to setup a few default properties, listen some events I created myself (on value change, on value load, and a few others), create some int files (since the system is based on int files to extend the menus any time I want without rewriting anything or creating dependencies), and voilá, I don't have to worry about UWindow ever again in its core anymore.
But it did take some time though to finish it properly and understand all its ins and outs.

Another advice to new developers (and even current ones): try to stay away from native as much as possible. If it's doable in UScript, use UScript alone. Native means that you have to worry with the hardware it's going to run on along with its operating system and even architecture (x86 or x64), and that's why UScript exists and why the whole engine is a big VM, so your mod works everywhere independently of the system (Windows, Linux, 32bit, 64bit, etc).

TimTim
09-12-2013, 07:09 AM
I created a far simpler straightfoward menu system on top of UWindow, where all I have to do is to setup a few default properties, listen some events I created myself (on value change, on value load, and a few others), create some int files (since the system is based on int files to extend the menus any time I want without rewriting anything or creating dependencies), and voilá, I don't have to worry about UWindow ever again in its core anymore.
This sounds incredibly useful. Is it open source? And is there anywhere I can quickly check it out in action?

Feralidragon
09-12-2013, 08:46 AM
Well, if you want to see it in action, you can download the NW3 mod itself: http://www.unrealkillers.com/f14/nali-weapons-3-release-3075/
Once installed, check the Mod menu above, and the NW3 settings there using this menu system.

As for the code itself, it's open source (everything in NW3 is open source and thus this menu system is no exception), however sometime ago I extracted the relevant classes (source) of the menu system in case someone wanted it, and you can get them here: NWMenusSSE.zip (http://www.mediafire.com/download/wdj4bs0jhsr3e1h/NWMenusSSE.zip)

And to help out on the understanding of how this stuff works, I wrote a very very brief description here: UT99.org | UWindow maker with GUI : Misc | Off-Topic (http://www.ut99.org/viewtopic.php?f=8&t=4719#p49466)
And you also have a manual which covers these up here: UT99.org | Nali Weapons 3 - Release : Modifications - Page 17 (http://www.ut99.org/viewtopic.php?f=34&t=4309&start=240#p49857)

As for the manual above, it's meant for the final version of the whole mod, thus the only relevant parts you want to know are in the NW3_SDK.pdf file, in the chapter 7 (7 - Menus).
Just mentally replace the class names with classname_MNSSE (since these are the ones in the source zip above), and you have somewhat an explanation how it works and how to set it up.
Feel free to use it, modify it or ask any questions you may have. :)