Kernel Panic 4.6

Kernel Panic 4.6

Moderator: Content Developer

User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7031
Joined: 16 Nov 2004, 13:08

Kernel Panic 4.6

Post by zwzsg »

Kernel Panic 4.6 out!

Image

4.5 -> 4.6 changes:
  • Added a fancy custom loadscreen.
  • Adapted all gadgets that use the UnitDamaged call-in to account for the extra argument inserted in middle.
  • Replaced null texture by none in some explosion generator, thus removing the faint rectangle they had.
  • Added five new pieces to byte to fix the problem with mines not spreading.
  • Edited pointer scripts with regards to change in when StartMoving/StopMoving is called.
  • Renamed all armor class, as Spring dislike having armor class bearing the same name as units.
  • Added a small tolerance on the detection of immobile units (mainly to help AI detect idle cons).
  • Fixed the few calls to Get/SetUnitWeaponState with regards to weapon index change in 95.
If anybody ever make a Linux package of it: Please add something like a batch or a shorcut, labelled "Kernel Panic Single Player" that run Spring with this file as argument. And check that restarting a game through the Kernel Panic ingame menu works on Linux.
User avatar
PepeAmpere
Posts: 587
Joined: 03 Jun 2010, 01:28

Re: Kernel Panic 4.6

Post by PepeAmpere »

As great fan of this game, i give you own version of gamepack, which please 3rd sort people (so no noobs, no spring maniacs):
  • people, who knows how computer works but who dont like wasting time
  • people, who are scary of installers
Portable zipped pack - all you need: download -> unpack -> doubleclick launcher -> play!
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7031
Joined: 16 Nov 2004, 13:08

Re: Kernel Panic 4.6

Post by zwzsg »

More details about changes and bugs introduced by Spring 95:
  • Spring 95 is more strict about when it calls {Start/Stop}Moving.
    StopMoving is not called anymore when a unit is spawned. As a result, pointers that are created by missions or cheat code would remain closed and unable to fire, until moved. So I fixed that by making the pointer script call Open if it detects it's already fully built at the beginning of the Create. That doesn't take into account the case of pointer being build by mobile builders, but nothing do that.
    Then, I noticed that pointers, once deployed, were unable to pack up and roll. This is because in Spring 95 StartMoving is only called when the unit really move, not merely wants to move. And the pointer script set the pointer speed to nearly zero when deployed, setting back the max speed when closing. But it wouln't close since Close was called by StartMoving! I ended up removing the line that made pointer immobile when deployed. So now, pointers may skid since they move before being fully packed up, but I guess a little skidding is better than being stuck in place.
  • Spring 95 implements the unsynced heightmap thing, where changes in the terrain are hidden to a player until he gets a line of sight on them. This makes playing on HexFarm really cumbersome: It is impossible to build on datavents, until you get an unit close to that datavent. And the widget supposed to show buildable position (all the datavents) shows the datavents at the time the map was compiled, not the current configuration. It is especially annoying as the player can see the towers and the datavent as they really are, as my OpenGL drawn by Lua gadget, and, somehow, datavent fumes, don't care about lack of sight and just draw the reality. So there's the frustation of seeing datavents but being denied building on them. Being forced to send a scout everywhere you want to build is micro-intensive and irritating.
  • Spring 95 still likes to crash on loading unless I have pseudo-safe-mode settings.
  • The load screen background animation is supposed to serve as loading progress indicator, but it needs to have been run twice on the same map to calibrate itself. It's based on jK's loadprogress.lua, which determine how long it will take to load by storing in a file how long it took to load on that map last time. So the first time, there is no indication. I added something to default on guessing the load progress by counting the stages in the loading, but that didn't turn out too well. The second time it loads, it knows how long it took the first time, and plan a progress animation according to that. However, first time loading is always slower because of pathing map creation, so the second time loading progress indicator is wrong too, since second and later loading are faster than first time load. Hopefully third and later time loading should be accurate, as long as you don't change your resolution, your computer load, etc...
  • The 2009 bug about Spring.Restart failing when the path contains space character resurfaced in 2013's Spring 95. Seem to have been quickly fixed on SVN GitHub. But until next version release, I re-activated the check preventing install in path containing spaces in my Kernel Panic installer. But if you get a message about "too many positional options have been specified on the command line" when using the ingame Lua menu to relaunch a game, you know what to look for.
  • The old trojan rainbow of hearts doesn't show. Well, maybe it stopped showing before 95 then, I'm not sure. I don't really know what's wrong or how to fix. Removing the unknown tag that Spring complained about in its sfx didn't help.
  • The change of weapon index caused the Hero gamemode to fail (unit wouldn't stop firing). I fixed that in a retro-compatible way.
  • The change in UnitDamaged parameters caused a few gadgets to bug and crash (including all Lua AIs). I fixed that in a retro-compatible way.
  • I removed a bunch of dll that seemed unused. I noticed only yesterday that springsettings.exe needs one of them. So, uh, people installing Spring via my installer can't change settings. Unless they know how to edit their text file manually. Or that that SpringLobby has a set.. wait maybe SpringLobby needed those dll too? Gotta remember to test.
User avatar
Anarchid
Posts: 1383
Joined: 30 Nov 2008, 04:31

Re: Kernel Panic 4.6

Post by Anarchid »

Spring 95 implements the unsynced heightmap thing
ZK has UHM in 91.0, so this isn't something implemented in 95.0.
I suspect it's a flip on the default state, which can be overridden by a mod option.
Since afaik KP doesn't have terraform weapons/units/stuff that needs to be hidden from prying eyes, it only makes sense to do so... if possible.

I failed to find such a modrule, so this sounds like a default change with no override >.<

Fixing just the map (for games which need UHM) sounds a bit harder, though.
The load screen background animation is supposed to serve as loading progress indicator, but it needs to have been run twice on the same map to calibrate itself.
Some people have resorted to parsing load strings, which seems more jerky, but also more accurate. Maybe you could microsoft between those jumps for nicer effect.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7031
Joined: 16 Nov 2004, 13:08

Re: Kernel Panic 4.6

Post by zwzsg »

ZK has UHM in 91.0, so this isn't something implemented in 95.0.
I suspect it's a flip on the default state, which can be overridden by a mod option.
Really? Which tag of which file? I can't find in modrules.
Some people have resorted to parsing load strings, which seems more jerky, but also more accurate. Maybe you could microsoft between those jumps for nicer effect.
I don't yet parse but already count loadstring. And I smooth between them by having the cells do one generation per frame inbetween. This worked nicely on HexFarm long loading time when I tested it. But after release, I noticed that it underestimate the loading time of all other maps. Then it's not that important, there's still the logo moving lights to show it's busy.
User avatar
Anarchid
Posts: 1383
Joined: 30 Nov 2008, 04:31

Re: Kernel Panic 4.6

Post by Anarchid »

Yeah, i went as far as the actual engine code. There's no switch for the UHM, you'd need to somehow give global "terrain-only" los to everybody after terraform is complete.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Kernel Panic 4.6

Post by knorke »

On the unsynced height map los thing, would this work:
1) Give full LOS to all teams (invisible units still the only way i guess) for short moment after terraform is complete
2) Spawn the start bases a bit later, as not to give away positions. (or have them invisible for that time)

Ugly hack just to have one map working with newer spring.
But since it is cool map and new spring=easier online play might be worth it.
(yesyes multi engine lobby blabla. but no other game uses spring 95, so no player will have it installed or configured)


springsettings.exe:
Is removed from spring installer, not sure if it is good idea to still distribute it with game installers? New springlobby includes settings dialog since a while.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7031
Joined: 16 Nov 2004, 13:08

Re: Kernel Panic 4.6

Post by zwzsg »

I once tried giving full los by spawning units. But the max los a unit can have is limited, so I had to spawn a whole grid of units. And they would show on the radar minimap, eat a chunk of the unit count, and generally not be completly transparent and invisible gameplay-wise. I'm also loath to include units in the HexFarm map, because it's hard to make a unit that is game-agnostic, and this map has enough way to break already. I'm usually not one to shy from dirty hacks, but this one is too hideous even for me.

As for springsettings.exe, I just wish there was a standalone application to change Spring settings, that doesn't mess up my keybinds and doesn't require answering questions to a confusing lobby. I plan to make one anyway (which, in complete contradiction to what I just said, while be built in the Kernel Panic External Single Player Launcher).
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Kernel Panic 4.6

Post by knorke »

oh, just los-units to give LOS for the initial heightmap update might have been feasible but I forgot that hexfarm's heightmap is dynamic too.
I do not see featurerequest wrt this on mantis but all the UHM related reports are green..so it seems someone is actively working on it. Worth a try?

spring settings: Personally I think the default settings got better recently, no more "endless UnitIconDist" etc. Next spring version will be able to toggle fullscreen/windowed from ingame. Right now I can not think of settings that one would really need that can not be changed ingame.

keybinds: I still do not dare to click "apply" in springlobby's settingsdialog because the fear of messed keys and configs is too deep :shock: Even if it might be fixed now.

For future imo way to go is widget:
At gamestart do Spring.SendCommands ("unbind everything")
and then Spring.SendCommands ("bind myStuff")
Iirc binding keys like this only lasts for that match, so no game can accidently mess up someones keybinds.
The hotkeys would be defined read from some configfile and be bindable ingame, zK already has something like this.
Since the /bind bla follows afaik the same system as used in uikeys.txt it would is possible to carry over old binds and no functionality is lost.
For start most keep an old spring version around because the most pro tool to make keybinds and to figuring out how excactly bind-command must look like is getting removed.

The old selectioneditor could be ingame too, think it is just combining strings based on which checkbox is ticked.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Kernel Panic 4.6

Post by knorke »

Something about restart:
http://springrts.com/mantis/view.php?id=4329#c12914
It crashes with KP and my mod too.
[f=0000065] Error: [Spring.Restart] error Invalid argument

In my mod restart is here:
http://code.google.com/p/springtanks/so ... nu.lua#365
(pro tip: echo behind gsub is more helpful..)

This line does not work in new spring:
file = string.gsub(file,"GameType=[^;]*;","GameType=".. Game.modName ..";",1) --replace GameType= with modname by zwszg

http://springrts.com/wiki/Lua_ConstGame#Mod
So instead of Game.modName there is now the more politically correct Game.gameName.
I tried like

Code: Select all

local s = Game.gameName .. " " .. Game.gameVersion
file = string.gsub(file,"GameType=[^;]*;","GameType=".. s ..";",1)
and variants.
Sadly it still crashes :regret:

But it also did not work when I tried dragging the infolog.txt-logged (by the echo) startscript onto spring.exe
So maybe it is rather problem with lua/startscript rather than spring.restart?

In KP 4.6 I also see Game.modName used (your restart thing is more complex, did not look closer than that) so maybe similiar problem?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7031
Joined: 16 Nov 2004, 13:08

Re: Kernel Panic 4.6

Post by zwzsg »

knorke wrote:So instead of Game.modName there is now the more politically correct Game.gameName.
I'm not sure I really want to keep fixing a mod for a game where having politically correct names for internal constants is deemed more important than keeping it in working state.
User avatar
smoth
Posts: 22306
Joined: 13 Jan 2005, 00:46

Re: Kernel Panic 4.6

Post by smoth »

what is your game a mod of?
User avatar
AF
AI Developer
Posts: 20679
Joined: 14 Sep 2004, 11:32

Re: Kernel Panic 4.6

Post by AF »

zwzsg wrote:
knorke wrote:So instead of Game.modName there is now the more politically correct Game.gameName.
I'm not sure I really want to keep fixing a mod for a game where having politically correct names for internal constants is deemed more important than keeping it in working state.
gamename was added a very, very very, long time ago, it possibly even predates your game. I should know, IIRC I was the one who added it, and political correctness was not the reason for its addition.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Kernel Panic 4.6

Post by knorke »

psst they can hear you.
AF, think you confuse something: See the notes on http://springrts.com/wiki/Lua_ConstGame#Mod
The constants were recently renamed from modBlabla to gameBlabla.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7031
Joined: 16 Nov 2004, 13:08

Re: Kernel Panic 4.6

Post by zwzsg »

It has been many months, but the Kernel Panic autohost "Silicon" are still running KP 4.5.

Who owns them? How do I make them use KP 4.6 ?
User avatar
smoth
Posts: 22306
Joined: 13 Jan 2005, 00:46

Re: Kernel Panic 4.6

Post by smoth »

Probably a springie autohost with a name like that. Ask licho?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7031
Joined: 16 Nov 2004, 13:08

Re: Kernel Panic 4.6

Post by zwzsg »

I read http://springrts.com/wiki/Rapid

I download and unziped http://packages.springrts.com/versions.gz

Inside it I found:

Code: Select all

kp:latest,4650fd0ab1a9d37a0a31765aa0e907d8,,Kernel Panic 4.5
kp:stable,5cbedd6403a6845bf5a030d8836a26ae,,Kernel Panic 4.6
kp:version:4.0,daca31ba7713d3e2922d6ef0669c88e4,,Kernel Panic 4.0
....
kp:version:4.5,4650fd0ab1a9d37a0a31765aa0e907d8,,Kernel Panic 4.5
kp:version:4.6,5cbedd6403a6845bf5a030d8836a26ae,,Kernel Panic 4.6
So:
- KP 4.6 is known to rapid
- KP latest == KP 4.5
- KP stable == KP 4.6


What tool do I need, which command should I use, to tell rapid to change kp:latest to kp:version:4.6 ?
User avatar
smoth
Posts: 22306
Joined: 13 Jan 2005, 00:46

Re: Kernel Panic 4.6

Post by smoth »

Check with DET, IIRC he knows all about rapid.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7031
Joined: 16 Nov 2004, 13:08

Re: Kernel Panic 4.6

Post by zwzsg »

I checked with abma, det, and licho in #sy.

The problem is that when I uploaded Kernel Panic 4.6 on http://packages.springrts.com I used the tag "stable" instead of "latest". And Silicon host kp:latest.

I thought that the "latest" tag always point to the last upload version, but it's not the case, "latest" is just tag name that can be applied to any version. I suppose that for games that use a SVN, "latest" automatically change when a commit is done, but KP has no SVN.

I've been told that a version can only bear one tag. And that there is no interface for me to change tags.

For now, det has changed his springie config to use kp:stable instead of kp:latest.

For later, it would be nice if there was a way for me to change what tags point to, so as to have both "latest" and "stable" point to the same file.
User avatar
Jools
XTA Developer
Posts: 2813
Joined: 23 Feb 2009, 16:29

Re: Kernel Panic 4.6

Post by Jools »

We just commit with rapid using VERSION{9.xxx}. Apparently that produces the stable flag. No idea how to produce the latest flag.

I guess it would be nice if someone with rapid knowledge could point xta to default to xta:stable too then...
Post Reply

Return to “Kernel Panic”

cron