Dukebike mod "Christmas gift of Duke, his bike"
#182 Posted 16 July 2010 - 01:20 AM
http://www.youtube.c...h?v=HSnvjoTLSEE
EDIT: By the way, there does not seem to be any way to spawn a working spotlight. I had to place the light in the map and then make the bike move it around. Can this be fixed? Point lights work fine when spawned.
This post has been edited by DeeperThought: 16 July 2010 - 01:24 AM
#184 Posted 16 July 2010 - 06:51 AM
DeeperThought, on Jul 16 2010, 09:20 PM, said:
I can get one spawned but it just emits the projection of the APLAYER, although if you look at the light in a DNDEBUG map it has the correct values.
#185 Posted 16 July 2010 - 07:14 AM
#186 Posted 17 July 2010 - 09:08 AM
#187 Posted 17 July 2010 - 10:14 AM
Tea Monster, on Jul 17 2010, 01:08 PM, said:
-least favorite part of HL2 graphically/engine speaking. It falls under the no FBA thing that drives me insane since it was possible at the time the engine was made and should have been done considering the physics in that game.
On that note, couldn't you just make it 3rd person like he does in this? There is also the possibility of, I don't know, placing the camera in a moving model of a Go Kart.
I'm sure this is all possible. Of course, I think he made the code to work with two wheels. But this is the same guy who did the Jurassic Park mod with Jeeps. It may be easier to just take that code and adjust it to work with a Go Kart.
This post has been edited by Mr.Flibble: 17 July 2010 - 10:16 AM
#188 Posted 18 July 2010 - 07:06 AM
#189 Posted 18 July 2010 - 10:51 AM
Gambini, on Jul 18 2010, 05:06 PM, said:
I agree.
#190 Posted 18 July 2010 - 11:52 AM
#191 Posted 18 July 2010 - 12:06 PM
When I'm playing a action game or something, whenever I drive, I do prefer the 3rd person view because then you can look around while driving.
#192 Posted 19 July 2010 - 08:33 AM
#193 Posted 19 July 2010 - 08:50 AM
#194 Posted 19 July 2010 - 11:16 AM
#195 Posted 19 July 2010 - 05:45 PM
I also play driving games from the first person perspective. 3rd person perspective is for ultra arcade 0 realistic games.
#196 Posted 19 July 2010 - 06:04 PM
Gambini, on Jul 19 2010, 06:45 PM, said:
You don't help your case by making exaggerated claims like that. 1st person may be more immersive, but it makes no difference to the realism of the game. The physics, models etc. are not affected.
A 1st person HUD for the bike will probably be added at some point, but in the mean time the 3rd person view is very good. It has a zoom function and if you zoom in very close, it is almost like a 1st person view. But the animations that Muelsa made for the bike are excellent, and I wouldn't want to miss them by zooming out. I especially like the terminator 2 style shotgun animations.
#197 Posted 21 July 2010 - 03:27 PM
#198 Posted 21 July 2010 - 04:14 PM
Adding the bike to DukePlus was pretty easy at first, but then I discovered a lot of problems. A few of these were particular to using it with DP (e.g. the zoom in/out function not working) and some had been there all along (e.g. the bike falling through sprite bridges). So I ended up making some changes. Here's a list. I describe the items in detail because this post is mostly for Muelsa and I want to let him know what I did (but at the same time I want to share it with others). I will upload the new version when I'm sure it's ok with Muelsa.
-Added headlight. It turns on when you start the engine, and turns off when you get off the bike. There are a few small bugs with it. When the bike is turning sharply, sometimes the light doesn't point in the correct direction. I believe this is because the bike sprite is not always pointing where the bike model is (due to angoff on the model), and my code is not compensating correctly. The second bug is that at high speeds, there is a noticeable lag between the position of the bike and that of the light, because the light doesn't use interpolation and I can't see how to fix this with the usual method involving EVENT_ANIMATESPRITES -- I could try fake moving the SE, but AFAIK the light is a separate entity.
-Integrated with Dukeplus. This required moving some stuff in the DP HUD so that it didn't overlap the Dukebike HUD, and some other minor changes.
-Improved collision scraps and smoke. It uses the DP versions of these which look better.
-The Dukebike can get over curbs now. Before, the Dukebike would slam into very short walls -- walls that a real bike could easily drive right over. In Muelsa's maps this wasn't too much of a problem because they were made with this limitation in mind, but if you tried the Dukebike in regular maps it would make it difficult or impossible to get around, even in city streets. It took me a while to figure out what was going on, but it turns out it was due to the bike being too small. Of course it looked the correct size, but in reality it was 15x14. So I tripled the size of the bike, and reduced the scale of the model accordingly, and now it can get over curbs and other short walls without crashing into them. Unfortunately, this made the hittable area for the bike way too large, so I had to make a separate hitbox sprite for the bike. But the hitbox works fine, and it has the added advantage of making it impossible for the player to hit the bike he is on with his own weapons.
-Duke's hands grip the handles instead of the air above them (adjusted zadd on the duke sitting model)
-Got rid of tiles014.art by moving the new art to tiles024 and using dummytile command for the dummy tiles. There are still too many tiles being eaten up by the animations, but at least they are all moved into unused territory (in the 7000+ range) so as not to interfere with with tiles014 which is needed for user maps. This means that the tile for the Dukebike itself has been moved (now 7584). I fixed it in Muelsa's maps.
-New collision system which fixes various bugs and performs better. The Dukebike used a clever but awkward collision detection system whereby it constantly fired off short ranged invisible explosives in different directions, and then responded accordingly depending on whether it got hit by them and from which angle. It worked fairly well in many cases but it was buggy, and it led to some bizarre consequences like the player getting hurt just by crouching down next to the bike. I replaced that system with one that uses the existing data in the sprite structure (htmovflag) to determine what the bike is colliding with. The code determining what to do about the collision (e.g. the new angle and speed for the bike) is a mixture of Muelsa's and some new code of my own, and it works quite well. The new system works on sprites, too -- you can kill enemies by driving into them and sprite walls (like fences made of sprites) are treated just like actual walls.
-The Dukebike can now drive on sprite bridges instead of falling through them. This problem had me scratching my head for a while. To make a long story short, the htfloorz member of the sprite struct came to the rescue (that member will count a sprite floor below as the floor, even though it is not the sector floor).
-Moved the zoom in/out function to the LOOK LEFT/RIGHT keys (I didn't have much choice here because DP already uses the LOOK UP/DOWN and AIM UP/DOWN). Hopefully no one was using those keys...
This post has been edited by DeeperThought: 21 July 2010 - 04:17 PM
#199 Posted 21 July 2010 - 04:49 PM
#200 Posted 28 July 2010 - 08:28 PM
#201 Posted 29 July 2010 - 07:11 AM
#202 Posted 31 July 2010 - 11:37 AM
#204 Posted 01 August 2010 - 06:34 AM
DeeperThought, on Jul 21 2010, 05:14 PM, said:
... The new system works on sprites, too -- you can kill enemies by driving into them and sprite walls (like fences made of sprites) are treated just like actual walls ....
.... The Dukebike can now drive on sprite bridges instead of falling through them...
it's a good job
many change in my code I am confused the new code for collisions seems to work very well, pity it does not detect collisions at the rear.
I'm glad you've managed to add a headlight. I tried to solve the problem with the angoff, without success. I think the problem come from the code during slippage. Perhaps if the player spawn the light instead of the bike...
#205 Posted 01 August 2010 - 08:54 AM
Muelsa, on Aug 1 2010, 07:34 AM, said:
many change in my code I am confused the new code for collisions seems to work very well, pity it does not detect collisions at the rear.
I'm glad you've managed to add a headlight. I tried to solve the problem with the angoff, without success. I think the problem come from the code during slippage. Perhaps if the player spawn the light instead of the bike...
Hey, I'm glad you're back. I'm sure I can fix those issues without much difficulty. If you need me to explain any of the changes I made, just let me know.
#206 Posted 01 August 2010 - 12:14 PM
#207 Posted 01 August 2010 - 02:08 PM
Fantinaikos, on Aug 1 2010, 10:14 PM, said:
I have to disagree. It's not confusing at all (If you ever played GTA ) The camera is perfect. If it was like you say it would be impossible to shoot behind you and you wouldn't be able to look where you want if it wasnt straight ahead
This post has been edited by Spiker: 01 August 2010 - 02:09 PM
#208 Posted 02 August 2010 - 02:44 AM
#209 Posted 02 August 2010 - 03:20 AM
Fantinaikos, on Aug 2 2010, 03:44 AM, said:
Is not hard to make something like in gta, maybe LOOK_LEFT/RIGHT to look left and right, and the two keys in same time to look behind. Mouse aiming on/off (or crouch, is not used on bike) to lock the camera or return to default view.
#210 Posted 03 August 2010 - 10:45 AM
Fatal Signal caught: SIGSEGV. Bailing out.
78566: 2064 ifvarand 387 1 174312404
78570: 2064 subvar 387 1
78573: 2065 ifvarand 387 256 174312432
78577: 2065 subvar 387 256
78580: 2066 setactor 253 3 387
78584: 31337 }
78585: 31337 }
78586: 2071 enda
78587: 2075 getactor 253 18 410
78591: 2076 setactor 253 18 2048 0
78596: 2077 getactor 253 20 406
78600: 2078 setactor 253 20 2048 0
78605: 2079 enda
g_errorLineNum: 349, g_tw: 124