Jump to content
SSForum.net is back!

Dr Brain

HS Staff
  • Posts

    3480
  • Joined

  • Last visited

Everything posted by Dr Brain

  1. Don't know about games, but AIM is a good example. It's always AIM, whether you use pidgin, miranda, trillian, or the original AIM.
  2. Hyperspace has had problems with maps as small as 700kb. Beware.
  3. Yes, imagine thors. EDIT: ugh, new page. Oh well...
  4. It's not that it does nothing because everyone starts at 20. Everyone starts at 20 because it's there.
  5. That's words that sound like the thing they describe. The examples LC gave are decidedly not actual words. But onomatopoeia is a good vocab word, none the less.
  6. I'm not a programmer. I'm an electrical engineer, and I've actually worked on a project where we evaluated transferring power via light. You'll note that article talks about moving to fiber for data, and not power. Most of the copper wiring in a house (by mass) is power, and not data. That copper isn't going anywhere (it might change to Al if copper prices keep going the way they are, but they will *not* be optical). While it's nice to think that optical computing is just around the corner, the truth is that it's still very theoretical. Any move toward optical will be for data cables that have to traverse many miles where the attenuation makes a big difference, and not the power grid, and not within a home. And none of that will affect LC's Win 7 experience (or lack thereof).
  7. Not surprising. You have no scientific data, only opinions that you expect others to accept without question. Which basic OS tasks have gone up in requirements? If you think about it rationally, you'll find that they haven't. You expect a lot more functionality from your OS than you used to, and that comes with a price. Good luck with that. Transferring even 100W of power through optical cabling requires lasers that can kill.
  8. I found the opposite of your findings. I found that my computer ran much more smoothly on Win 7 than XP. Perhaps because it's an older computer the drivers aren't as well supported? It might fall into that middle ground where it's too new for Microsoft to include it with the OS and too old for the OEM to get any $ from writing decent drivers.
  9. 99% of car accidents could be avoided if Humans were aquatic animals.
  10. You've got this entirely backwards. What makes the people play there is the zone. Changing things in the zone will change the group of players, but the reverse is not true and has never happened (as far as I know).
  11. Google says it can be done with iptables, which is installed on most Linux distributions. EDIT: you know that the old server has to run the redirect program, right?
  12. Redirect from the old server until that time.
  13. You have to make middle-of-the-road items significantly worse than the average of some specialized items, or you don't force the player to make hard decisions about their ship layout. Hard decisions are what makes the game fun.
  14. Lol @ Audry voting. I always wash my hands in a public restroom, since God only knows what's on the surfaces I've had to touch. At home I'm a lot more casual about it.
  15. I noticed you didn't vote.
  16. Which is different from bots, how?
  17. Evil mad scientist stuff, mostly. A bit of minor world domination on the side.
  18. Both the comment and the quote were meant as a joke. They were just too good to pass up. Yes, as far as I know there's no security risk for asss beyond that posed by bots.
  19. Makes sense, since there's no risk of this:
  20. Epic bump?
  21. Dr Brain

    Conquest

    I've always wanted to make each sector an arena (with shared chat and teams, of course), but never got around to programming it. There were other fun things along those lines, like dropping troops onto planets, with the space and planet battles having different "ships".
  22. Dr Brain

    Conquest

    I've worked on this a bit today, and corey's started a map for it. Here's the beginnings of a module. #include "asss.h" //modules local Imodman *mm; local Ichat *chat; local Icmdman *cmdman; local Iplayerdata *pd; local Imapdata *mapdata; local Igame *game; #define CP_CHECK_INTERVAL 100 typedef struct ControlPoint { Region control_region; Region spawn_region; int ownership_level; // from 0 to max_ownership TeamData current_team; TeamData initial_team; } ControlPoint; typedef struct TeamData { int freq; int current_tickets; int control_points; } TeamData; typedef struct adata { int team_count; TeamData *team_data; int control_point_count; ControlPoint *control_points; ticks_t last_check; ticks_t current_game_ticks; // counts down to 0 from initial_game_ticks ticks_t initial_game_ticks; int max_ownership; int ownership_change_per_update; int max_ownership_change; int running; int init_ok; } adata; typedef struct pdata { ControlPoint *spawn; // place where they'd like to spawn } pdata; local int adkey; local int pdkey; local pthread_mutex_t conquest_mutex = PTHREAD_MUTEX_INITIALIZER; #define LOCK() pthread_mutex_lock(&conquest_mutex) #define UNLOCK() pthread_mutex_unlock(&conquest_mutex) local void start_game(Arena *arena) { int i; adata *ad = P_ARENA_DATA(arena, adkey); LOCK(); if (ad->init_ok) { ad->running = TRUE; ad->current_game_ticks = ad->initial_game_ticks; ad->last_check = ad->current_game_ticks; // init the teams for (i = 0; i < ad->team_count; i++) { TeamData *td = &ad->team_data[i]; td->current_tickets = td->initial_tickets; td->control_points = 0; } // init the control points for (i = 0; i < ad->control_point_count; i++) { ControlPoint *cp = &ad->control_points[i]; cp->current_team = initial_team; if (cp->current_team) { cp->ownership_level = ad->max_ownership; } else { cp->ownership_level = 0; } } } UNLOCK(); } local void end_game(Arena *arena) { // TODO } local void update_control_point(Arena *arena, ControlPoint *cp, TeamData *td, int player_count) { adata *ad = P_ARENA_DATA(arena, adkey); int ownership_delta = ad->ownership_change_per_update * player_count; if (ownership_delta > ad->max_owership_change) { ownership_delta = ad->max_owership_change; } if (cp->current_team) { if (cp->current_team == td) { // friendly team, already owned: just increase the counter cp->ownership_level += ownership_delta; if (cp->ownership_level < max_ownership) { cp->ownership_level = max_ownership; } } else { // enemy team cp->ownership_level -= ownership_delta; if (cp->ownership_level <= 0) { } } } } local void penalize_team(Arena *arena, TeamData *td, int max_control_points) { int delta = max_control_points - td->control_points; td->current_tickets -= delta; } local void check_control_points(Arena *arena) { int i; adata *ad = P_ARENA_DATA(arena, adkey); LinkedList control_point_players; Player *p; Link *link; int max_points; int should_end_game; LLInit(&control_point_players); pd->Lock(); LOCK(); if (ad->running) { for (i = 0; i < ad->team_count; i++) { // clear the control point count for each team ad->team_data[i].control_points = 0; } for (i = 0; i < ad->control_point_count; i++) { int player_count; TeamData *td; ControlPoint *cp = &ad->control_points[i]; // find players inside the control point's region // TODO: lock FOR_EACH_PLAYER_IN_ARENA(p, arena) { if (mapdata->Contains(cp->control_region, p->position.x >> 4, p->position.y >> 4)) { LLAdd(&control_point_players, p); } } // TODO: unlock td = NULL; player_count = 0; FOR_EACH(&control_point_players, p, link) { int j; TeamData *player_team_data; // find the player's team data for (j = 0; j < ad->team_count; j++) { if (ad->team_data[j].freq == p->p_freq) { player_team_data = &ad->team_data[j]; break; } } if (player_team_data) { if (!td) { // first valid team data td = player_team_data } else if (td != player_team_data) { // control point is in conflict td = NULL; break; } player_count++; } } if (td) { update_control_point(arena, cp, td, player_count); } // if the control point is assigned to a team, record it in the td if (cp->current_team) { cp->current_team->control_points++; } LLEmpty(&control_point_players); } // find maximum control points max_points = 0; for (i = 0; i < ad->team_count; i++) { if (arena->team_data[i].control_points > max_points) { max_points = arena->team_data[i].control_points; } } should_end_game = FALSE; for (i = 0; i < ad->team_count; i++) { if (arena->team_data[i].control_points < max_points) { penalize_team(arena, &arena->team_data[i], max_points); if (arena->team_data[i].current_tickets <= 0) { should_end_game = TRUE; } } } if (should_end_game) { end_game(arena); } } UNLOCK(); pd->Unlock(); } local void check_game_timer(Arena *arena) { ad->current_game_ticks -= CP_CHECK_INTERVAL; if (ad->current_game_ticks <= 0) { ad->current_game_ticks = 0; end_game(arena); } } local int check_control_points_timer(void *clos) { Arena *arena = (Arena*)clos; check_control_points(arena); check_game_timer(arena); return TRUE; } local void init_arena(Arena *arena) { adata *ad = P_ARENA_DATA(arena, adkey); LOCK(); LLInit(&ad->control_points); LLInit(&ad->team_data); ad->running = FALSE; ad->init_ok = TRUE; // TODO: take care of player data UNLOCK(); } local void free_arena(Arena *arena) { adata *ad = P_ARENA_DATA(arena, adkey); LOCK(); LLEnum(&ad->control_points, afree); LLEmpty(&ad->control_points); LLEnum(&ad->team_data, afree); LLEmpty(&ad->team_data); // TODO: take care of player data UNLOCK(); } local void load_config(Arena *arena) { char buf[256]; adata *ad = P_ARENA_DATA(arena, adkey); int i; const char *region_name; LOCK(); ad->init_ok = TRUE; // this may be recinded later /* cfghelp: Conquest:GameTime, arena, int, def: 270000, mod: hs_conquest * Game duration in ticks. */ ad->initial_game_ticks = cfg->GetInt(arena->cfg, "Conquest", "GameTime", 270000); /* cfghelp: Conquest:MaxOwnership, arena, int, def: 100, mod: hs_conquest * Determines the scale for ownership on * control points. */ ad->max_ownership = cfg->GetInt(arena->cfg, "Conquest", "MaxOwership", 100); /* cfghelp: Conquest:OwershipDelta, arena, int, def: 1, mod: hs_conquest * Determines how much ownership changes * per update interval. */ ad->ownership_change_per_update = cfg->GetInt(arena->cfg, "Conquest", "OwnershipDelta", 1); /* cfghelp: Conquest:TeamCount, arena, int, def: 2, mod: hs_conquest * How many frequencies play in conquest. */ ad->team_count = cfg->GetInt(arena->cfg, "Conquest", "TeamCount", 2); if (ad->team_count < 2) { ad->init_ok = FALSE; lm->LogA(L_ERROR, "hs_conquest", arena, "bad control point count %d", ad->control_point_count); } ad->team_data = amalloc(sizeof(TeamData)*ad->team_count); for (i = 0; i < ad->team_count; i++) { sprintf(buf, "Team%dFreq", i); ad->team_data[i].freq = cfg->GetInt(arena->cfg, "Conquest", buf, i); } /* cfghelp: Conquest:ControlPointCount, arena, int, def: 0, mod: hs_conquest * How many frequencies play in conquest. */ ad->control_point_count = cfg->GetInt(arena->cfg, "Conquest", "ControlPointCount", 0); if (ad->control_point_count < 1) { ad->init_ok = FALSE; lm->LogA(L_ERROR, "hs_conquest", arena, "bad control point count %d", ad->control_point_count); } ad->control_points = amalloc(sizeof(ControlPoint)*ad->control_point_count); for (i = 0; i < ad->control_point_count; i++) { int initial_team; ControlPoint *cp = &ad->control_points[i]; sprintf(buf, "CP%dControlRegion", i); region_name = cfg->GetStr(arena->cfg, "Conquest", buf); if (!region_name) { // try a default sprintf(buf, "cp%d", i); region_name = buf; } cp->control_region = mapdata->FindRegionByName(arena, region_name); if (!cp->control_region) { ad->init_ok = FALSE; lm->LogA(L_ERROR, "hs_conquest", arena, "could not find control region %s", region_name); } sprintf(buf, "CP%dSpawnRegion", i); region_name = cfg->GetStr(arena->cfg, "Conquest", buf); if (!region_name) { // try a default sprintf(buf, "cp%dspawn", i); region_name = buf; } cp->spawn_region = mapdata->FindRegionByName(arena, region_name); if (!cp->spawn_region) { ad->init_ok = FALSE; lm->LogA(L_ERROR, "hs_conquest", arena, "could not find spawn region %s", region_name); } sprintf(buf, "CP%dInitTeam", i); initial_team = cfg->GetInt(arena->cfg, "Conquest", buf, -1); if (initial_team > 0) { if (initial_team < ad->team_count) { cp->initial_team = &ad->team_data[initial_team]; } else { ad->init_ok = FALSE; lm->LogA(L_ERROR, "hs_conquest", arena, "bad team %d", initial_team); } } } UNLOCK(); } EXPORT const char info_hs_conquest[] = "v1.0 Dr Brain <drbrain@gmail.com>"; EXPORT int MM_hs_conquest(int action, Imodman *_mm, Arena *arena) { if (action == MM_LOAD) { mm = _mm; lm = mm->GetInterface(I_LOGMAN, ALLARENAS); mapdata = mm->GetInterface(I_MAPDATA, ALLARENAS); chat = mm->GetInterface(I_CHAT, ALLARENAS); aman = mm->GetInterface(I_ARENAMAN, ALLARENAS); game = mm->GetInterface(I_GAME, ALLARENAS); cmdman = mm->GetInterface(I_CMDMAN, ALLARENAS); cfg = mm->GetInterface(I_CONFIG, ALLARENAS); ml = mm->GetInterface(I_MAINLOOP, ALLARENAS); pd = mm->GetInterface(I_PLAYERDATA, ALLARENAS); obj = mm->GetInterface(I_OBJECTS, ALLARENAS); if (!lm || !mapdata || !chat || !aman || !game || !cmdman || !cfg || !ml || !pd || !obj) return MM_FAIL; adkey = aman->AllocateArenaData(sizeof(adata)); if (adkey == -1) return MM_FAIL; pdkey = pd->AllocatePlayerData(sizeof(pdata)); if (pdkey == -1) return MM_FAIL; return MM_OK; } else if (action == MM_UNLOAD) { aman->FreeArenaData(adkey); pd->FreePlayerData(pdkey); mm->ReleaseInterface(lm); mm->ReleaseInterface(mapdata); mm->ReleaseInterface(chat); mm->ReleaseInterface(aman); mm->ReleaseInterface(game); mm->ReleaseInterface(cmdman); mm->ReleaseInterface(cfg); mm->ReleaseInterface(ml); mm->ReleaseInterface(pd); mm->ReleaseInterface(obj); return MM_OK; } else if (action == MM_ATTACH) { init_arena(arena); load_config(arena); // TODO: add playeraction for init players // todo add spawn ml->SetTimer(check_control_points_timer, CP_CHECK_INTERVAL, CP_CHECK_INTERVAL, arena, arena); mm->RegCallback(CB_KILL, kill_callback, arena); return MM_OK; } else if (action == MM_DETACH) { ml->ClearTimer(check_control_points_timer, arena); mm->UnregCallback(CB_KILL, kill_callback, arena); // TODO: unreg playeraction and spawn free_arena(arena); return MM_OK; } return MM_FAIL; }
  23. Dr Brain

    Conquest

    Say what? I started work on hyperspace conquest about 6 months ago. Conquest is the gameplay element you see in games like Battlefield 1942 and Star Wars Battlefront. I've not personally seen this in SS, but wouldn't be surprised if other zones have done it in subarenas. What is conquest? There are two teams fighting for control of various command points scattered around the map. Games I've played typically have between 4 and 8 control points on the map. The control points can be owned by either team, or unowned. Each team starts with a single control point. Players spawn at any of their team's owned control points. A control point has a ownership level ranging from 0 to 100, with 0 being unowned and 100 being fully owned. A point's ownership rating is changed by a player or players standing within a certain radius of the control point with no enemies around. A player standing near an enemy control point will slowly change it to unowned, and then slowly change it from unowned to fully owned. This process takes between 10 and 30 seconds. Each team starts with a # of respawn tickets (between 200 and 1000, depending on the size of teams and desired game length). Each respawn of a player uses one of the team's ticket. Additionally, the team that controls fewer control points will lose tickets over time, proportional to how much they're behind. If a team's tickets drop to zero, they lose. There's also usually a time limit on the game (e.g. 30 minutes), and if it's exceeded the team with more tickets wins. Sounds good. What's next? I need someone to design me a conquest map. Here's the overall shape I want: The #s are jump gates that correspond to each other. The Red Os are control points. A lot of liberty can be taken with this, but the idea of separate sectors should be maintained. I also need LVZ images for control points (owned, enemy, & unowned), the ownership level indicators to display to nearby players (some sort of scale, including enemy, unowned and owned). Then what? An open beta, and if it goes well, the main arena will be replaced with conquest. This implies the removal of centering.
  24. Updating graphics for the sake of updating them is a waste of time. The original graphics are very good, and the extra download is a pain. Of course, if the update improves game play (explosion graphics do not fall into this category), then it's totally worth it.
  25. Dr Brain

    New Content

    Which patterns did you have in mind? Also, there's no reason I have to make a database. Someone can set it up from that SQL file I uploaded somewhere. Perhaps someone can dig up the link.
×
×
  • Create New...