This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
billysback's profile picture

[GAME] Shipper - Become a space pionere! [v1.2]

Started by billysback, 11 November 2012 - 08:42 PM
billysback #1
Posted 11 November 2012 - 09:42 PM
Shipper

IMPORTANT NOTE:
requires my "Art API", found here:
http://www.computerc...paintutils-v11/

Details:
You have bought your space cruiser and set out on the beginning of your journey, but lately pirates have been prowling around… Even being in the space ports around the area is tough, and as you grow so do the pirates.
You must destroy and loot pirate ships to get money and crew-members in order to upgrade your ship and better defend yourself.

When you start use the left/right arrow keys to choose your ship model, enter to buy.
(will be adding more ship models)

Fighting:
Z repairs your ship; giving you armor boosts
X charges your guns; giving you a damage boost
SPACE fires your gun
BACKSPACE flees the fight

Controls:
Q to enter the shop if you are in a space port, left/right to scroll between shop options, enter to buy that option, q again to quit
M to open map, left/write/up/down to move your cursor, m to quit, enter to travel to that location
S to start saving, type in your dir, enter to save (enter blank to quit)
L to start loading, type in your dir, enter to load
P to toggle pause
LEFT CNTRL to quit

Stats guide:
SpoilerCrew: this increases the speed at which you repair/charge, max is always 99.
SPD: increases how fast you travel and how well you flee
WEP_SPD: decreases the time between shots
ACC: decreases how likely you are to miss, anything over 100 means you always hit as long as they don't dodge it
EVS: increases how likely your opponent is to miss
ARM: takes a percentage off of incoming damage
DMG: increases the range at which the amount of damage you deal falls between
HP: upgrading health increases the maximum health of your ship.

NOTE: ACC and EVS are capped at 90 so to make the game possible to lose, even with ridiculous amounts of money

Price guide:
SpoilerCrew: 300
SPD: 225
WEP_SPD: 300
ACC: 375
EVS: 375
ARM: 175
DMG: 200
HP: 175

Repair 1 : 1
Repair all: however much it takes to get to max health

Note: prices are not fixed, may change depending on if me or anyone else thinks that there is a balancing issue.

Screenies:
Spoiler


Download:
Spoilerhttp://pastebin.com/Z2evQJXy

Changelog:
Spoilerv1.0: initial release
v1.1: added two more ships, fixed ship selection phase.
v1.2: fixed shop, fixed progression (and made it better), fixed loot so that you don't get insane amounts of money.
v1.3: added enemy ships starting with decreased health, added easter-egg.
Please post any thoughts, as well as any balancing issues, bugs or improvements you find.

Thanks :unsure:/>/>


Making ship blueprints:
SpoilerI decided that I may as well explain how ship building works, so that people can send me suggestions of new blueprints or add them in themselves.

In notepad++ create a new page, now, just draw your ship in this page.
Spoilerexample:

   _
_/^_
|_|/
   V

Now make sure that each line has the correct amount of spaces either side, usually make these even (each line must be the same length at this point)

Now place speech marks at the beginning of every line and commas after every speech mark other than the last one.
Then create brackets to surround the whole thing at the beginning of the blueprint and end.
Spoiler

{"	_   ",
" _/^_ ",
" |_|/ ",
"	V   "}

Now any numbers in blueprints will be ignored, and instead set the current color for drawing the following character, so to set a character to red and then put it back to white like normal do: 2#1 where # is the character.

So add color to your blueprint, 1 is white, 2 is red, 3 is green and 4 is orange.
Spoiler

{"  _   ",
" 2_1/3^12_1 ",
" |4_1|/ ",
"   2V1   "}

Now, in notepad++, go the button in the tool bar where it shows an a and a b (replace), do find replace with
Spoiler

{"  _   ",
" 2_1/3^12_1 ",
" |4_1|/ ",
"   2V1   "}

Now on the line before this place blup =
Spoiler

blup =
{"  _   ",
" 2_1/3^12_1 ",
" |4_1|/ ",
"   2V1   "}

This is the blueprint you must give me.

Now, if you would be so kind, also include the stats of the ship (look at the "stats guide") and point to me where the weapons are on the ship.
TheOutcast5 #2
Posted 11 November 2012 - 09:54 PM
Is this inspired by FTL Faster Than Light?
billysback #3
Posted 11 November 2012 - 09:58 PM
A little bit :unsure:/>/>
I don't actually have the game, but have scene game play of it…
billysback #4
Posted 11 November 2012 - 11:30 PM
Update - added two more ships
fixed ship selection phase.

(update again, look at changelog;
enemy ship stats are affected by your progression now.)
BigSHinyToys #5
Posted 12 November 2012 - 12:23 AM
I am getting an error in this section of code ?

    local pixarr = art.createPixelArray(pixels)
    return pixarr
end
            ["armour"] = 35, -- error here
		    ["damage"] = {90, 110},
		    ["wepspeed"] = 4,
		    ["speed"] = 15,
		    ["accuracy"] = 70,
		    ["evasivness"] = 10,
		    ["health"] = 600,
		    ["maxhealth"] = 600,
		    ["type"] = type
local function improveStats(csts)
    local sts = csts
    local amt = ((progress-5) * 2)
    if amt > 0 then
	    amt = amt + math.random(progress)
unexpected symbol my guess is that is meant to be in a table ??
billysback #6
Posted 12 November 2012 - 12:24 AM
oh woops, that was put there in reference to create the ship upgrades, will delete XD

EDIT
Updated, redownload now and it will work.
BigSHinyToys #7
Posted 12 November 2012 - 12:53 AM
cool game I haven't quite worked out some of the controls / strategy yet.
one thing I would say is that the players ship takes damage from many battles but all other ships start battles with perfect health maybe they should have have previous damage from other battles ?
billysback #8
Posted 12 November 2012 - 01:31 AM
good suggestion, I'll try basing it off the loot of the ship; presuming that a ship with better loot (more crew/money) will be more well traveled so it should be more likely to have been in a fight where it would have been injured.
Leo Verto #9
Posted 12 November 2012 - 05:49 AM
Game works pretty nice so far, only disadvantages are that I can't really find any space staions and die really fast (noob) and your code seems to be really messed up, you should put a few basic var definitions at the top, all functions with a short comment explaining what they do below and then the actual code.
billysback #10
Posted 12 November 2012 - 05:56 AM
Space stations are the "@" symbols on the map, just fly to one close by and you should be there reasonably quickly.

I'll try commenting the code a bit more :unsure:/>/>
billysback #11
Posted 12 November 2012 - 07:16 AM
Update;
added a little easter egg (data mine and you will find it basically immediately), not telling you how to get to it. (It's pretty)
added enemy ships starting with decreased health
maybe a bug fix? maybe…
Cruor #12
Posted 12 November 2012 - 06:47 PM
This looks promising :)/>/> imma try it! :P/>/>
TheVarmari #13
Posted 13 November 2012 - 05:37 AM
Oh wow. Nice job.
Tron #14
Posted 13 November 2012 - 02:38 PM
Everytime I try to play it, I get a : shipper:396: attempt to index ? (a nil value) error
I Did install the art api, I think
anonimo182 #15
Posted 13 November 2012 - 03:16 PM
Everytime I try to play it, I get a : shipper:396: attempt to index ? (a nil value) error
I Did install the art api, I think
Did you load the API?, the same happened to me, I loaded the API, and it worked
nitrogenfingers #16
Posted 13 November 2012 - 06:49 PM
I haven't had the time yet to look at this but it looks cool!
Sammich Lord #17
Posted 13 November 2012 - 06:57 PM
Confusing but cool.
Kilobyte #18
Posted 14 November 2012 - 08:45 AM
nice dude, gotta try this now (because it looks awesome and i need something nice to test the KilOS sandbox)

if it is nice i would provide it with KilOS (link in my signature) if you are ok with that (ofc i'll credit you)
billysback #19
Posted 14 November 2012 - 09:04 AM
sure, include it if you want, you will (ofc) need to include my Art API as well, but I give permission for that too :P/>/>

( by the way, has anyone found the Easter egg yet? It's very pretty :)/>/> )
Leo Verto #20
Posted 15 November 2012 - 06:39 AM
( by the way, has anyone found the Easter egg yet? It's very pretty :P/>/> )
Yes, Star Wars ftw!

Actually haven't found it yet, I'll scan the code soon.
rickydaan #21
Posted 08 December 2012 - 05:40 AM
Error on line 396
billysback #22
Posted 08 December 2012 - 05:44 AM
What's the error?
I presume it's something about nil pointers, if so then you haven't installed the ART API.
BigSHinyToys #23
Posted 08 December 2012 - 05:51 AM
What's the error?
I presume it's something about nil pointers, if so then you haven't installed the ART API.
adding something like

if not art and type(art) ~= "table" then
    error("art API not installed see <site here> and install the art api")
end
might make these kinds of bugs easer to diagnose.
billysback #24
Posted 08 December 2012 - 05:58 AM

if not art and type(art) ~= "table" then
    error("art API not installed see <site here> and install the art api")
end
or

if type(art) ~= "table" then
    print("Installing ART API")
    shell.run("pastebin get ERf5QAkK art")
end
TheOddByte #25
Posted 09 December 2012 - 05:30 AM
Everytime I try to play it, I get a : shipper:396: attempt to index ? (a nil value) error
I Did install the art api, I think
Did you load the API?, the same happened to me, I loaded the API, and it worked
I did also download it and then loaded the API but still getting the same error..
billysback #26
Posted 10 December 2012 - 12:05 AM
Try adding this code to the top of the file:

os.loadAPI("art")
if type(art) ~= "table" then
    print("Installing ART API")
    shell.run("pastebin get ERf5QAkK art")
end
or re-download Shipper