Half-Life Re-imagined competition results on their way...
Check out Skewing textures in Hammer, our newest tutorial!
Welcome, MD_AZMAL, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

8

Cobalt

17

Turquoise

4

Cyan

8

Royal

3

Teal

3

Onliners

2 mins

Strider

5 mins

abbadon

8 mins

Jessie

22 mins

Loulimi

56 mins

Admer456

58 mins

Penguinboy

1 hours

Solokiller

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

Half-Life engine access

1 2 3 4 [5]

Forums > HL Engine Discussion

10 Apr 17, 19:18
By Solokiller
avatar
Member
PowerSource is what i'm calling the redesigned version of the engine, this is just a rebuild to get the source code so that can be done.
10 Apr 17, 20:23
By abbadon
avatar
Member
We can't wait... and you know it Headcrab Basher - :crowbar:
11 Apr 17, 00:12
By Solokiller
avatar
Member
Partially implemented tier0 because tier1 calls into it. The launcher now gets as far as loading the engine before quitting.

Next up: engine startup. I've been wanting to untangle this mess of virtual calls for months now.
11 Apr 17, 18:50
By Solokiller
avatar
Member
"I'm just going to implement one interface" he said...



I've implemented nearly the entire filesystem, part of the info key buffer code, parts of the IEngine, IGame, IVideoMode, Steam interface classes, bits and pieces of logging, command line handling.

This engine is pretty tangled up, so i ended up 3 layers deep pretty quickly.

Still, it's going pretty fast. A few weeks from now the majority will be ready at this rate.
11 Apr 17, 21:00
By abbadon
avatar
Member
Eager to try TVE powersource engine Headcrab Basher - :crowbar:
11 Apr 17, 21:43
By James Luke
avatar
Member
I might have missed something, but are there going to be like 2 versions of this?

Just the plain dump of the engine and an updated version almost like HLEnhanced?
11 Apr 17, 22:17
By Solokiller
avatar
Member
What i'm working on right now is a rebuild of the engine as-is, probably without the netcode so you can only play singleplayer.
Then i'm going to use that build as a starting point to make a new engine that runs as a mod under vanilla HL so it has the same Steamworks access, and then i'll implement an ENet based networking system to fill in the blanks.

With that done, the engine should be fully functional. Then we can start hunting down bugs, adding features and improving the engine in general.

I'd avoid this build if you can because it's skirting the edge of what's legal. I don't want to provide a way to use this engine to cheat, so some features may need to be left unimplemented.
12 Apr 17, 13:07
By abbadon
avatar
Member
As long it can run HL mods avoiding those stupid 1997's limits, I am sure the modding community will be more than happy wink-wink - ;)
12 Apr 17, 14:39
By Tetsu0
avatar
Tet Soo Oh
Where'd you learn to code?
12 Apr 17, 14:43
By fuzun
avatar
Member
Good job Solokiller. I hope it will not use MFC or some shit like stdafx.h.
12 Apr 17, 15:34
By Solokiller
avatar
Member
Quote:

As long it can run HL mods avoiding those stupid 1997's limits, I am sure the modding community will be more than happy wink-wink - wink-wink - ;)


I'm going to smash through that glass ceiling so hard they'll be pulling shards out of their asses 5 years from now.

Quote:

Where'd you learn to code?


I started by programming PLC's, meaning microcontrollers that use a simple drag-n-drop interface to set up AND, OR, and NOT logic to control things like lights, motors, etc. I programmed a street light setup with it once, then promptly replicated it in a Source engine map.

After a few years of that i started looking into the Source SDK. I downloaded VS2005 express and looked around, i read the My First Entity tutorial (https://developer.valvesoftware.com/wiki/Y
our_First_Entity) and tried to understand it as best i could.

I didn't really start to program stuff until i started a college course in GameDev, but i wasn't cut out for the non-programming parts. Programming was by far my best skill, followed by 3D modeling (square shapes and on-grid design a la GoldSource).

So i started a college course in computer science, where i easily completed the programming classes, and failed at everything else. That's what i'm dealing with these days.

Most of my skills are self taught, i learned by following tutorials and studying existing codebases, like Source, and experimenting with various technologies.

For instance, i learned how to load libraries at runtime because i was experimenting with engine design and i wanted to put my GDI and Direct2D graphics implementations into separate libraries, like Source does it. So i looked it up, learned how it works, and tried it out.

That's how i learned everything i'm using now. I learned to use OpenGL by following tutorials and then making a basic BSP viewer, i learned to reverse engineer by fooling around with IDA.

I actually started doing that because i wanted to know why Hammer didn't save some of the spawnflags that you can set on entities. I got tired of waiting for it to be fixed by an engine programmer, so i said fuck it and figured it out myself.

Then one day i decided to look at the Linux version of the game to see what it looked like, lo and behold, it was human readable.
I learned how to interpret the pseudo code, how to fill in the gaps, notice when the disassembler makes mistakes or when it's showing optimized code, and now i can pretty much pull anything out of those libraries. Combine that with the open source Quake codebase and Source SDK code and i can put the entire engine together.

I've been programming in C++ for 8 years now, and PLC's before that was about 3 years. I've always been good at logical stuff, so it was easier for me to learn this than the average person.

The reason why i'm doing this is because i'm probably one of few people who can, and fewer who will.
At the end of this week i'm going to send an email to Valve telling them what i've done, and hopefully convince them to work with us to open source the engine. Maybe if they see how easily this is done they'll reconsider. Either that, or they'll send me a cease and desist letter forcing me to stop. Most likely however i won't get any reply whatsoever.

Quote:

Good job Solokiller. I hope it will not use MFC or some shit like stdafx.h.


I'm staying as far away from MFC as i can. I doubt i'll need anything like it anyway, VGUI2 covers that.
12 Apr 17, 16:09
By Tetsu0
avatar
Tet Soo Oh
Freaking awesome dude. I'm a PLC and HMI programmer by trade. Dabbled in source programming once or twice and failed and quit haha
13 Apr 17, 20:46
By The Mad Carrot
avatar
Karottenjung
I have no idea what's being done here or whatever you guys are talking about. User Posted Image
13 Apr 17, 21:28
By Bruce
avatar
Member
me neither. He sure like to type tho
13 Apr 17, 21:37
By James Luke
avatar
Member
I always find them enjoyable to read.
13 Apr 17, 22:13
By Solokiller
avatar
Member
Quote:

Freaking awesome dude. I'm a PLC and HMI programmer by trade. Dabbled in source programming once or twice and failed and quit haha


So you're an electrician? I was taught PLC programming as part of my education as one.

Quote:

I have no idea what's being done here or whatever you guys are talking about. User Posted Image


I'm rebuilding the GoldSource engine and making the code available to everyone.

Quote:

me neither. He sure like to type tho


I like to explain stuff.

Quote:

I always find them enjoyable to read.


Glad somebody likes it smile - :)

I got some more stuff done, almost have the basics for startup done. I noticed that ReHLDS is slightly different in some areas, but that may be a deliberate change.
14 Apr 17, 15:51
By Solokiller
avatar
Member
Sent an email to Valve telling them about what i'm doing, asked for help again. Here's hoping they'll change their minds.
14 Apr 17, 22:23
By abbadon
avatar
Member
Crossing fingers and toes...
15 Apr 17, 04:54
By Tetsu0
avatar
Tet Soo Oh
Electronic engineer and electrical designer
15 Apr 17, 21:32
By abbadon
avatar
Member
Oh, Solokiller, would PowerSource have the same feature as Xash, on which you must only need to add the proper map in the proper folder to see it as a menu background? (please tell me "yes" Headcrab Basher - :crowbar: ).
15 Apr 17, 23:24
By Solokiller
avatar
Member
That would take some doing, but it's possible.
16 Apr 17, 21:36
By abbadon
avatar
Member
I will wait!! wink-wink - ;)
17 Apr 17, 11:55
By abbadon
avatar
Member
Btw. Will it have Steam/Won folder dependency?, I mean? Will the mod must be on steam/hl/ folder or will it go as in Xash on the PS/ folder?
17 Apr 17, 12:21
By Solokiller
avatar
Member
It will require the Steam Half-Life installation. I haven't figured out yet where everything will go, that depends on what kind of limitations i'll encounter.
18 Apr 17, 09:15
By xawari
avatar
Member
fuzun Y so mad? grin - :D HL1 launcher was written in MFC smile - :)

Good job, Solokiller! I hope one day we'll have a complete engine with all possible features.
But right now I already see some projects overlapping. I understand that people doing it just because they want to, but really... If Xash, rehlds, nosteam, other devs and you could cooperate, things could be done 10x faster. And probably better. And with sources we could port our games to whatever platform we want.

PS: Steam? Meh :-/
18 Apr 17, 09:56
By Solokiller
avatar
Member
Xash seems to contain leaked code, and ReHLDS may also contain some, and i've already noticed some differences here and there in its code, so i can't be sure it's the same.

Making it require Steam ensures that it's as legal as possible. It's also required to list servers on the server list.

All of this would go faster with Valve's assistance, but despite my repeated requests they haven't done anything.
18 Apr 17, 11:34
By rufee
avatar
Sledge fanboy
Quote:
It's also required to list servers on the server list.

Is it? Don't you just have to query it and keep sending the heartbeat?
Or do they perform authentication ?
18 Apr 17, 12:02
By Solokiller
avatar
Member
No, you need to use the Steamworks API to connect with the master server, and only programs with a valid App Id can do that. That's why it has to run under Half-Life, so it has the program's permissions.
18 Apr 17, 12:59
By abbadon
avatar
Member
Quote:
It will require the Steam Half-Life installation. I haven't figured out yet where everything will go, that depends on what kind of limitations i'll encounter.


Mmm, what should be the steps to make a mod run under PS?, I mean, "they must go to C\:steam\hl\yourmod folder and then run PS.exe with the command line..." for example. rolls eyes - :roll:

And, using Steam will not cut the wings of many of us non-steam users? (because of the stay-connected mania to do everything, even installing bought-on-store games).

And most important, can then mods made for PS be greenlighted on steam for those wo want to? (not me, of course, all of you know I hate Steam... )
18 Apr 17, 13:24
By Solokiller
avatar
Member
Like i said i haven't figured that out yet. We're months away from knowing how those things will work.

And requiring Steam is necessary for it to be even remotely legal. I am not making this standalone, it would be no more legal than Xash at that point.
18 Apr 17, 15:02
By rufee
avatar
Sledge fanboy
You can always figure out the a way to "nonsteam" it if you wan't. I don't get why people aren't using steam already, the damn game is only what 10$ ?
19 Apr 17, 16:30
By Bruce
avatar
Member
why use steam for a single game? steam itself probably takes up more space than hl. For some people steam hl takes several minutes to load and connecting to servers is also slow with all the bullshit verification, also in 2013 they did a useless update and broke scripts so hldm freaks have to rollback to an older hl version anyway. I like steam and all, chatting is nice but i dont like that everyone knows if youre online or offline, what you play and how much... lol. Of course often the non-steam games contain viruses so up to you blabla
19 Apr 17, 17:02
By abbadon
avatar
Member
Non Steam let you play unconnected on an isolated PC, for example. wink-wink - ;) It´s not for money because I have all Steam games I play legally bought on stores (AvsP, HL2, Aliens Colonial Marines etc.), but for an extrange reason NONE of them worked and some of them even installed ,because a extrange error, I uninstalled all of them because the solutions valve gave me never worked. F**ck valve for that, even If I love their games... unhappy - :(
19 Apr 17, 17:29
By Solokiller
avatar
Member
Quote:

why use steam for a single game? steam itself probably takes up more space than hl. For some people steam hl takes several minutes to load and connecting to servers is also slow with all the bullshit verification, also in 2013 they did a useless update and broke scripts so hldm freaks have to rollback to an older hl version anyway. I like steam and all, chatting is nice but i dont like that everyone knows if youre online or offline, what you play and how much... lol. Of course often the non-steam games contain viruses so up to you blabla


I have half a dozen games installed on Steam at any given time, including multiple Half-Life games. I've never had any issues with games failing to install or start, but one game (Star Wars: Galactic Battlegrounds) would crash fairly often, making it hard to play without saving every 5 minutes.

If it takes that long to start up the game then something might be wrong, a bug related to library loading caused Windows to create 100MB dumps for Sven co-op for instance.
That script update is probably the removal of _special, right? It was removed to stop scripts from being used to break the game and destroy balance. I do agree that a server side setting should be provided to control it though.

Personally i keep Steam Friends set to offline at all times, i don't like the "X is online" messages and the "oh you're online let's talk" stuff, but i don't need offline mode itself. Not much of a point.

Like i said, it will require Steam Half-Life to keep it legal and to enable use of master servers. I won't use something like WON2, that'd be like asking for legal issues.

On the subject of the engine, i'm making good progress. I'm almost done with the command buffer, command list, alias list and cvar list code, which is used by tons of engine code. With that done most of the startup code will be easier to get operational.

I've started on the Host_Init function, which is Quake's main startup function. When that's implemented (with mostly stubs), the logic to run startup should all be there, and i can do some basic testing to see if anything's failing to work.
Then it's a matter of filling in the gaps, implementing stubs and starting on the client dll interface. It's like putting together a puzzle at that point.
19 Apr 17, 18:06
By abbadon
avatar
Member
Oh, crap. Ok,ok... I will install STEAM and buy Steam HL1. wink-wink - ;)
20 Apr 17, 15:20
By Admer456
avatar
Member
Quote:
"You can always figure out the a way to "nonsteam" it if you wan't. I don't get why people aren't using steam already, the damn game is only what 10$ ?"


want*
Then there's the part of the population which will have to rely on non-Steam games because they won't buy a Steam game (no matter how cheap it is, be it 0.01$ even!) until they get a payment method for Internet games.

Oh do I love talking about piracy. smile - :)
Not in the way you think, though.

Edit: For those who can't wait to yell "Stop piracy" to me etc. just shut up already, I'll get a debit card in summer.
20 Apr 17, 15:52
By rufee
avatar
Sledge fanboy
I believe Gabe once said that eventually most will convert to paying for games and he wasn't wrong. Steam has made it easy to pay/download/play and keep your games updated.

Same goes for all industries for example iv'e replaced pirated music with Youtube and now Spotify in my life since its easy to sync playlists and use everything on any device.

There will obviously be hardcore pirates which will never convert, but that's ok with me.
20 Apr 17, 16:27
By Solokiller
avatar
Member
You can try buying a copy of HL in a store, i'm sure it's still popular enough to order. Otherwise, maybe they'll buy a digital copy for you somehow?
20 Apr 17, 17:06
By Admer456
avatar
Member
Quote:
"You can try buying a copy of HL in a store, i'm sure it's still popular enough to order. Otherwise, maybe they'll buy a digital copy for you somehow?"


Oh darn, all of my country's stores are littered with pirated games! :O
And no-one plays Half-Life! Only CS 1.6 and everybody uses the CSWarzone version of that. tongue - :P

Don't worry, I already have the Orange Box and HL1 thanks to someone from TWHL.:)

Also, there's another method: PayPal. Basically, getting paid for a map by a clan or something is what's going to happen to me. That's perhaps one of the reasons I started mapping, lol.

Quote:
"I believe Gabe once said that eventually most will convert to paying for games and he wasn't wrong."

Definitely. That statement will soon be applied to me. grin - :D

Quote:
"There will obviously be hardcore pirates which will never convert, but that's ok with me."

My classmates, lol.

@Solokiller
Sorry for hijacking the thread like this. unhappy - :(

But since I'm here again, I might ask a few things:
What's the goal of PowerSource?
20 Apr 17, 17:17
By Solokiller
avatar
Member
Make an open source version of the engine that is as legal as possible, which provides bug fixes, performance improvements, updated features (no late precache errors for one), higher limits, etc.
Basically a better version of the engine. Eventually a version that breaks API compatibility will also be available to go beyond that.

Hopefully once everything is set up the code used for it will be easily available for mods and tools as well. I intend to use the code for HLMV 2.0 as well, so it can share the entire renderer and sound system. That means i'll have to abstract out a lot of stuff.
20 Apr 17, 17:38
By Admer456
avatar
Member
Oh, cool. grin - :D
21 Apr 17, 12:47
By abbadon
avatar
Member
Quote:
I already have the Orange Box and HL1 thanks to someone from TWHL.:)


I have HL1 in its original box form 1998!, I love how old video games were packaged. smile - :)
21 Apr 17, 14:50
By Loulimi
avatar
Member
Normally if you've got the CD you should be able to get a free copy of the game on Steam with the CD key / ask the customer support if it doesn't work.
21 Apr 17, 18:17
By abbadon
avatar
Member
Mmmm, i am not quite sure about that. I bought it second hand on a Games Store. :/ Probably I am not the only one to have this CD-Key. unhappy - :(
21 Apr 17, 21:16
By Solokiller
avatar
Member
You can always try it, it'll tell you if you can use it or not.

So i finished up the key input system, which is rather messy, and implemented CGame::SleepUntilInput, which is part of the main game loop and pumps the SDL2 event loop. This means that the SDL window is now active:



I had a small bug in the startup graphic code that needed fixing, but now it's all good.

I set up resource copying in the CMakeLists to get the assets in the test directory without any copyright issues, you'll have to specify your Steam Half-Life install directory for it to find those resources.

This is still a long way from functional, but it's getting there.
21 Apr 17, 23:03
By abbadon
avatar
Member
O-o-o-o-o-o-oh. Can´t wait! tongue - :P
25 Apr 17, 15:09
By Solokiller
avatar
Member
I've managed to get quite a bit of the init functions set up, so the main startup functions themselves are almost fully implemented. Most are just stubs for the moment, but it's starting to look like a real engine now.

I've ported over the OpenGL setup code from Quake 3 Arena, because yes, GoldSource has code from that too tongue - :P
The code that sets up MSAA and the FBO is mostly there now, so i could use that to figure out why some people get tiny windows on startup.
I suspect this may be an issue with some systems reporting irregular window sizes, or perhaps not initializing the video mode list properly. We'll see about that later on.

I've also mostly set up the vgui1 & vgui2 dependencies, and identified a number of problems that needed fixing.
Tier0 apparently exports a different memory allocator than what Source uses, which has a different interface layout and format, and even required a workaround for a compiler issue that reordered overloaded functions.
It took me a while to identify, but i finally got that fixed.

Strangely, only the Windows version has the shared memory allocator, on Linux it doesn't use it at all. This made things harder, but not impossible. Chalk it up to another Valve thing.

Once i'm done getting VGUI2 set up i can use the existing libraries to get the UI up and running, which lets me take a shortcut to getting parts of VGUI2 working without having to re-implement multiple libraries all at the same time. It also lets me test to see if anything's not quite right.

Once that's done i'll have the main menu working, though it'll probably crash often at first. I'll focus on getting vgui2.dll and gameui.dll rebuilt so we've got the code for that, then maybe chromehtml.dll if i can manage that. It's a complex implementation, but it's only CEF1 so it's not quite as massive as a CEF3 implementation.

With that done i can focus on individual subsystems like audio, BSP loading, model rendering, etc.
Vstdlib Will be needed as well sooner or later, so i'd like to get that up and running too. It was the hotspot for the tier0 allocator issues, and i'd like to have the code for it available if possible.

Like i said, it's going to take time, but i'm confident that this can be done.
26 Apr 17, 16:20
By Solokiller
avatar
Member
I sent an email to Alfred earlier today:

Quote:

Running any non-Valve produced binary in your game process when connecting to a VAC secured server can result in a ban. If you just play in your own listen server or on insecure servers then you will be fine.

- Alfred

> -----Original Message-----
> From: [me]
> Sent: Wednesday, April 26, 2017 2:53 AM
> To: Alfred Reynolds <Alfred@valvesoftware.com>
> Subject: VAC detection when running custom dlls in GoldSource
>
> Dear Mr Reynolds,
>
>
> Could you confirm whether running a custom dll under GoldSource would
> result in a VAC ban?
>
> As part of a project i'm working, custom dlls will be loaded and will
> not return execution to the engine for an extended period of time
> (potentially hours, days), and i'd like to confirm that this will not
> result in a VAC ban.
>
>
> Kind regards,
>
>
> Solokiller


So the new engine will have to run as insecure to avoid this.
The fact that i got a reply kinda confirms that Valve doesn't want to give an answer to questions regarding the open sourcing of the engine, or rebuilding it. So i guess it's up to me to make sure the engine can't be run on its own then, or that it could contain licensed code.
26 Apr 17, 16:55
By rufee
avatar
Sledge fanboy
Strip VAC out, its been useless since forever anyway grin - :D
26 Apr 17, 17:01
By Solokiller
avatar
Member
It's not that simple, you need to tell Steam whether to turn it on or not when you load up Steamworks. The thing is, the original engine also does this, so i'll have to make sure it either doesn't set that, or overrides it.
1 2 3 4 [5]

Forums > HL Engine Discussion

Login to Reply

You must be logged in to reply.