Mythruna

Development => Blog => Topic started by: pspeed on November 27, 2012, 01:27:07 AM



Title: Thanksgiving Week Redux...
Post by: pspeed on November 27, 2012, 01:27:07 AM
As many of you already know, I took last week off from my day job.  Partially because we had a ton of family coming into town for the holidays and partially because I wanted to focus on some bigger Mythruna pieces that require undivided attention.

For the most part, this was a good call.  I waded into working on the physics engine with a fully aggressive unrealistic schedule that was torn to shreds within hours of beginning. :)  But, I was able to get some stuff accomplished that would have been difficult otherwise.  (Mostly because these things can turn out to be so difficult that I find excuses to avoid them.)

So, when chained to my desk and forced to stare at the problem for hours and hours, I eventually made progress in certain areas that are both critical and paint-peelingly boring to develop.

The goal for the week was to develop the networking layer for the physics engine.  There are some pretty hard requirements on how this must perform and operate and I'd been dragging my feet on it for a long time.  Furthermore, usually every time I pick up the physics engine code again it takes a few days to wrap my brain around what it's doing.

On the first Saturday, I resurrected the old combat prototype that I was working on some time back that never actually got any combat features except throwing chairs around.  This prototype uses the main Mythruna game engine like a library and the main engine had changed quite a bit over the last year.  It took me the better part of Saturday to get "CombatRuna" running again but at least I could test that the physics engine was still operating.

From there, I developed a simple prototype for ultimately testing network physics.  It's just a simple top-down view of a world with some rollable objects.  WASD controls another little block that can run around and push into these objects (and get pushed back, too)... more on that in a second.

One of the critical features of a networked physics engine for a fully open sandbox world is the ability to partition space into "zones" and reliably, accurately, and most of all, performantly keep track of objects in motion.  There could be 10s of thousands of objects in the world but the physics engine only needs to worry about the objects that are in motion and the objects nearby that it might collide with.  So the world is divided into zones and collision space partitioned accordingly.

I spent all day Sunday designing this piece from my high level notes.  I was hours into one detailed design before completely scrapping it.  There is no way that it would ever perform well.  The strains of hundreds or thousands of objects being moved 60 times a second and requiring figuring out which zone they are in, notifying interested systems, etc. is a problem trickier than it might at first seem.  The second design made it to implementation before I got far enough down in the weeds to know that it would have a completely different set of problems.  The third design took a different approach and centralized the problems of the second to a more manageable place and it still took me 4-5 hours of design to feel like I'd tackled the issue in an elegant way.

All of that being said, I now at least have a fully functioning zone management system that has almost 0 overhead.  Furthermore, it can be used for both network area of interest reduction (the original problem) and collision space activation (the problem I realized this could solve only after I'd implemented it).  The current way I do collision detection relies on the fact that the player is always watching his zone and the zones around him... this is why you can bump into a table that sticks into your zone from the zone next to you.  This approach actually wouldn't work for collision with physics objects in motion because it's too expensive to keep 9 zones active just for one little moving object.  Anyway, the zone manager solves this problem because objects can be in more than one zone at a time while they straddle the borders.  But I digress.

There were also a few ancillary problems I solved along the way (this one I promised to get back to above).  Player movement is kind of an interesting one.

In the version of the game that you guys play, your input directly controls the location of the camera and there is sort of a light player-specific physics applied to those inputs.  The problem is that it is then completely impossible to have the player affected by the other physical objects around him.  Players can't bump into each other but more importantly, a rolling boulder would go right through the player... and most critically to me, you couldn't stand on a moving ship without falling off.

The more immediate problem was what happens when a player walks into an object that can move.  If it doesn't push the player back appropriately then the physics engine easily runs into cases that are impossible to solve (and lead to explosive results).  For example, if you slide into a chair and push it against the wall... you can keep pushing into the chair if it's not pushing back and the physics engine doesn't know how to resolve this chair+wall+immovable force problem.

As it turns out, making the player a physical object just like the others is kind of tricky.  Instead of setting absolute position and rotation, the player inputs apply accelerations to the player's physical object.  I will tell you that moving yourself with just acceleration and trying to get a similar affect to what we have now is not as straight forward as it may seem.

...but at least I was able to get something working.  It was very educational, also.

By the time I had that working and a proper zone manager design partially implemented, the holidays were full-on upon me and I had limited time to get back to coding.  Still, at this point, I have my simple test app and the zone manager fully implemented.  

The next piece will be the actual networking part that packages up the state of a player's zone and sends it to them many times a second.  I'm sure this will present its own surprises but I feel like a) I've already implemented the hard part, and b) the network speed test I put out some time back already had some nice compact state transmission code.  In this case, it's not as much a matter of making it work but in keeping the packet size down to minimum levels.  So hopefully it is more straight-forward than what I've already accomplished.

I wish I had better news than that but some progress is better than no progress.  I hope to get the networking prototype finished in the next week or so and then I can put something out for the donators to help me test.  After that, it's just a matter of integrating it into the regular engine.


Title: Re: Thanksgiving Week Redux...
Post by: FutureB on November 27, 2012, 01:52:09 AM
that all sounds good paul :P reading it even tho i dont understand it because im newb made me feel good about your game and the future it will have :]


Title: Re: Thanksgiving Week Redux...
Post by: pspeed on November 27, 2012, 01:54:26 AM
that all sounds good paul :P reading it even tho i dont understand it because im newb made me feel good about your game and the future it will have :]

Heheh... verbal diarrhea is a constant problem for me.  And I didn't even mention that I got sick over the weekend... :)


Title: Re: Thanksgiving Week Redux...
Post by: FutureB on November 27, 2012, 03:05:25 AM
Paul i think when your sick its natural to have diarrhea  ;D


Title: Re: Thanksgiving Week Redux...
Post by: belgariad87 on November 27, 2012, 05:04:58 AM
Working on the hard parts first is always a good idea in my opinion. Well done Paul!


Title: Re: Thanksgiving Week Redux...
Post by: BigredRm on November 27, 2012, 05:47:51 AM
Great read.


Title: Re: Thanksgiving Week Redux...
Post by: Teknonick on November 27, 2012, 01:42:16 PM
"Great Read." indeed! Glad to hear about the physics, but sad to hear how hard it is! Some other 'prototype game' have been having very similar problems, but got something... simple out... I would LOVE it if you had a ship that could ACTUALLY move, and your character not fly into space! xD... I hate that in games such as GMod, or Blockade Runner.

Once you get those issues out, those games will see this and go "Quick guys, someone offer to help him, then steal the code and bring it back!" :3... That's not nice, but I can't help thinking so many companies will see your game, and see ALL those things they wanted to do, but didn't want to do it because "it was to hard. I didn't have enough time to do it." type stuff!

Yes you will have other game companies loving your game, and see your work in other games. :3... I can see it now... Actually, I already have, I'm from the future.


Title: Re: Thanksgiving Week Redux...
Post by: Michael on November 27, 2012, 04:49:33 PM
Quote from: Teknonick
Yes you will have other game companies loving your game, and see your work in other games. :3... I can see it now... Actually, I already have, I'm from the future.
Wow..

1.) Excellent read, the first thing that i actually thoroughly read on Mythruna.

2.) Paul, I loved seeing you use the feature of throwing chairs, all though if you allow that, that will be just another way to grief.

3.) If you allow players to have a static position, not much movement, but have correct collision, i would love it. the only bother is static position, making it look like lag so..

4.) Physics engine is going to be amazing.

Good luck Paul! I have faith in you and I expect extremely great things from you as your knowledge is extremely superior to that of many!


Title: Re: Thanksgiving Week Redux...
Post by: FutureB on November 27, 2012, 05:01:10 PM
Quote from: Teknonick
Yes you will have other game companies loving your game, and see your work in other games. :3... I can see it now... Actually, I already have, I'm from the future.
Wow..

1.) Excellent read, the first thing that i actually thoroughly read on Mythruna.

2.) Paul, I loved seeing you use the feature of throwing chairs, all though if you allow that, that will be just another way to grief.

3.) If you allow players to have a static position, not much movement, but have correct collision, i would love it. the only bother is static position, making it look like lag so..

4.) Physics engine is going to be amazing.

Good luck Paul! I have faith in you and I expect extremely great things from you as your knowledge is extremely superior to that of many!

maybe you should start reading all posts thoroughly and then you might have less questions about them :]


Title: Re: Thanksgiving Week Redux...
Post by: Michael on November 27, 2012, 05:02:53 PM
.. great idea troll -_-


Title: Re: Thanksgiving Week Redux...
Post by: Sean on November 27, 2012, 08:17:51 PM
When the RPG elements roll in griefing wont be an issue.


Title: Re: Thanksgiving Week Redux...
Post by: belgariad87 on November 27, 2012, 09:12:39 PM
When the RPG elements roll in griefing wont be an issue.
agreed. not to mention that you cant grief on a single player game, which is all i'll be doing on mythruna for much of the beginning.


Title: Re: Thanksgiving Week Redux...
Post by: pspeed on November 27, 2012, 09:40:42 PM
When the RPG elements roll in griefing wont be an issue.
agreed. not to mention that you cant grief on a single player game, which is all i'll be doing on mythruna for much of the beginning.

The nice thing is that if you just decide one Saturday that you want to co-op with a buddy, it will be no problem to run a server for a while on that same world you've been playing.  Hmmm... though I may have to add some special utility function for transferring your character.  (Currently the single player character is always different than the server player database... not a hard fix though.)


Title: Re: Thanksgiving Week Redux...
Post by: belgariad87 on November 28, 2012, 05:13:49 AM
When the RPG elements roll in griefing wont be an issue.
agreed. not to mention that you cant grief on a single player game, which is all i'll be doing on mythruna for much of the beginning.

The nice thing is that if you just decide one Saturday that you want to co-op with a buddy, it will be no problem to run a server for a while on that same world you've been playing.  Hmmm... though I may have to add some special utility function for transferring your character.  (Currently the single player character is always different than the server player database... not a hard fix though.)
this will be especially awesome once my dad and little brother get the game and we all start going on adventure through mythruna together! i will probably make a video series outa that. I tell them how awesome this game is gonna be but until its muuuch farther in developement, i won't suggest anyone download it. the few people i did tell to download said "it sucked" blah blah just because you put up an unfinished pre alpha download. *cough losers cough*


Title: Re: Thanksgiving Week Redux...
Post by: pspeed on November 28, 2012, 12:33:42 PM
this will be especially awesome once my dad and little brother get the game and we all start going on adventure through mythruna together! i will probably make a video series outa that. I tell them how awesome this game is gonna be but until its muuuch farther in developement, i won't suggest anyone download it. the few people i did tell to download said "it sucked" blah blah just because you put up an unfinished pre alpha download. *cough losers cough*

Heheh.  Some people have no vision. :)  For other games, I'm more of the "get it when it's finished" guy too unless I can feel like a part of the community.  So I really appreciate all of you who play and contribute to the discussions.


Title: Re: Thanksgiving Week Redux...
Post by: belgariad87 on November 28, 2012, 01:24:14 PM
this will be especially awesome once my dad and little brother get the game and we all start going on adventure through mythruna together! i will probably make a video series outa that. I tell them how awesome this game is gonna be but until its muuuch farther in developement, i won't suggest anyone download it. the few people i did tell to download said "it sucked" blah blah just because you put up an unfinished pre alpha download. *cough losers cough*

Heheh.  Some people have no vision. :)  For other games, I'm more of the "get it when it's finished" guy too unless I can feel like a part of the community.  So I really appreciate all of you who play and contribute to the discussions.
i used to jump at the opportunity to get games early but from what i've learned the past few monthes, i believe Mythruna will be my last investment in an unfinished product. and i will be going with quite the bang


Title: Re: Thanksgiving Week Redux...
Post by: Michael on November 28, 2012, 03:10:24 PM
this will be especially awesome once my dad and little brother get the game and we all start going on adventure through mythruna together! i will probably make a video series outa that. I tell them how awesome this game is gonna be but until its muuuch farther in developement, i won't suggest anyone download it. the few people i did tell to download said "it sucked" blah blah just because you put up an unfinished pre alpha download. *cough losers cough*

Heheh.  Some people have no vision. :)  For other games, I'm more of the "get it when it's finished" guy too unless I can feel like a part of the community.  So I really appreciate all of you who play and contribute to the discussions.
We all say to you: Your Welcome! :)


Title: Re: Thanksgiving Week Redux...
Post by: Sean on November 28, 2012, 04:10:03 PM
this will be especially awesome once my dad and little brother get the game and we all start going on adventure through mythruna together! i will probably make a video series outa that. I tell them how awesome this game is gonna be but until its muuuch farther in developement, i won't suggest anyone download it. the few people i did tell to download said "it sucked" blah blah just because you put up an unfinished pre alpha download. *cough losers cough*

Heheh.  Some people have no vision. :)  For other games, I'm more of the "get it when it's finished" guy too unless I can feel like a part of the community.  So I really appreciate all of you who play and contribute to the discussions.
i used to jump at the opportunity to get games early but from what i've learned the past few monthes, i believe Mythruna will be my last investment in an unfinished product. and i will be going with quite the bang
I approve this message.


Title: Re: Thanksgiving Week Redux...
Post by: Moonkey on November 29, 2012, 11:17:26 PM
It's like cooking food. You cook it 1/10th of the way and it's not going to be so good. :/. But you've got those games where the recipe tastes good even in the middle of developing. And then you have a finished product. You add those extra touches to make it taste better (Bug fixes/patches). Or maybe those touch-ups make it worse. And finally you have mods which are like toppings, sauces, and spices to go on the side.

(Hungry yet?)


Title: Re: Thanksgiving Week Redux...
Post by: BenKenobiWan on December 02, 2012, 08:57:32 PM
Thank you, Paul, for the effort you put into this game. You are doing more than many would, and that makes me feel good about my investment.
Keep it up, and God bless you!


Title: Re: Thanksgiving Week Redux...
Post by: Moonkey on December 02, 2012, 11:12:17 PM
Thank you, Paul, for the error you put into this game. You are doing more than many would, and that makes me feel good about my investment.
Keep it up, and God bless you!
Error? D:


Title: Re: Thanksgiving Week Redux...
Post by: BenKenobiWan on December 03, 2012, 09:08:41 AM
?


Title: Re: Thanksgiving Week Redux...
Post by: pspeed on December 03, 2012, 09:17:27 AM
?

You said "error" when I think you meant "effort"... and I believe that is what Moonkey was poking at.


Title: Re: Thanksgiving Week Redux...
Post by: Moonkey on December 03, 2012, 11:09:02 PM
?

You said "error" when I think you meant "effort"... and I believe that is what Moonkey was poking at.
I actually thought he meant error. Oops. It felt as if he was casually insulting the game. Hehe.


Title: Re: Thanksgiving Week Redux...
Post by: belgariad87 on December 04, 2012, 05:21:39 AM
?

You said "error" when I think you meant "effort"... and I believe that is what Moonkey was poking at.
I actually thought he meant error. Oops. It felt as if he was casually insulting the game. Hehe.
why would he say such nice things but mean to say error?


Title: Re: Thanksgiving Week Redux...
Post by: Moonkey on December 04, 2012, 10:35:57 PM
?

You said "error" when I think you meant "effort"... and I believe that is what Moonkey was poking at.
I actually thought he meant error. Oops. It felt as if he was casually insulting the game. Hehe.
why would he say such nice things but mean to say error?
Sarcasm can change alot of what someone says.


Title: Re: Thanksgiving Week Redux...
Post by: BenKenobiWan on December 06, 2012, 02:11:40 PM
?

You said "error" when I think you meant "effort"... and I believe that is what Moonkey was poking at.
Oops, silly iPad autocorrect.  :P


Title: Re: Thanksgiving Week Redux...
Post by: Moonkey on December 06, 2012, 11:08:34 PM
?

You said "error" when I think you meant "effort"... and I believe that is what Moonkey was poking at.
Oops, silly iPad autocorrect.  :P
Yuck, Ipad. I will hate them because I've never used it. >:I...


Title: Re: Thanksgiving Week Redux...
Post by: BenKenobiWan on December 07, 2012, 09:35:05 AM
?

You said "error" when I think you meant "effort"... and I believe that is what Moonkey was poking at.
Oops, silly iPad autocorrect.  :P
Yuck, Ipad. I will hate them because I've never used it. >:I...
The only reason I have one is because when I enrolled in college I got a $500 Apple Store gift card to buy one. I now wish I had sold the gift card to someone and bought an Andriod Tablet. For my purposes, they are better; iPads are too closed up and unchangeable.


Title: Re: Thanksgiving Week Redux...
Post by: Sean on December 07, 2012, 05:10:11 PM
?

You said "error" when I think you meant "effort"... and I believe that is what Moonkey was poking at.
Oops, silly iPad autocorrect.  :P
Yuck, Ipad. I will hate them because I've never used it. >:I...
The only reason I have one is because when I enrolled in college I got a $500 Apple Store gift card to buy one. I now wish I had sold the gift card to someone and bought an Andriod Tablet. For my purposes, they are better; iPads are too closed up and unchangeable.
I've heard the netbooks are easier and more efficient during lectures. Also, you could probably be less obvious playing Angry Birds during a lecture if you use a netbook.  :)


Title: Re: Thanksgiving Week Redux...
Post by: BenKenobiWan on December 07, 2012, 06:19:20 PM
?

You said "error" when I think you meant "effort"... and I believe that is what Moonkey was poking at.
Oops, silly iPad autocorrect.  :P
Yuck, Ipad. I will hate them because I've never used it. >:I...
The only reason I have one is because when I enrolled in college I got a $500 Apple Store gift card to buy one. I now wish I had sold the gift card to someone and bought an Andriod Tablet. For my purposes, they are better; iPads are too closed up and unchangeable.
I've heard the netbooks are easier and more efficient during lectures. Also, you could probably be less obvious playing Angry Birds during a lecture if you use a netbook.  :)
Haha
I'm doing online classes right now, so I don't have to hide my games.


Title: Re: Thanksgiving Week Redux...
Post by: Blackslash on December 17, 2012, 07:27:06 PM
?

You said "error" when I think you meant "effort"... and I believe that is what Moonkey was poking at.
Oops, silly iPad autocorrect.  :P
Yuck, Ipad. I will hate them because I've never used it. >:I...




hey will some people use ipad (me)


Title: Re: Thanksgiving Week Redux...
Post by: Michael on December 21, 2012, 02:00:20 AM
?

You said "error" when I think you meant "effort"... and I believe that is what Moonkey was poking at.
Oops, silly iPad autocorrect.  :P
Yuck, Ipad. I will hate them because I've never used it. >:I...
They suck.


Title: Re: Thanksgiving Week Redux...
Post by: BenKenobiWan on December 21, 2012, 06:21:40 PM
?

You said "error" when I think you meant "effort"... and I believe that is what Moonkey was poking at.
Oops, silly iPad autocorrect.  :P
Yuck, Ipad. I will hate them because I've never used it. >:I...
They suck.
I am a stalwart Windows user, but iPads don't suck. They run perfectly smooth at all times, I've never lost data, it's all very simple. But, you can't customize much of anything (and no java. And expensive accessories). Not my personal preference, but it's what I got. (Unless, of course, anyone out there wants to buy a lovingly used black iPad 2 32gb for around $350)


Title: Re: Thanksgiving Week Redux...
Post by: Michael on December 21, 2012, 06:30:46 PM
lol he hates it :P


Title: Re: Thanksgiving Week Redux...
Post by: BenKenobiWan on December 21, 2012, 06:38:30 PM
lol he hates it :P
Yeah, I hate it. But it doesn't suck. There's a big difference.


Title: Re: Thanksgiving Week Redux...
Post by: Michael on December 21, 2012, 09:20:52 PM
lol he hates it :P
Yeah, I hate it. But it doesn't suck. There's a big difference.

See, my brother has special needs (cannot walk or talk, but extremely smart) he got a free iPad from his school for learning. :)
I see no nice things about it.


Title: Re: Thanksgiving Week Redux...
Post by: Moonkey on December 22, 2012, 12:32:06 PM
Can't talk? Also; Special needs? How can you tell if someone is extremely smart if they ca-- Oh, tests.

Edit: Speaking about "Special needs"; I have an older sister that is 24. She can't walk,talk, or learn. She's like a giant baby :).

Edit: Literally acts like one too, without all the crying.


Title: Re: Thanksgiving Week Redux...
Post by: Michael on December 22, 2012, 01:07:34 PM
Let's see.

1.) Can open doors, unlock, ect.
2.) Knows how to start a computer, work a mouse.
3.) knows how to unscrew lids.
4.) Works the tv a lot.
5.) ect, ect, ect.


Title: Re: Thanksgiving Week Redux...
Post by: Moonkey on December 23, 2012, 01:30:31 AM
Ah, kinda like cerebral palsy. Ok.


Title: Re: Thanksgiving Week Redux...
Post by: Michael on December 23, 2012, 01:55:59 AM
Ah, kinda like cerebral palsy. Ok.

tossed around as baby, mother smoking while preg.. don't worry we don't live with her ;)


Title: Re: Thanksgiving Week Redux...
Post by: Moonkey on December 23, 2012, 01:04:09 PM
"Alright everyone, let's play baby football. *throws baby*"


Title: Re: Thanksgiving Week Redux...
Post by: Michael on December 23, 2012, 01:52:46 PM
"Alright everyone, let's play baby football. *throws baby*"
1.) Funny.
2.) Complete rage #abuse