## I couldnt sleep – Hyperdrive

It might be the 4 espresso drinks i drank earlier. But i couldn’t sleep. My brain was chewing on ways i could do a hyperdrive.

The idea is like .. a condor? big bird, floats on drafts/currents. Starts off on feet and wings, expends a bunch of energy getting up into the air, but once its there, it floats.

So, earlier, i wanted thrust in a direction to keep on building velocity. I would make it encounter a kind of resistance that goes up, so that there’s a terminal velocity that gets approached. Lets call that V=1.

Upon getting to that V=1, you kick in the … insert science fiction name here, but its the “flapping” part of getting flying. Say it kicks you into hyperspace, at V=1.3. If you get below V=1, you exit hyperspace. Maybe its the Hyperspace actuator. You can get better hyperspace actuators.

In hyperspace, there’s a different engine available. Its a directional “push” – you can push against what would normally be gravity sources in normal space. The closer the thing, the better the push. you aim your pusher beam against the target, and apply push power. This speeds you up well beyond into much better V’s.

However, there’s “friction” in hyperspace .. probably map-based. I’d probably do it as a function of how close you are to a star .. basically gravity wells have cleared out the friction stuff. So depending on where you are, you slow down. If you go far away from all stars, the distance to the stars = less push, and friction, makes it impossible to stay in hyperspace.

Would have to play with the numbers, but lets say that it would take 10-30 minutes to get between most stars at V=1. Lets take the 30 minute case, D=30 between them. Assume stars have mass M=1.

1. Line up your current star with your destination star. Speed up towards your current star, getting to V=1. Gravity pulls you in as well. Beginning your run as it were.
2. When you get close enough to V=1 kick in your hyperdrive actuator to boop over to hyperspace, maybe at V=1.5
3. Pass through/past the star and then use your hyperdrive vector engine to target your star, and push against it. At distance D=1, you get a nice M/D push of 1 bringing you up to 2.. i did a quick excel thing to expound on this …

I lost my bullet numbers. I get a transit in T=10 instead of T=30.. I’ll probably have to make more oomph available at longer distances, so its more like a pole, but i really wanted it to be “if you’re caught between the stars, its hard to get oomph.” Also, with the above setup, your max distance from a star works out to about 60-70 units if the star has mass 1.

If i change it to be Mass/sqrt(distance), i get still 4 minutes, but the distance greatly increases. Hmm.

But, anyway, that’s the idea. As you get close to the target star, you push against it bringing your velocity back under V=1 and you pop back into normal space. And avoid those “dense” areas where max-v is lower if you want to float longer.

Okay, now maybe i can sleep.

## Space Mud/Game Ideas

Long time no update .. a codebase. https://geekygulati.com/2016/03/12/dotnetmud-spacemud-optimizing-network-traffic/ is when I talked about it last.

I was playing Starcom Nexus, and it reminded me that once upon a time i was playing with flying a ship around in gravity. I looked, it was 7 years ago. I cloned it, I updated it, I ran it. I was amazed.

I’m not going to kid myself with “I have time to work on this” .. but, if I did, what would I make? This is like “If I win the lottery”, giving space for some creative stuff to sparkle. I would have planets that (slowly, unrealistically) orbit their stars.

I would have planet and sun gravity that draw ships in

But the ships won’t crash against the planet. Instead, there will be a “autopilot” bump that happens that assists the ships into a non-crashing orbit over time. (so a few times they’ll go through the planet, but eventually would end up orbiting)

ships can do a “land” feature if they are close enough to a city, goes into an automatic “shrink into the planet” type of thing. At that point, the game switches over to text mode of having landed, getting out of the ship, n/s/e/w to visit whatever places.

At first i wanted real thrust type stuff. But that can be very unmanageable.

So make it manageable. Choose an object to travel to. Accelerates towards, the decelerates. Can be planetary. Can be a ship. Different levels of autopilot around this can be purchased. Fuel cost for the big accelerations, free small ones to prevent stranding. Standard given autopilot = bring self to a stop relative to object (so you can end up at your target)

But i don’t want acceleration to be good for interstellar travel. Not without putting in 10 minutes of game time or more. For that, i want a hypertravel mode, but with a twist:

In hyperspace mode, gravity is inverted at d^5 or something silly like that. So to send yourself to another star, you get close to your current star, switch to hyperspace, and get catapulted out that way. If you aim wrong you can still use your hyperspace drives to point yourself in some direction, but they can only slow you down or speed you up to some absolute value. (the stellar launch can exceed that value). spend more money for better vectoring and acceleration and maximum controllable velocity. You would learn about stellar launch the hard way, you could just go into hyperspace and start accelerating towards a star.

So you would theoretically line up against a star, go into hyperspace, get catapulted, get close, and if you did it just right you would get slowed down by the target star but if not you would drop out of hyperspace somewhere around your target star. You drop out of hyperspace only when your hyperspace velocity gets slow enough.

The rest of the game would be similar, i guess, to Starcom Nexus. You visit planets, you solve things, you get resources, you fight baddies, you mine stuff, etc. That’s the game built on top of the above. Except that planet visits are text adventures.

I’m writing this from a hotel in Phoenix, where i’m on vacation with my wife. Its only taken .. 2 days? of vacation time, to get my brain clear enough to where this stuff starts coming up for creativity. yay!

## Resistance to starting a semi-large project for fun

I have 2 projects floating around in my head, and 1 deployed but incomplete.

I’m on NYE break.. another 5 days or so of vacation.    This would be a perfect time to work on these projects.   If that is what I want to do.

Yet, I find I am reluctant to start.  I get more enjoyment out of thinking what I could do, rather than actually doing it?

Its probably similar to the idea of not-running while on vacation.   If I’m going to do it, it needs to be part of normal-life, I think, not trying to beat it into submission with the vacation-card.

## Idea #1 – “Burndown”

I’ve had this for several years.  It’s a cross between smartsheet, and Rally, and “always remembering historical scope and left” to generate burndown graphs for any node in the tree.   Its meant to be a multi-person hierarchical task-for-a-project list.    In advanced mode, with templates and stuff.

The trick to make this one work is to have the UX be as easy to get things done as possible.

## Idea #2 – “Muddy Sky”

Except, I want it so that I could write a multiplayer version of Endless Sky or even Elite, but with Mud-like conventions on the server side ..  your spaceship is “floating” within a “room”, and interacts with the other objects in that room, and all the client/server stuff is handled over Signal/R, probably using javascript fro the client.

The solution in my head currently consists of:

• javascript Canvas on the client side, with translation for rotating ship graphics
• signal/r for payload transfer from server to client
• property transfer dictionary of object / key / value for transfering game state from server to client
• the “player” object on the server side remembers what was sent before.
• the player object on the server gets called to collect what it thinks its client is interested in
• some code to compare that against what was sent before so that only changed values get sent down in a client update
• different kinds of messaging
• “the world has changed” server->client (described above) to provide client with the latest that it needs for rendering
• “event” server->client – this would be stuff like “something blew up”, or “somebody said something”.
• on the server side, would broadcast to a room or to a particular player object
• “command” client->server – this is stuff like thrust, turn left, turn right, etc.
• I can already tell that will likely need to do “thrust for 1 sec” etc because I’m not sure how time sync would work.

Challenges:

• latency – I don’t know that signal/r will be fast enough to get the latest updates from server down to client.  I’m also not sure that the code for reducing payload size is worth it.  And I haven’t written any code yet!!!!
• time tracking – client has to deal with different FPS, server has to deal with different tick-per-sec.
• I was thinking that all commands / events etc are stuff like “at tick XXXXX, thrust at 50% for 3 ticks”
• server deals with things in desired-tick order, possibly one tick at a time (or set server interval.  100ms?)
• start off with fixed time intervals, and then auto-tune from there
• auto-tune: how fast can the client update its screen – no need to get updates from the server any faster than that.  Let the server know that.
• auto-tune: how much has changed, does the server need to send an update to this client yet?    Note that stuff that changes, can stay in the buffer to be sent, doesn’t have to be re-detected.

Gameplay challenges:

• I want it to be like endless sky…
• It’s a 2D world
• things overlap each other, (mostly) no collision
• basic operations are thrust, rotate
• there are ship computers for dealing with more complicated things
• except that, kindof in order:
• no speed limit.   thrust one way, thrust the other way
• this is why you want an AI to guide you to someplace
• don’t fly over a star, you’ll overheat and explode
• there COULD gravity
• I’ll suspend belief, and have the planets/sun/etc not do the gravity simulation bit, but I want the ships and torpedos to be affected by gravity.
• However, then there’s a discrepancy .. so maybe planets do orbit via gravity.
• There would have to be something like “I want a planet of mass M=x to orbit that star with a Aphelion,Perihilion=y,z” and it calculates the starting x,y and velocity or something.    And then just calculate where the planet will be at a given time T and what its velocity will be.
• If we go with Gravity, then there will be bigger distances between planets
• HYPERSPACE is a different space that your ship can enter
• masses exert anti-gravity.  Ie, you get pushed away from planets, suns, etc.   r^3 instead of r^2?
• this will probably cause some interesting “focus” points where everything gets pushed towards.
• I wonder how those focus points would move as things orbit each other in normal space?
• I want velocity in hyperspace to be exponential, like it is in FSD in Elite.   Ie, you control your acceleration up/down.    You can then get to insane levels of acceleration .. in a certain direction.
• You will really need a computer to guide you in this world.
• “Interdiction” ala Elite would be done by firing interdiction missiles through hyperspace at your target.. possibly homing?

See, there are so many places I want this to go.  Hence, I want a nice development system, in C#, similar to how we used to run LP-Mud’s.. where I can play with these different mechanics (server side).. and provide all the hooks that others might need to make the game interesting.

Based on the amount I’ve typed, I know that the game is the one I want to work on the most.

But I also know that vacation time is not enough to get this to where I want it to be.  Sure I might get some stuff knocked out, but it won’t be the juicy stuff.    So, I’m loathe to start.

Maybe I’ll go mine some more asteroids in Elite.

Or maybe I’ll set up mini-simulations of what the game play would be like, and just do that rather than build the game.

Maybe I need to start visiting the game-development groups in Louisville on a more regular basis.