Author Topic: Outpost 2 Coding 202: Part 0  (Read 4587 times)

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3170
Outpost 2 Coding 202: Part 0
« on: March 24, 2011, 07:44:09 AM »
Alright, I guess I should finally get around to doing this.  So, unlike the first set of tutorials, where I just wrote them in advance and said "now you try" we're going to try and work on a project as a group and get it to a state that could reasonably be described as "done" or at least "done enough".

...So, what do people want to work on?  It should be something useful, new, and reasonably challenging to work on.  For example, a new campaign would be cool, and it would require some fairly intelligent AI, but the AI may end up being the only challenging part, with the rest being fairly tedious mapping and unit placement.  On the other end of the spectrum, an AI that could take the place of a human opponent would be an amazing achievement, but do we really think we could get that done?

Anyways, anyone who is interested should say something along the lines of "I'm in" and also post a project suggestion.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Lord Of Pain

  • Sr. Member
  • ****
  • Posts: 275
Outpost 2 Coding 202: Part 0
« Reply #1 on: March 24, 2011, 08:26:03 AM »
If It's somthing hard your looking for, I can brainstorm plenty of chalanging things.


I was thinking of making a campaign for outcasters. We would also need an experianced hacker in order to implant the oucaster symbol into the side screen under the minimap panel buttons. I have an image rough draft. It Litterally looks like a yellow letter 'Q' .. Now as for how Eddy B got this done I don't really know, and yes i would like a new loading screen. If this sounds too dificult for us, we could just leave it to the original op2 game client.

Is that challenging enough?

Also, I was thinking of making a new tileset (i actually have some started) I call it ICEwell pallete (not related to Iceworld or green world). Although at first i wasn't sure if Iceworld was ready enough to be playable on, so i went ahead and started moding the original tileset in op2. I used the program 'GIMP' to tint the color of the already existing tileset.. This was however not very effective enough to be considered anywhere close to eye candy. But i also have some original tiles (not many but some) which can be used.

What we could also do is alter the looks of a few structures to look like its an original colony (race) on op2. If we do this however, we would have no choice but to make a seporate game client liek eddy-b did for renegades so it does not mess up existing plymouth units in the game.

I already have an agridome im working on, it's way more than half done. The only way it's veiwable in game is as a tileset (no function) other than that it's pretty close to finished.

Also i was thinking of a metalic terrain (which i have made) though never released. Im still working on it.

Here is a list of objective tiles we could use in the metal tileset:

-Metalic concrete surface - (Tile/Fast/made by robodozer) Will have the same affect on moving units as bulldozed terrain, just instead it's metalic pavement.

-Cargo crates - (Tile/Prop/impassible) For Scenery and evidence that colonist are unpacking or packing to evacuate. Should appear closed and full with no indication of contents.

-Metal Canister - (Tile/Prop/Impassible) It would also be scenery, perhaps holds water thawded away from the ice on the moon which the story takes place. It should appear ful lof water if made possible.

-A new ore smelter, with three pipes going into the ground.

***Have to cut off here, next class, I will be back to edit more content shortly***

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3170
Outpost 2 Coding 202: Part 0
« Reply #2 on: March 24, 2011, 08:47:26 AM »
We're not going to work on your own personal project for you.
Also, this is Outpost 2 Coding, not graphics hacking.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Spikerocks101

  • Hero Member
  • *****
  • Posts: 714
Outpost 2 Coding 202: Part 0
« Reply #3 on: March 24, 2011, 10:11:46 AM »
I will love to learn some new stuff, but as for any ideas, I'm blank. In lines with a new campaign, how about a Multiplayer-Campaign (like Survivor, but a series of levels... for the hell of it). I always hated Survivor, but it clearly seems to be the most popular for casual players.
I AM YOUR PET ROCK!!!!!!

Offline Lord Of Pain

  • Sr. Member
  • ****
  • Posts: 275
Outpost 2 Coding 202: Part 0
« Reply #4 on: March 24, 2011, 10:13:04 AM »
Quote
It should be something useful, new, and reasonably challenging to work on.
Sorry about that, i thought you meant it could be anything which included what you said.

Although it was under those guide lines.

So what is aloud to be suggested in coding 202?

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3170
Outpost 2 Coding 202: Part 0
« Reply #5 on: March 24, 2011, 11:27:58 AM »
You can suggest whatever you want.  Doesn't mean I have to run with it.

I'd recommend that any suggestions should require a fair amount of coding.  Campaigns, mods/add-ons, etc.  I think hacking the EXE would be a bit too much at this point, but if that's what people want, okay.

I won't accept suggestions that rely too heavily on mapping, art, etc, since that's not really the point.  That doesn't mean we can't make new maps for whatever we end up making, of course...

Also: Great idea, Spike.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline TH300

  • Hero Member
  • *****
  • Posts: 1425
    • http://op3game.net
Outpost 2 Coding 202: Part 0
« Reply #6 on: March 27, 2011, 06:10:30 AM »
I'd love to make a general ai. Thats the thing that I'm currently most interested in. A campaign would also be interesting (be it singleplayer or multi), but I have the feeling that it would mean more work than a general ai and give us less. A general ai can make every existing map more enjoyable. A campaign is just 12 missions (if it comes to that) which are enjoyable. For the ai, we could build on those initial thoughts.

Moreover, I am more an algorithm developer. I don't have as much fun when doing a special ai. So, if we make a campaign, I may end up making the maps.

I'm seeing some suggestions here, that require hacking of the exe. Although that can be done, you never know if you can hack it enough to make your idea work. But that information is needed before I'll contribute anything.
« Last Edit: March 27, 2011, 06:13:26 AM by TH300 »

Offline Spikerocks101

  • Hero Member
  • *****
  • Posts: 714
Outpost 2 Coding 202: Part 0
« Reply #7 on: March 27, 2011, 06:34:20 AM »
Well, Bomber, since you suggested this idea of a project, you can very well choose. It seems unlikely that more ideas will come, so I wouldn't wait to much longer to start getting things organized for any of these ideas.
I AM YOUR PET ROCK!!!!!!

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3170
Outpost 2 Coding 202: Part 0
« Reply #8 on: March 27, 2011, 07:25:48 AM »
It's only been a few days, let's see if anything else turns up.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline CK9

  • Administrator
  • Hero Member
  • *****
  • Posts: 6257
    • http://www.outpost2.net/~ck9
Outpost 2 Coding 202: Part 0
« Reply #9 on: March 27, 2011, 10:19:35 AM »
AI is the main thing people have been wanting forever.  Everyone's talked about how nice it would be, but nothing's been done towards it.  So, let's go all in and work on an ai.
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

Offline jcj94

  • Sr. Member
  • ****
  • Posts: 407
    • http://techfusion-279.com
Outpost 2 Coding 202: Part 0
« Reply #10 on: March 27, 2011, 07:28:05 PM »
I'd love to help.  I've done only a few missions, and I'm working on sketching a couple of map idea out for a couple of 2 team multiplayer games.  If you guys can come up with something idea for me for maps, I'd help sketch a basic layout.

So I guess its time to say... All in favor say Aye!

Aye!

And, as for my idea:

    Maybe some new unit types.  Maybe a third colony.  (hint)

    I have never made a new unit type, and would like to learn how, if there is a way to do that.
« Last Edit: March 27, 2011, 07:30:41 PM by jcj94 »

Offline TH300

  • Hero Member
  • *****
  • Posts: 1425
    • http://op3game.net
Outpost 2 Coding 202: Part 0
« Reply #11 on: March 28, 2011, 03:22:28 AM »
Quote
I have never made a new unit type, and would like to learn how, if there is a way to do that.
No one has ever made a new unit type (unless you count the double turret gp as one, but that is taking only existing stuff and combining it new). Hence no one knows how to make new units. It may even be impossible or require recoding of half of the game.

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3170
Outpost 2 Coding 202: Part 0
« Reply #12 on: March 28, 2011, 05:12:42 AM »
BB did it once, just as a proof of concept.  I don't think it's really all that feasible though.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 3857
Outpost 2 Coding 202: Part 0
« Reply #13 on: March 28, 2011, 09:30:04 PM »
There is enough reliance on virtual functions that I believe you could implement a unit with completely new behavior without massive reprogramming. It would still be a lot of work though.

There is also the question of actually creating the new unit in game. Starting a level with pre-created custom units might be easier than allowing them to be built in game. Many checks are done based on ranges of unit type id values corresponding to generic things like vehicles or buildings or weapons. If you wanted to add a new unit without replacing an old one, you might run into difficulty due to the static sizing. You could perhaps fake it by reusing the same id for a new unit, but then that creates ambiguity if you want to produce the unit at a factory.

A possible solution might be to build it using a new id, but then switch the id after creating to match something in the appropriate range.


I do remember BlackBox did something interesting, and I think it might have involved some trickery with unit type ids, but I could be mistaken. It's been a while and I don't think I ever really knew that many details to begin with.
 
« Last Edit: March 28, 2011, 09:34:04 PM by Hooman »

Offline Spikerocks101

  • Hero Member
  • *****
  • Posts: 714
Outpost 2 Coding 202: Part 0
« Reply #14 on: March 28, 2011, 09:34:54 PM »
Thou, just saying, I know nothing about how to go about adding a unit to the game, so I would be little to no help in that aspect. Also, what would we add? I think the game needs more sheet vol editing, adjusting values of things, then new units. To be honest, I don't even use all the units in the game properly, and am not really for having even more units. Thou, if possibilities are possible, adding a feature to the game would be nice. Like, for example, a way to trade techs with each other, or even a bug fix on that blasted Sticky Foam tech (which, btw, should be, for now, taken out of the game due to uselessness).
I AM YOUR PET ROCK!!!!!!

Offline TH300

  • Hero Member
  • *****
  • Posts: 1425
    • http://op3game.net
Outpost 2 Coding 202: Part 0
« Reply #15 on: March 28, 2011, 09:58:38 PM »
Quote
Thou, just saying, I know nothing about how to go about adding a unit to the game, so I would be little to no help in that aspect.
I guess, thats more or less true for most of us and probably all people who are going to participate. The people who know how to do it, didn't offer their help and if they don't change their mind, we simply cannot do it.

Offline jcj94

  • Sr. Member
  • ****
  • Posts: 407
    • http://techfusion-279.com
Outpost 2 Coding 202: Part 0
« Reply #16 on: March 29, 2011, 06:50:11 AM »
That isn't a good thing.

And Spike, what stickyfoam glitch?  They seem perfectly fine to me.

I'll have to go and look at some ancient threads about the things you guys mentioned.  I want to see if there is a way to do something like building off the Double GP.

 

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3170
Outpost 2 Coding 202: Part 0
« Reply #17 on: March 29, 2011, 06:59:24 AM »
It's probably gonna be that multiplayer co-op campaign or the AI thing.  People should choose which they'd rather do and then we'll start by the end of this week (if all goes well).
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Lord Of Pain

  • Sr. Member
  • ****
  • Posts: 275
Outpost 2 Coding 202: Part 0
« Reply #18 on: March 29, 2011, 10:28:34 AM »
well easiest (and obvious) way of putting it is to make a poll to decide what we want... i will make just that.

EDIT: sorry spike, i was too fast, it already made.
« Last Edit: March 29, 2011, 10:37:54 AM by Lord Of Pain »

Offline Spikerocks101

  • Hero Member
  • *****
  • Posts: 714
Outpost 2 Coding 202: Part 0
« Reply #19 on: March 29, 2011, 10:30:02 AM »
Err, we dont need a poll, since its more of "whose going to help gets to choice" kinda thing. The general public really doesn't get any say in this, imo.
I AM YOUR PET ROCK!!!!!!

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3170
Outpost 2 Coding 202: Part 0
« Reply #20 on: March 31, 2011, 09:46:51 PM »
Alright, everyone is willing and able to work on this, post below.  Include your current (estimated) skill level, noteworthy stuff you've produced/worked on/whatever, estimated time you can devote to this project, pace you'd like to work at, and whether you'd rather work on the AI or the campaign.

Example:

Tankn0[size=0] [/size]0b
SKIL LEFIL: BLARY[size=0] [/size]EUGH
AKOMPLSIHMINTZ: KONKIRD TE[size=0] [/size]H ME[size=0] [/size]S HA[size=0] [/size]L
AFAYLIBEL: WIN NOT MAYKN SOLGRS GETT ON DER NEES.  ALZO, MOZT OF JUUN ND JOOL I
DZIRD PAYZ: 1 NU TOPIK EFREE WEKK
WUUD RATHR WERK ON: U[size=0] [/size]R DU T HAZ ALWAZ BEN 2 DY SOL[size=0] [/size]GR
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Spikerocks101

  • Hero Member
  • *****
  • Posts: 714
Outpost 2 Coding 202: Part 0
« Reply #21 on: March 31, 2011, 11:20:15 PM »
Yeah... thats why Tank should stay in the mess hall >_>

anyways
Skills: Decent at C++, know most of the STD lib, knows about AI making and game design (decent programmer, to say the least)
Accomplishments: Err, no real finished projects, but have made so demos of things
Time available: Alot. On the IRC nearly 24/7 :P
Time frame: Don't care. It's just a learning experience with me
Project: Don't care, but since I know we will get more support if we work on a general AI (TH300 and _A_ both seem to be willing to assist in such a thing), I'll go with that :P
I AM YOUR PET ROCK!!!!!!

Offline TH300

  • Hero Member
  • *****
  • Posts: 1425
    • http://op3game.net
Outpost 2 Coding 202: Part 0
« Reply #22 on: April 01, 2011, 01:57:14 AM »
Skill Level: pretty good C++, some education in computer science, including software engineering.
Stuff that I made: the screenshot utility (which is an op2 exe mod), the "Guards" map (basic multiplayer map). A few programs in C++ that I never released to the public.
Time that I'll have for this: Until ~August an estimated avarage of 4 hours per weak. From mid August on probably 2-3 hours per day.
Pace: slowly
Project: General AI
« Last Edit: April 03, 2011, 11:34:10 AM by TH300 »

Offline jcj94

  • Sr. Member
  • ****
  • Posts: 407
    • http://techfusion-279.com
Outpost 2 Coding 202: Part 0
« Reply #23 on: April 01, 2011, 10:10:37 AM »
Skills: Halfdecent/decent C++ and knowledge of techtree for weapons/ morale techs
Accomplishments:  La Corrida Tigers map, not entirely done, but useable enough.
Availability: Starting June 5: whenever I can get on a computer, so pretty much all dah time
Time Frame:  WHEN IT GETS DONE!
Project:  General AI

Offline BlackBox

  • Administrator
  • Hero Member
  • *****
  • Posts: 3103
Outpost 2 Coding 202: Part 0
« Reply #24 on: April 03, 2011, 01:43:28 AM »
I wouldn't be opposed to helping with a general purpose AI at some point. That being said there are other, loftier goals that would be kind of cool to see implemented (e.g. rewriting the game, though that's probably a bit out of the scope of a project like this).

As far as the unit hacking is concerned, since I know everyone has been interested in new units for a while, (the "proof of concept" Sirbomber mentioned) first off it did not create a new map_id, I just reused one that is completely unusable (0x4b, the "BFG" unit I believe). My unit was basically derived from the EMP missile with a different payload (it created an atheist building explosion instead of the EMP blast. Initially the project started out as an experiment in replacing vtable entries in the EMP missile and I then wondered about making another missile so both EMP missiles and my "nuclear missile" could be built, as opposed to modifying the behavior of the EMP missile).

The biggest hurdles were having to fully define a unit (i.e. figure out all the entries in the vtable as well as the struct size and fields), a large part was already figured out but obviously to make my own from scratch I had to write a lot of particularly uninteresting code (like some factory functions to create the unit given some information about its position on the map).

After this was done I was able to create the spaceport with the missile on its launch pad. However it still didn't work totally properly:

The main issues with creating units are, like Hooman said, there are all kinds of hardcoded checks for the map_id of a particular unit when deciding what to do. For my missile to work at least partially I recall having to patch at least 10 places, probably more, where there were checks for the type of object on the launch pad (for example whether it should be allowed to load cargo, whether it can launch without a cargo, whether to show the targeting cursor, etc).

So yes, making new units is possible but for them to actually be properly creatable and functional for players a whole bunch of other code has to be touched.