Outpost Universe Forums

Projects & Development => Outpost 2 Programming & Development => Topic started by: Hooman on September 04, 2007, 02:05:23 AM

Title: Dan's Dog
Post by: Hooman on September 04, 2007, 02:05:23 AM
It seems Dan's Dog really is in the game. When I first saw the graphics for it, I thought they were just something silly that ended up in the files, but never got into the game. I'd never seen it before after all. But when I read Mcshay's post about very rare sightings, I decided to go looking. It seems the game does actually create the howling dog under fairly rare circumstances. I'm attaching a test DLL below that will recreate those circumstances.


The dog will appear when a meteor impacts if all the following conditions hold:
1) the impact leaves a scorch mark
2) the impact occurs exactly at a multiple of 32768 game ticks (about 327 marks)
3) the tile at the point of impact belongs to the third terrain type (for the built in maps, this is the sand tiles, however it need not be, and can be adjusted in the map file. See the map specification for details on the "TerrainType")
4) the tile is not currently occupied by a unit

As an additional note, the routine that generates the dog belongs to the Unit class for the Meteor, and this processing function will only be called when (unitIndex XOR tick) MOD 8 != 0. Hence the time condition can only hold for meteors that have a unit index that is a multiple of 8.



I did a few mem hacks in the DLL to bump up the tick to just short of 32768, and then spawned a bunch of meteors, and played with some of their internal flags and timers so they appear immediately, rather than after the standard 10 mark delay. I'm impatient.  :D


Here's the code I used:

Code: [Select]
char MapName[]  	= "cm02.map";    // The .map file used for this level
char LevelDesc[]  = "Dan's Dog";    // Description appearing in the game list box
char TechtreeName[]  = "Multitek.txt";   // File to use for the tech tree
SDescBlock DescBlock = { Colony, 2, 12, false }; // Important level details


int InitProc()
{
// Center view over about where Dan's Dog appears
Player[0].CenterViewOn(35, 10);

// Bump up the game time
*(int*)(0x56EB1C) = 32768 - 76;

return 1; // return 1 if OK; 0 on failure
}

void AIProc()
{
static int i = 0;

if (i < 100)
{
  Unit meteor;
  TethysGame::CreateUnit(meteor, mapMeteor, LOCATION(35 + (i % 25), 4 + (i / 25) * 5), 6, (map_id)3, 0);
  int* meteorUnit = (int*)((*(int*)0x54F848) + meteor.unitID * 120);
  int* meteorUnitFlags = (int*)((char*)meteorUnit + 0x44);
  int* meteorUnitTimer = (int*)((char*)meteorUnit + 0x3C);
  *meteorUnitFlags |= 0xC000;
  *meteorUnitTimer = 5;
  i += 5;
}
}
Title: Dan's Dog
Post by: Leviathan on September 04, 2007, 03:00:28 AM
Nice work :)
Title: Dan's Dog
Post by: Sirbomber on September 04, 2007, 07:57:39 AM
It's real! It's real! Woot!
You're amazing Hooman!

Now work on SantaWalking!
Title: Dan's Dog
Post by: CK9 on September 04, 2007, 11:27:41 AM
Care to share your .dll file with us so we can see Dan's Dog?
Title: Dan's Dog
Post by: Brazilian Fan on September 04, 2007, 11:28:09 AM
Really amusing :P  
Title: Dan's Dog
Post by: Sl0vi on September 04, 2007, 11:34:41 AM
Nice discovery :D
Title: Dan's Dog
Post by: Sirbomber on September 04, 2007, 01:06:55 PM
Quote
Care to share your .dll file with us so we can see Dan's Dog?
Check the bottom of his post.
Title: Dan's Dog
Post by: Hooman on September 04, 2007, 01:17:20 PM
Lol, yes, the DLL file was attached. And I posted all the relevant code for anyone with a compiler and SDK too.


I still have yet to find any trace of Santa though.  <_<
 
Title: Dan's Dog
Post by: CK9 on September 04, 2007, 03:24:29 PM
lol, I somehow always miss the attachments outside of the file forum :P
Title: Dan's Dog
Post by: Mcshay on September 04, 2007, 04:15:11 PM
Awesome!

Now we know that Dan's Dog does indeed exist, and that *(int*)(0x56EB1C) is the tick counter! :P

(Assuming I ever need a way to reset the time, and that it will work, this should prove to be very useful)
Title: Dan's Dog
Post by: White Claw on September 04, 2007, 06:56:33 PM
Geeze Hooman, why don't you just re-write the source code for OP2?  :P  
Title: Dan's Dog
Post by: Hooman on September 05, 2007, 09:12:29 AM
Thought about it, but I don't think I really have the time or patience for such a large project. Especially not with school starting in a few days. I just use this game as an excuse for short doses of assembly.  :P

But yes, a remake would definately be a good idea. I think an Outpost 2 remake would be far better than a remake of Outpost 1, or an attempt at an Outpost 3. After all, Outpost 2 is the reason most people are here, and why the site has been around for so long.


I'm pretty sure that tick info has already been posted. If not explicitly, then in the OllyDbg file that gets posted/updated from time to time. There's probably well over 1000 named memory locations in that file now. (Some are data, some are functions). Heck, I think it was approaching 2000.
 
Title: Dan's Dog
Post by: Leviathan on September 05, 2007, 10:52:55 AM
Outpost 2 remake would rock :)
Title: Dan's Dog
Post by: White Claw on September 05, 2007, 06:53:44 PM
I think I might be able to manage an OP1 but, unfortunately I don't think I have the time/ability to undertake an OP2 remake. And the way people agree on and support eachother's creative work on this board makes me not want to suffer working as a group. In fact, what I just said will probably give someone cause to write a reply.  :P

In either case, when I get back to my comp I'm going to see if I can strong-arm windows into letting me make something that will display terrain. And who knows, if I can make it open ended enough, I might be able to add things like units. I already plan on making the tile support for the terrain a bit broader than OP1.

Heck, I'm still just an "Outpost Worker"  :lol: Baby steps...
Title: Dan's Dog
Post by: Freeza-CII on September 06, 2007, 03:00:41 PM
let me ask yall a question do we really need remakes of op2.  Some thing that seems to me to need the source for that to happen and its non exsistant. any way off topic

Good work as always hooman.
Title: Dan's Dog
Post by: Arklon on September 06, 2007, 03:05:03 PM
Quote
Some thing that seems to me to need the source for that to happen and its non exsistant.
Not having the source would be the reason for remaking it. If we had the source, we could just modify whatever the hell we please, rewriting it from scratch wouldn't be necessary. Hacking OP2 takes a damn long time, and I'm willing to bet that remaking OP2 would end up, in the long run, being more effective than hacking OP2 for every little thing we wanted to change.
Title: Dan's Dog
Post by: White Claw on September 06, 2007, 03:54:38 PM
Quote
Not having the source would be the reason for remaking it.
Agreed, but I think it would meet resistance anyway because people would think it's competing against Genesis.

Anyhow, definitely off topic. Back to Dan's Dog!
Title: Dan's Dog
Post by: dazjorz on June 15, 2009, 08:35:06 PM
/me whispers http://forum.outpostuniverse.net/index.php...t=0&#entry67713 (http://forum.outpostuniverse.net/index.php?showtopic=4523&st=0&#entry67713)  :rolleyes:  
Title: Dan's Dog
Post by: Kayedon on June 15, 2009, 08:59:26 PM
What the goatfruit dazjorz?
Title: Dan's Dog
Post by: dazjorz on June 20, 2009, 11:25:26 AM
Quote
What the goatfruit dazjorz?
I revived this ancient thread since it was talking about an OP2 remake :P
Title: Dan's Dog
Post by: Hidiot on June 20, 2009, 12:13:06 PM
/me points out that the topic of game remake was the of-topic of this topic. The topic of this topic was Dan's Dog.

Get that?
Title: Dan's Dog
Post by: Kayedon on June 20, 2009, 12:56:08 PM
Just because it's about an OP2 remake or MENTIONED IT in this case doesn't mean it deserves to be brought back from the grave. Topics, projects, and ideas die for a reason.
Title: Dan's Dog
Post by: Spikerocks101 on June 20, 2009, 09:30:14 PM
Don't we all want to bring things back form the dead (like op2 itself :P). Just wondering, do you have a picture of this (playing on the fact it has now been brought back form the dead)?
Title: Dan's Dog
Post by: Sirbomber on June 20, 2009, 10:58:18 PM
Download the test level at the bottom of the first post.

Now stop necro'ing things or else.
Title: Dan's Dog
Post by: jcj94 on March 16, 2011, 07:00:26 PM
Quote
Outpost 2 remake would rock :)
Agree X 1000^1gogol^1gogol

thats a LOT of zeros


Nice work Hooman.. Now if we can just figure out WHY they did that?
Title: Dan's Dog
Post by: TH300 on March 17, 2011, 02:05:16 AM
Quote
Quote
Outpost 2 remake would rock :)
Agree X 1000^1gogol^1gogol

thats a LOT of zeros


Nice work Hooman.. Now if we can just figure out WHY they did that?
You should read the entire topic before replying to it. Then you'd have read what Sirbomber wrote:
Quote
Now stop necro'ing things or else.

And if you really need to necro an old topic, you don't (don't, don't, don't) post such a pointless reply, which says nothing but the obvious. You post a relevant reply or nothing. (your reply isn't relevant, because everyone thinks that a remake would be great and everyone (but you) probably knows why dan's dog is there)

Before you complain: They did it, because they wanted to add something funny. Its an easter egg.
Title: Dan's Dog
Post by: evecolonycamander on March 17, 2011, 02:29:19 AM
i've been thinking, dan's dog appears at a multiple of 32768, right? for some reason, i get that this is a date.
3/27/68. March 27, 1968 (what made me key this together was the 68. a year someone was born on most likely.)
so that got me to think even more... what if this means that Santa appears on a similar tic. something that relates to Christmas? I've heard it mentioned that Santa shows up when your computer clock shows it is Christmas(eve or day, cant remember.) mabie somebody can test this as if you where inputting dates related to the holiday....
my best guess is something like tick:
1224
1225
1224XX
1225XX
but the test must be done wile your computer date says it is Christmas eve or day(cant remember which
hope that made since.
Title: Dan's Dog
Post by: Zardox Xheonov on March 17, 2011, 08:01:22 AM
that sounds interesting, though i have a copy of the dan's dog animation, its a dull easter egg in my opinion.

i think flashy gave it to me, its in a colony game file he (or who ever) gave me just for kicks.
Title: Dan's Dog
Post by: TH300 on March 17, 2011, 04:30:29 PM
32768 is decimal for the binary number 1000000000000000. Its unlikely that this coincides with a special date.
Title: Dan's Dog
Post by: evecolonycamander on March 17, 2011, 04:36:44 PM
unlikely, but a possibility. i think some research is in order
Title: Dan's Dog
Post by: jcj94 on March 21, 2011, 12:55:22 PM
@ TH300, that is more what I meant, not that It's an easter egg.

@ ECC, well I dont know, go online and find the Haxial Calculator and plug in the number.. it can go from Radix 2 (binary) to radix 36 (0-9 + A-Z)...
I'm just trying a few things out.