WebOS, blogging and GMod

Luaduck let me know about the WebOS SDK on Steam friends today. For those who don’t know what WebOS is, here’s a small summary:

WebOS_Launcher[1]Palm webOS is a mobile operating system running on the Linux kernel with proprietary components developed by Palm.

webOS’s graphical user interface is designed for use on devices with touchscreens. It includes a suite of applications for personal information management and makes use of a number of web technologies such as HTML 5, JavaScript, and CSS.[4][5]Palm claims that the design around these existing technologies was intended to spare developers from learning a new programming language.

So, basically, you write applications in HTML or Java. Setting up the development environment took some time, but writing the Hello World application was worth it. You can just drag images, stylesheets and other files to your project, press the play button and your application runs in the Palm Emulator.

2uz2p15[1]

Neat.

New avatar

237537ed1e5ce13b50268c5a292a2872a5e3e835_full[1]That brings me to my next subject. I made a new avatar, again with our beloved male_07. This time he wears a rebel suit and has a cheesy smile. Took about 20 minutes to get the smile and pose right and about 10 minutes to find the tutorial for the rising sun background.

Windows Live Writer

Actually, you might be surprised now that I’ve posted a new blog post within a week of posting the last one. That’s because I’ve discovered a shiny new tool to make updating my blog a lot easier: Windows Live Writer. I’m not going to discuss all of it, as Garry already covered it, but it’s like writing a blog post with Word. You can position items wherever you want, insert images from any source automatically and all you have to do to configure it is inserting your blog url and username and password. Really cool.

Fretta gamemode contest

23hk84x[1]I’m pretty sure most of you have already heard of it, but Facepunch Studios is hosting a gamemode contest with prices ranging from $1000 to $5000, read more about it here. Anyway, I’ve started working on my own entry: Flood Control. It’s pretty much a remake of Puzzle, only it’s third-person, there’s two teams and there’s rising water. Here’s a full description.

Evolve menu and scoreboard

I can’t tell a lot about this yet, but the menu of Evolve will be integrated into a custom scoreboard. This has several advantages:

  • You don’t have to bind a key to some obscure command.
  • It integrates better into GMod which is one of the goals of my admin mod.
  • I can make the menu look more interesting.

More information about this soon enough.

I’d like to end this time with a video of RayWilliamJohnson, featuring a cat which actually says OM NOM NOM while eating. Worth checking out!

Multiple worlds in MY gmod?

It’s more likely than you think. First have a look at the video below:

So, how does this work? Using the new predicted networked variables, entities remember in which layer they are:

function _R.Entity:GetLayer()
	return math.Clamp( self:GetDTInt( 0 ), 1, 20 )
end

function _R.Entity:SetLayer( layer )
	self:SetDTInt( 0, layer )
end

With that information, the server makes entities in different layers not collide using the ShouldCollide hook. In this hook, a pair of entities is passed to you and you specify whether they should collide or not. Clientside Entity.SetNoDraw is used in the RenderScene hook. If an entity is in the same layer as the local player, it’s visible, otherwise it’s not. Simple.

But it’s not without its problems yet. Here’s a list of the known problems at the moment:

  • Sound is still heard throughout all layers.
  • Constraints (ropes, hydraulics, …) can be seen throughout all layers.
  • Some effects show throughout all layers and some don’t show anymore at all.
  • E2 holograms aren’t layered yet, which causes trouble.

And on top of that, the tool – in its current state – is obviously ideal for spammers. I’m currently working on the constraint issue and I am confident the other problems will be solved over time too.

To solve the spamming issue, my idea is to have a scoreboard in the STOOL menu which shows every layer with the amount of entities and the players into it.

Tell me what you think of it!

New website design

Yes, I have finally made the change to Wordpress. The name of this theme is K2 and I’ve done my best to make it look like the old site as much as possible.

So, why did I switch to Wordpress? In short, my own PHP code was starting to get incredibly messy and why not use an awesome free solution to all your problems?

I’ll be adding a picture of me to the About page as soon as I can scan it, as promised. In other news, I know you’ve been waiting for a new blog post for about 2 months and I am going to give you (a real) one tomorrow about an exciting new project. I’m also planning to review the beta of the game R.U.S.E.

Stay tuned.

Planning SourceScript and some Evolve work

As I said in the last post, SourceScript’s hooks are still very rough and almost perfectly relay the game events Source sends me. So, I started planning the names and arguments of the hooks. Here’s the result:


(Sorry, I couldn’t be bothered to convert the Word table to XHTML)

So, what’s currently on my to do list?

  1. Write the base layout of Player, Entity, Vector and DamageInfo classes.
  2. Make all hooks use the new classes.
  3. Add the easy to add functions like SteamID(), Nick(), UserID() and EntIndex().
  4. Add the sigscanned functions.

Besides the standard libraries there will be a few custom libraries like server.ChangeLevel(), gamemode.GetName(). More about SourceScript soon.

Evolve progress

Evolve has progressed a bit slowly recently due to other projects like SourceScript, but never fear, since it does always progress. Last week I’ve made the player list a bit more interesting and useful. It was way too bland for the space it’s taking, so I added some useful stuff:

As you can see, it’s easy to see SteamIDs now and the rank of everyone is indicated with icons. The next planned thing is completely customizable ranks done right (Read: Not like NewAdmin). Just like NewAdmin, to perform certain actions – including opening the menu – you need a privilege which is given to groups by the owner via an extra tab.

In the release version, it’ll come with the ranks Respected, Admin and Super Admin pre-installed which you can freely modify, rename or remove. The guest rank will be modifiable, but not removable and the owner rank automatically has got all privileges and can not be modified.

Let’s end this post with an interesting video showing how in-game graphics have improved over the years.

SourceScript?

I’ve already told a few people on Steam about it, but now it’s official. I’ve picked up the SourceScript project again. For those who are not yet familiar with it, here’s a summary:

Most of you already know about the integration of Lua in the Half-Life 2 mod Garry’s Mod. What if you could use Lua to mod for other Source games instead of having to learn complicated languages like C++? SourceScript provides a server plugin to take care of just that. It’s aiming to enable Lua in all EP1 and Orange Box based games currently in the Steam Store.

The last time I talked about SourceScript I mentioned really simple hooks and a non-streamlined integration in the Source Dedicated Server. To start off, I’ve completely rewritten the whole thing, since I have a lot more experience with C++ now. Back then, I didn’t even know what the difference between a const char* and char* is. This will ensure a faster and more stable development process.

I’ve decided to first write all the event hooking code, perfect it and then work on the functions with which you respond to said events. It’s still all very rough, by which I mean it’s almost a perfect port of the C++ events, but here’s the implemented hooks:

RoundStart( TimeLimit, FragLimit, Objective )

RoundFreezeEnd()

RoundEnd( Winner, Reason, Message )

PlayerConnect( Nick, IPAddress )

PlayerDisconnect( Nick, UserID, SteamID, IPAddress )

PlayerInitialSpawn( UserID )

PlayerSpawn( UserID )

PlayerDeath( UserID, Attacker )

PlayerDamage( UserID, Attacker, Health, Armor, DmgHealth, DmgArmor, Hitgroup )

PlayerChangedTeam( UserID, Team, OldTeam, Disconnected )

PlayerPickedUpItem( UserID, Item )

PlayerFootstep( UserID )

PlayerJump( UserID ) <- Yes, GMod doesn’t have this!

PlayerShootWeapon( UserID, Weapon )

PlayerWeaponHit( UserID, x, y, z )

PlayerWeaponReload( UserID )

PlayerWeaponZoom( UserID )

PlayerBombPickup( UserID )

PlayerBombDropped( UserID )

PlayerBombBeginPlant( UserID, Site )

PlayerBombPlanted( UserID, Site, x, y )

PlayerBombBeginDefuse( UserID, HasKit )

PlayerBombDefused( UserID, Site )

ConVarChange( name, value )

As you can see, clearly the arguments of some hooks don’t make any sense, like PlayerBombBeginDefuse (What the fuck is up with that name) having a HasKit argument and PlayerBombDefused not. The only actually hooked Source Engine function so far is Msg, which is pretty useless since it does the same as print. When I’ve polished the hooks, I’m first doing global stuff like a server library with GetMap() and all that jazz, and then the entity commands like SetPos()/Ignite(). Polishing the hooks includes using a Vector object instead of X, Y and Z parameters.

Now that we’ve had the wall of text, let’s look at some more exciting (?) stuff. To start off, lua_run, just like in Garry’s Mod:

Also notice ‘Running script hooktest.lua’ at the top which is called from autoexec.cfg as:

lua_openscript hooktest.lua

Here’s a more interesting example:

Yes, it is a little lame, just showing the UserID, but it demonstrates how well the hook and lua_run system already work!

I’d love to hear any argument suggestions for the hooks I’ve shown here, however I’ll probably steal the arguments from Garry’s Mod where appropriate. I hope you guys are just as enthusiastic as I am, looking forward to the outcome of this thing. It might just become a great success and introduce a lot of new people to the great world of Source modding.