Author Topic: Star Trek... new feature ideas and setup  (Read 11727 times)

0 Members and 1 Guest are viewing this topic.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Star Trek... new feature ideas and setup
« on: September 26, 2013, 07:08:13 pm »
As many of you know, I've been working on a Star Trek game for some time. This project is not dead, just sluggish because of RL obligations.

I am starting to think about what features can be client-side, and what must be server-side, on the hub. Here are some of my ideas:

1. Have the hub itself hold ALL the data about the players on the game...their names, their positions, etc. If I can create databases with this info and have the hub handle searching for the data, then I can do something much easier with regard to sending data (see #2).

2. Instead of having the calculator have all the data for all the players on the server, which would consume a lot of memory, I can have the data on the hub, and then when you need some of the information, the hub would respond only with relevant data. For example, if you are doing a "position update" on other ships (redrawing them at their new locations), we can send a request for new positions to the hub. Now, let's assume the maximum view range of your ship is 100. The hub would only send you back the positions of players within 100x100x100, not the guys on the other side of the galaxy.

2a. The hub itself would do the cycling, not the calculators. Once a weapon is fired, the calculators never again see that. The server adds it as an entity, and handles changing its position on correct timing, and sending data on it to the calculators. Thus the server is doing all the work and all the clients are doing is rendering it.

3. Instead of having separate routines for drawing ships and drawing phasers and photons, I can actually make them all "objects" and store their position, direction, and speed data on the hub in the same fashion. That way, I can draw them all with the same routine. This would also allow for this: if you fire at a ship and you miss, the projectile keeps going until it either goes out of range or hits someone else, without any extra code, beyond a collision detection.

4. A star base will be a server-created entity that is capable of self defense. It will belong to a team (assuming I can make team play possible). Players on that team can enter the base, refuel, repair, and equip it with weapons. Players on the opposing team can attack it, and it will defend with whatever it is equipped with.

5. When the first player joins the hub, the server will create a world and generate terrain. Terrain can include basic space, stars, nebulas, and wormholes. I hope to include planets at some point, but star bases will be the only defendable thing in v1. Basic space does nothing and is the majority of the map. Stars can damage your ship if you go too close, and have gravity (not sure how I'm implementing or using gravity). Wormholes also have gravity, but more. Nebulas are there mainly for a tactical use...they disable shields, sensors, and communication. To minimize load on CALCnet and on the calculators, when you join the world, you will only be send terrain data for the area near you. As you near the edge of that, you will exchange your terrain data with new terrain data.


Here are, as I see it, the pros and cons.

Pros

  • Less demand on CALCnet itself and on the client calculator.
  • Able to do more, and have more realistic combat, with less coding.

Cons

  • We are relying more on the hub for data than on the individual units. Thus, if the hub can't keep up, then we have a problem.
  • I will need to write routines for REQUESTING data from the hub, which I wouldn't have to do otherwise.


So here is my questions:

1. Do the pro's outweight the cons? Should I adopt this new strategy?

2. Anyone willing to help out at all? I don't have all the time in the world to make this lol?
« Last Edit: September 26, 2013, 07:10:11 pm by ACagliano »

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Star Trek... new feature ideas and setup
« Reply #1 on: September 27, 2013, 09:10:35 am »
Sounds interesting, I think i would go with loading data off the hub to allow the prog on-calc be smaller.

And I could maybe help with server-side coding of the gCn part :)

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Star Trek... new feature ideas and setup
« Reply #2 on: September 27, 2013, 11:38:41 am »
Sounds cool. I believe that the pros largely outweigh the cons. ;)

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Star Trek... new feature ideas and setup
« Reply #3 on: September 27, 2013, 12:54:58 pm »
Sounds interesting, I think i would go with loading data off the hub to allow the prog on-calc be smaller.

And I could maybe help with server-side coding of the gCn part :)

Ok. This is the new method I'm gonna go with then. And, Soronome, I'd be glad to have some help with. The only real server scripting language I know is PHP, and not extremely well.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Star Trek... new feature ideas and setup
« Reply #4 on: September 27, 2013, 12:56:46 pm »
So, like how do you want to do it: there are two main differences with how to do gCn stuff: I could either write a custom metahub or i could use cemetechs metahub (allowing to omit the server option), and have the server act as a calculator client with more features, so it'll have a specific id to which you'd have to send direct frame messages.
I'd be planning to do this in python2.7 btw.
So, what should i do? (your call)

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Star Trek... new feature ideas and setup
« Reply #5 on: September 27, 2013, 01:14:05 pm »
why dont u shoot me a PM. we can talk there.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Star Trek... new feature ideas and setup
« Reply #6 on: September 27, 2013, 03:07:00 pm »
why dont u shoot me a PM. we can talk there.
Well it'd be cool if you talked about it in public cause I am interested in this discussion. ;)

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Star Trek... new feature ideas and setup
« Reply #7 on: September 27, 2013, 03:08:09 pm »
why dont u shoot me a PM. we can talk there.
Well it'd be cool if you talked about it in public cause I am interested in this discussion. ;)
We decided on a custom metahub.
ACagliano is writing up a protocol atm.

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Star Trek... new feature ideas and setup
« Reply #8 on: September 27, 2013, 03:08:11 pm »
The stuff we're PM'ing about is about technical information. I'll disclose it once we have a plan lol

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Star Trek... new feature ideas and setup
« Reply #9 on: September 27, 2013, 03:14:06 pm »
Well I love techy stuff. But if you disclose it later then it's OK. ;)

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Star Trek... new feature ideas and setup
« Reply #10 on: September 27, 2013, 09:10:36 pm »
Me and Sorunome are starting with the basics... initialization of the map and database, ability to select a world, open a new one, etc. When the very first player joins, the first world gets opened. The server admin can create and delete worlds. ClrHome will likely host this (http://clrhome.org), so we will have that power.

I am also working on list of packets that clients can send the hub... such as
CreateObject, with Object type (ship, phaser, photon, base, etc), object size, object velocity, object direction all in the packet that the server would handle.
DeleteObject (im in a bit of a pickle as to how to adequately delete the correct object :) )
GiveMap, the server will respond with the area near you. If you can see a radius of 200, then you get 200 x 200 x 200.
and so on.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Star Trek... new feature ideas and setup
« Reply #11 on: September 28, 2013, 02:25:44 am »
wait, clrhome has power? since when, it is offline so often :P
So yeah, i'd need access there then to be able to test ^^

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Star Trek... new feature ideas and setup
« Reply #12 on: September 28, 2013, 10:30:49 am »
Send Deep Thought a PM. He handles the server privileges (I think).
And we aren't down **that** often. lol. But we are toying with the idea of a paid VPS. So that may change.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: Star Trek... new feature ideas and setup
« Reply #13 on: September 28, 2013, 03:21:32 pm »
sorry for the double post, but this is a substantial update to my idea. Instead of having two separate databases, one for objects (ships and projectiles), and one for terrain, why not also make terrain an object? For instance, add an object of type Terrain, subtype nebula, with center point and radius data provided. Not only does this mean one database, and thus less server load, it also means the same routine to process and render it, and means that the server can randomly change the terrain :)

Fun fact: the total map size of Star Trek MP (playable area) is 7.922816251 x 10 ^28 cubic units.
« Last Edit: September 28, 2013, 04:07:08 pm by ACagliano »

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Star Trek... new feature ideas and setup
« Reply #14 on: September 28, 2013, 06:47:13 pm »
Sounds pretty cool ! :D