• Sonic Physics in Source SDK
    17 replies, posted
I would very much like to have some help in this avenue seeing as I'm working on a source mod relating to Sonic. If this is in the wrong place please move it to where it should be.
Here's some top-sekret coed from Half-Life 2: Sandbox, that was never open-sourced until now. [cpp]//Sanic.cpp //Gotta go fast, cum on step it up! ... physics_performanceparams_t params; params.Defaults(); params.maxVelocity = 14902591.7576; physenv->SetPerformanceSettings( &params ); .. [/cpp]
If I were looking for a joke I would have put a humor badge on this :v: but funny nonetheless.
Serious reply for OP: Source engine would probably be terrible to get working for a Sonic game. Part of the work has already been done for you; look into Sonic GDK, or the Sonic FreeRunner engine.
[QUOTE=Billy2600;38635221]Serious reply for OP: Source engine would probably be terrible to get working for a Sonic game. Part of the work has already been done for you; look into Sonic GDK, or the Sonic FreeRunner engine.[/QUOTE] EEEhhhhhh..... I really want to use Source for this honestly. Sonic GDK is great and all but it lacks grinding rail system I need, Sonic FreeRunner Looks interesting but not what I need. =/ Edit: Just looked up some videos on Sonic Freerunner. No no absolutely not no. Unless Sonic GDK updates and actually has rail grinding system in place I think I'll stick with Source.
perhaps I should be more specific. I want to modify player fall damage as well as several other aspects of the game so that it works like a Sonic game insomuch that There's no fall damage, has working jump pads (or springs Something similar to what Black Mesa did with the xen jump pads), rail grind, Boost (so basically a modified version of the sprint and player movement), physics for loops (The things that Sonic runs around in the game), and a way to have the camera not break when going around them. Also to say that it's impractical to make a Sonic game in Source is like telling me don't bother going to work. I've already set my mind to using source for this.
FlPlayerFallDamage(), Touch() & SetAbsVelocity() / VPhysicsUpdate(), PhysicsSimulate(), ...more SetAbsVelocity(), ...more PhysicsSimulate()..., and CalcView(). It all works with Source—and rather elegantly—considering there isn't much work to do.
[QUOTE=amcfaggot;38655920]FlPlayerFallDamage(), Touch() & SetAbsVelocity() / VPhysicsUpdate(), PhysicsSimulate(), ...more SetAbsVelocity(), ...more PhysicsSimulate()..., and CalcView(). It all works with Source—and rather elegantly—considering there isn't much work to do.[/QUOTE] Excellent thanks for the info
yet another thing to ask. In the .cpp file what headers should I include so that I'm at least going in the right direction?
That's a general question that really depends on what code you're working on. Look in your codebase for those methods I mentioned, you'll notice they reside in existing implemented classes, and not just in headers; in most cases you'll be working with that code and not filling them out in your own classes. For instance, CalcView() and CalcPlayerView() are a couple methods you can just change yourself to fit a Sonic-esque point of view for the player.
Well my intention is to use it as a player based entity that I can apply to varying characters Springs will have to be its own model entity
You seem a bit directionless; you know what you want, but have no idea how to start. I'd begin with the simple stuff: map a very basic map to test with, change the player's model, make the default view third-person, etc. Then work up from there: increase move speed, modify acceleration and halting, add movement states (standing, running, jumping, skidding, spinning up) and play around with various bits of code for each state. Eventually, you'd start adding sounds and effects for each state, and add the more complex ones (e.g: grinding). This can be very irritating to do in Source (and generally C++) as you have to recompile and relaunch every time. You may want to make convars for most of the "properties" (e.g: acceleration values). Alternatively, you could just make it in Garry's Mod! Either way, expect several weeks of hard work to achieve a finished product; frustration will not be lacking (as with satisfaction at the end of each part!).
[QUOTE=Deco Da Man;38702279]You seem a bit directionless; you know what you want, but have no idea how to start.[/QUOTE] You are indeed right I'm getting quite skilled at modeling but I lack necessary programming skillz :v: [quote]I'd begin with the simple stuff: map a very basic map to test with, change the player's model, make the default view third-person, etc. Then work up from there: increase move speed, modify acceleration and halting, add movement states (standing, running, jumping, skidding, spinning up) and play around with various bits of code for each state. Eventually, you'd start adding sounds and effects for each state, and add the more complex ones (e.g: grinding). This can be very irritating to do in Source (and generally C++) as you have to recompile and relaunch every time. You may want to make convars for most of the "properties" (e.g: acceleration values).[/quote] So basically make a copy of a player cpp file and modify things that way? [quote]Alternatively, you could just make it in Garry's Mod![/quote] I'd have to learn how to use LUA to do that wouldn't I ^^; [QUOTE]Either way, expect several weeks of hard work to achieve a finished product; frustration will not be lacking (as with satisfaction at the end of each part!).[/QUOTE] Quite so and as an added bonus I'll be able to use that as a template for other characters as well!
[QUOTE=Itauske Roken;38635363]EEEhhhhhh..... I really want to use Source for this honestly. Sonic GDK is great and all but it lacks grinding rail system I need, Sonic FreeRunner Looks interesting but not what I need. =/ Edit: Just looked up some videos on Sonic Freerunner. No no absolutely not no. Unless Sonic GDK updates and actually has rail grinding system in place I think I'll stick with Source.[/QUOTE] afaik sonic gdk always has supported rails ive also been messing around making a sonic like game and i started with gdk, but unreal engine wasn't to my tastes. eventually i found out that a 3d sonic game was way too far out of my reach, so now im going simpler with first doing a 2d one.
[QUOTE=Blueridge;38706368]afaik sonic gdk always has supported rails ive also been messing around making a sonic like game and i started with gdk, but unreal engine wasn't to my tastes. eventually i found out that a 3d sonic game was way too far out of my reach, so now im going simpler with first doing a 2d one.[/QUOTE] If it does it SHOULD be listed. That IS a key gimmick in the sonic series.
[QUOTE=Itauske Roken;38706151] So basically make a copy of a player cpp file and modify things that way? [/QUOTE] I've never coded a Source mod (only GMod-stuff), but I'm pretty sure you have to modify game\shared\gamemovement.cpp . Look at CGameMovement::PlayerMove, the bit where it has "switch(player->GetMoveType()) {", but that inside an if-statement like so: [cpp] if(player->IsMovingLikeSonicOrSomething()) { switch(player->GetMoveType()) { case MOVETYPE_WALK: Sonic_FullWalkMove(); ... } } else { switch(player->GetMoveType()) { ... default code as is ... } } [/cpp] If you don't know how to make "player->IsMovingLikeSonicOrSomething" or "Sonic_FullWalkMove" then it is [b][i]way[/i][/b] too early for you to be trying to make a Source mod. [QUOTE=Itauske Roken;38706151] I'd have to learn how to use LUA to do that wouldn't I ^^; [/QUOTE] *Lua Making it for GMod would simplify life for both you and your users. Make a Source mod is no easy task; even with a team of experienced programmers, some of the simplest things require weeks of work. Even then, they are forced to redo things because it "doesn't feel right" (which is good, because the last thing you want is a frustrating game). Lua is easier to learn and nicer to use and will give you a much more responsive development experience. Oh, and you might actually be able to make it playable in multiplayer! (Multiplayer physics is very very difficult to get right; GMod makes it slightly more bearable than a source mod by letting you tweak things in real-time, but mostly faces the same problems) Also, I'm not going to download someone's horrible 99GB Source mod. If it were a gamemode for GMod, I'd be much more inclined as I know GMod works and that the download size (and time (bad internet)) will be much less. Or, you could make it for HL2: Sandbox! I'm sure amc would love that.
[QUOTE=Blueridge;38706368]so now im going simpler with first doing a 2d one.[/QUOTE] If you're into click and create stuff, Sonic Worlds for Multimedia Fusion is pretty good. If not, I recommend reading this: [url]http://info.sonicretro.org/SPG[/url]
[QUOTE=Deco Da Man;38710630]I've never coded a Source mod (only GMod-stuff), but I'm pretty sure you have to modify game\shared\gamemovement.cpp . Look at CGameMovement::PlayerMove, the bit where it has "switch(player->GetMoveType()) {", but that inside an if-statement like so: if(player->IsMovingLikeSonicOrSomething()) { switch(player->GetMoveType()) { case MOVETYPE_WALK: Sonic_FullWalkMove(); ... }} else { switch(player->GetMoveType()) { ... default code as is ... }} If you don't know how to make "player->IsMovingLikeSonicOrSomething" or "Sonic_FullWalkMove" then it is [B][I]way[/I][/B] too early for you to be trying to make a Source mod. *Lua Making it for GMod would simplify life for both you and your users. Make a Source mod is no easy task; even with a team of experienced programmers, some of the simplest things require weeks of work. Even then, they are forced to redo things because it "doesn't feel right" (which is good, because the last thing you want is a frustrating game). Lua is easier to learn and nicer to use and will give you a much more responsive development experience. Oh, and you might actually be able to make it playable in multiplayer! (Multiplayer physics is very very difficult to get right; GMod makes it slightly more bearable than a source mod by letting you tweak things in real-time, but mostly faces the same problems) Also, I'm not going to download someone's horrible 99GB Source mod. If it were a gamemode for GMod, I'd be much more inclined as I know GMod works and that the download size (and time (bad internet)) will be much less. Or, you could make it for HL2: Sandbox! I'm sure amc would love that.[/QUOTE] If that's the case could I get a good tutorial on how to use lua coding? That would be awesome. It might be better than going through 5000 lines of code in the gamemovement.cpp [QUOTE=Billy2600;38711061]If you're into click and create stuff, Sonic Worlds for Multimedia Fusion is pretty good. If not, I recommend reading this: [url]http://info.sonicretro.org/SPG[/url][/QUOTE] Actually I've been looking for that too. Blast physics could be useful.
Sorry, you need to Log In to post a reply to this thread.