I thought I'd start a thread on old programs, old games that you have made years ago.
Share your first pacman clone, .bat file, calculator or whatever.
I'll start off with something I've made when I was 12 using Game Maker;
[url]https://dl.dropbox.com/u/17984511/project%20negative1.exe[/url]
I really thought this game had potential when I was creating it, even though it is a blatant ripoff of some other game I can't remember.
I have purged all evidence of my 12 year old self
But all you need to know are 2 things
Benny hill theme+Garrysmod
EUUHGGGHGGG
In 2010 I made a LUA script to display the unreal tournament 99 connection lost texture when your ping hit over 200.
It worked pretty well, but it was pointless.
I made this Pacman clone in QBasic many a years ago:
[IMG]https://dl.dropbox.com/u/19301242/Pics/DSG/pacman.png[/IMG]
Have some Flash crap:
[url=http://www.newgrounds.com/portal/view/502077]Pirate Launch[/url]
[url=http://www.newgrounds.com/portal/view/487844]Guns and Monocles[/url]
I also made a complex raycaster thing in C++ around the same time but I can't find it anywhere, just a vid: [url]http://www.youtube.com/watch?v=AV8g1FspF5o[/url]
This stuff was from when I was around 15 / 16. There's more of my older stuff on my youtube channel.
[QUOTE=Ziks;38222361]Have some Flash crap:
[url=http://www.newgrounds.com/portal/view/502077]Pirate Launch[/url]
[url=http://www.newgrounds.com/portal/view/487844]Guns and Monocles[/url]
I also made a complex raycaster thing in C++ around the same time but I can't find it anywhere, just a vid: [url]http://www.youtube.com/watch?v=AV8g1FspF5o[/url]
This stuff was from when I was around 15 / 16. There's more of my older stuff on my youtube channel.[/QUOTE]
No offense, but judging from your newgrounds nickname I'd say that you are about 14 years old.
just because someone has numbers in their name doesn't mean that is their birthdate
for example, the 1 in your username could mean that you are 11.
[QUOTE=P1raten;38222632]No offense, but judging from your newgrounds nickname I'd say that you are about 14 years old.[/QUOTE]
Judging by your facepunch nickname I'd say that you are about 12 years old.
I was struggling to find some content, Then I saw "Flash"
Give me a mo....
A terribly unoptimized C# orbit toy. This was my first completed large project
[img_thumb]http://i.imgur.com/z3PpE.jpg[/img_thumb]
Then shortly afterwards I made one of those 'chain-reaction' games, but with a twist: gravity
[vid]https://dl.dropbox.com/u/39090770/img/becr.webm[/vid]
Black outlined reactions pulled objects towards it, and white outlined reactions pushed objects away from it.
A while after that, I was addicted to [url="http://www.zachtronicsindustries.com/play-kohctpyktop/"]KOHCTPYKTOP[/url] for a while, so I ended up making a working KOHCTPYKTOP electricity emulator
[vid]https://dl.dropbox.com/u/39090770/img/sili.webm[/vid]
[editline]28th October 2012[/editline]
[QUOTE=benjojo;38223124]I was struggling to find some content, Then I saw "Flash"
Give me a mo....[/QUOTE]
Oh god, I don't even want to look at my flash folder.
[QUOTE=Zethereal;38222883]Judging by your facepunch nickname I'd say that you are about 12 years old.[/QUOTE]
And how did you come to that conclusion?
Seeings as there's [U]at least[/U] some logic behind my guess.
[QUOTE=P1raten;38222632]No offense, but judging from your newgrounds nickname I'd say that you are about 14 years old.[/QUOTE]
Given that I was about 13 when I got the account that's not an unreasonable conclusion. I worked out it was a terrible name pretty quickly after I got it.
[QUOTE=Ziks;38223289]Given that I was about 14 when I got the account that's not an unreasonable conclusion. I worked out it was a terrible name pretty quickly after I got it.[/QUOTE]
Dang it! The registration date!
Well that was just silly to forget to check that.
[QUOTE=P1raten;38223215]And how did you come to that conclusion?
Seeings as there's [U]at least[/U] some logic behind my guess.[/QUOTE]
I chose ief015 (my original alias) because at the time my favourite number was 15 (and because "ief" was taken on Steam). It doesn't mean I was 15. There's no logic, you're just taking a guess.
[QUOTE=ief014;38223317]I chose ief015 (my original alias) because at the time my favourite number was 15 (and because "ief" was taken on Steam). It doesn't mean I was 15. There's no logic, you're just taking a guess.[/QUOTE]
It is logic.
Some people use their last 2 numbers in the year they were born in their usernames. And especially if it's only two digits, 90 and above then I'd say that there's is logic behind it.
[QUOTE=P1raten;38224057]It is logic.
Some people use their last 2 numbers in the year they were born in their usernames. And especially if it's only two digits, 90 and above then I'd say that there's is logic behind it.[/QUOTE]
"Some people" makes it probabilistic inference, not logic.
[QUOTE=Jookia;38222939][code]Lots of code[/code]
Variables, functions, comments, what're they?[/QUOTE]
Wow that reminds me of Tribes 2 (Torque script), I was doing some shit for T2: Construction Mod.
[QUOTE=Eudoxia;38224225]"Some people" makes it probabilistic inference, not logic.[/QUOTE]
I disagree.
I was not saying that the fact that "Some People" use their year of birth as the 2 last digits in their name is logical. I was saying that someone having 2 digits in their name at the end provided it's ~50 and above is logical.
I did a game called Super Pacman, I was so lazy so I did a blatant copy of my longest level. I did the whole game in Game Maker. Hope I never find it (its on one of my CDs).
I did several strange games spanning from platformers, puzzles, breakout and stuff that I even can't remember. I never get any of those done and now they are all lost. There might be... heck I am not even gonna try to restore any of the shit.
Also I did a game called CUBE. There was moving NPC, cinematics, trigged event and what not. You need some shit called DarkGDK to run it through so I am not going to upload it. I did a very simple tower defense game as well. I might upload what I find if interest exsist!
[QUOTE=Robbis_1;38224407]Wow that reminds me of Tribes 2 (Torque script), I was doing some shit for T2: Construction Mod.[/QUOTE]
It's a script for a game that uses TorqueScript, yeah.
Here's an IRC bot I made in 2008:
[code]
use Net::IRC;
use HTTP::Lite;
use XML::Simple;
use Data::Dumper;
print "LOG> Started.\n";
my $irc = new Net::IRC;
my $conn = $irc->newconn( Nick => 'TurbBot',
Server => shift || 'irc.gamesurge.net',
Port => 6667,
Ircname => 'TurbBot',
Username => 'TurbBot');
$conn->{channel} = shift;
my %ban_list;
my %admin_list;
my %admins;
$admins{"Turbulence"} = "letmein123";
print "LOG> Configured.\n";
sub leave_irc {
}
sub on_public {
my ($c, $event) = @_;
my $text = $event->{args}[0];
if($text=~/^-tb (.*)$/) {
do_tb_cmd($c, $1, $event->{nick});
}
print "<" . $event->{nick} . "> " . $text . "\n";
}
$conn->add_handler('public',\&on_public);
sub do_tb_cmd {
($c,$cmd,$nick) = @_;
if($ban_list{$nick} > time()) {
$user_banned = 1;
} else {
$user_banned = 0;
}
if(! $user_banned) {
if($cmd=~/^news$/) {
$conn->privmsg($conn->{channel},"4Headlines � Copyright News Limited.");
$news_http = new HTTP::Lite;
$news_req = $news_http->request('http://feeds.news.com.au/public/rss/2.0/heraldsun_top_stories_254.xml') or warn 'fail: $1';
$news_ref = XMLin($news_http->body());
%news_hash = %$news_ref;
$i = 0;
$conn->privmsg($conn->{channel},"6[News] For more info on a story, say '-tb news <story id>'");
while(%news_hash->{channel}->{item}->[$i]) {
@news_arr = %news_hash->{channel}->{item}->[$i];
$news_desc = @news_arr[0]->{description};
$news_desc=~s/<.*?>//g;
$conn->privmsg($conn->{channel},"6[News] " . ($i+1) . " - " . @news_arr[0]->{title});
#sleep 0.2;
$i++;
}
}
if($cmd=~/^news (\d+)$/) {
$conn->privmsg($conn->{channel},"4Headlines � Copyright News Limited.");
$news_http = new HTTP::Lite;
$news_req = $news_http->request('http://feeds.news.com.au/public/rss/2.0/heraldsun_top_stories_254.xml') or warn 'fail: $1';
$news_ref = XMLin($news_http->body());
%news_hash = %$news_ref;
@news_arr = %news_hash->{channel}->{item}->[$1-1];
$news_desc = @news_arr[0]->{description};
$news_desc=~s/<.*?>//g;
$conn->privmsg($conn->{channel},"6[News] " . @news_arr[0]->{title});
$descr = @news_arr[0]->{description};
$descr=~s/<.*?>//g;
$conn->privmsg($conn->{channel},"6[News] " . $descr);
$conn->privmsg($conn->{channel},"6[News] 12" . @news_arr[0]->{guid});
}
if($cmd=~/^digg$/) {
$conn->privmsg($conn->{channel},"4Digg Headlines � Copyright Digg & Contributors.");
$news_http = new HTTP::Lite;
$news_req = $news_http->request('http://feeds.digg.com/digg/popular.rss') or warn 'fail: $1';
$news_ref = XMLin($news_http->body());
%news_hash = %$news_ref;
$i = 0;
$conn->privmsg($conn->{channel},"6[Digg] For more info on a headline, say '-tb digg <headline id>'");
#while(%news_hash->{channel}->{item}->[$i]) {
while($i < 10) {
@news_arr = %news_hash->{channel}->{item}->[$i];
$news_desc = @news_arr[0]->{description};
$news_desc=~s/<.*?>//g;
$conn->privmsg($conn->{channel},"6[Digg] " . ($i+1) . " - " . @news_arr[0]->{title});
#sleep 0.2;
$i++;
}
}
if($cmd=~/^digg (\d+)$/) {
$conn->privmsg($conn->{channel},"4Digg Headlines � Copyright Digg & Contributors.");
$news_http = new HTTP::Lite;
$news_req = $news_http->request('http://feeds.digg.com/digg/popular.rss') or warn 'fail: $1';
$news_ref = XMLin($news_http->body());
%news_hash = %$news_ref;
@news_arr = %news_hash->{channel}->{item}->[$1-1];
$news_desc = @news_arr[0]->{description};
$news_desc=~s/<.*?>//g;
$conn->privmsg($conn->{channel},"6[Digg] " . @news_arr[0]->{title});
$descr = @news_arr[0]->{description};
$descr=~s/<.*?>//g;
$conn->privmsg($conn->{channel},"6[Digg] " . $descr);
$conn->privmsg($conn->{channel},"6[Digg] 12" . @news_arr[0]->{guid}->{content});
}
if($cmd=~/^req (.+)$/) {
open(REQ,">>TurbBot_Requests.txt");
print REQ "<$nick> $1 \n";
close REQ;
$conn->privmsg($conn->{channel},"6[Request] Thanks " . $nick . ", your feature request has been recorded.");
}
if($cmd=~/^extensive research (.+)$/) {
$conn->privmsg($conn->{channel},"6[Extensive Research] Google is your friend... 12http://en.wikipedia.org/wiki/" . $1);
}
if($cmd=~/^rr$/) {
$conn->privmsg($conn->{channel},"6[Russian Roulette] $nick chambers a single bullet...");
sleep 2;
$conn->privmsg($conn->{channel},"6[Russian Roulette] $nick slowly draws the gun to his temple...");
sleep 2;
if(rand(1) > 0.5) {
$conn->privmsg($conn->{channel},"6[Russian Roulette] 4BLAM! $nick shot himself.");
} else {
$wmsg = int(rand(2));
if($wmsg == 0) {
$conn->privmsg($conn->{channel},"6[Russian Roulette] Close one! $nick lives to fight another day.");
}
if($wmsg == 1) {
$conn->privmsg($conn->{channel},"6[Russian Roulette] Click!");
}
if($wmsg == 2) {
$conn->privmsg($conn->{channel},"6[Russian Roulette] $nick just dodged a Darwin Award.");
}
}
}
if($cmd=~/^help$/) {
$conn->privmsg($conn->{channel},"6[Help] Hi there! Thanks for using TurbBot, Turbulence's IRC Bot.");
$conn->privmsg($conn->{channel},"6[Help] All TurbBot commands follow this rule: -tb <command> [<optional parameters>]");
$conn->privmsg($conn->{channel},"6[Help] Current TurbBot commands: help, news, digg, rr, extensive research, calc, and req.");
#$conn->privmsg($conn->{channel},"6[Help] For more info on a certain command, say -tb help <command>");
}
if($cmd=~/^help news$/) {
$conn->privmsg($conn->{channel},"6[Help] Help for 3-tb news");
$conn->privmsg($conn->{channel},"6[Help] This command retreives the Top 10 headlines from the Herald Sun.");
$conn->privmsg($conn->{channel},"6[Help] You can find out more information about an article (including the link) by saying 3-tb news <article id>");
}
if($cmd=~/^help digg$/) {
$conn->privmsg($conn->{channel},"6[Help] Help for 3-tb digg");
$conn->privmsg($conn->{channel},"6[Help] This command retreives the Top 10 headlines from Digg.com");
$conn->privmsg($conn->{channel},"6[Help] You can find out more information about an article (including the link) by saying 3-tb digg <article id>");
}
if($cmd=~/^help req$/) {
$conn->privmsg($conn->{channel},"6[Help] Help for 3-tb req");
$conn->privmsg($conn->{channel},"6[Help] You can request additional features to be added to TurbBot with this command");
$conn->privmsg($conn->{channel},"6[Help] Simply type into chat 3-tb req <requested feature>");
}
if($cmd=~/^help rr$/) {
$conn->privmsg($conn->{channel},"6[Help] Help for 3-tb rr");
$conn->privmsg($conn->{channel},"6[Help] You can play Russian Roulette with TurbBot!");
$conn->privmsg($conn->{channel},"6[Help] Just say 3-tb rr");
}
if($cmd=~/^help extensive research$/) {
$conn->privmsg($conn->{channel},"6[Help] Help for 3-tb extensive research");
$conn->privmsg($conn->{channel},"6[Help] TurbBot is able to carry out extensive research into any subject for you.");
$conn->privmsg($conn->{channel},"6[Help] That assignment due tomorrow? No problems! Just cheat off TurbBot.");
$conn->privmsg($conn->{channel},"6[Help] Just say 3-tb extensive research <subject>");
}
if($cmd=~/^help calc$/) {
$conn->privmsg($conn->{channel},"6[Help] Help for 3-tb calc");
$conn->privmsg($conn->{channel},"6[Help] You can harness the computing power of the Perl language (although stripped down) with the calc command");
$conn->privmsg($conn->{channel},"6[Help] You can use any number, the decimal point, the characters +, -, *, / and parenthesis (brackets) in your expression");
$conn->privmsg($conn->{channel},"6[Help] Powers can be calculated by using a double asterisk, eg 2**4 evaluates to 16.");
$conn->privmsg($conn->{channel},"6[Help] Just say 3-tb calc <expression>");
}
if($cmd=~/^echo (.*)$/) {
$conn->privmsg($conn->{channel},"6[Echo] <$nick> $1");
}
if($cmd=~/^calc (.*)$/) {
$expr = $1;
if($expr=~m/^[0-9\.\-+*\/\s\(\)]*$/) {
$r = eval($expr) or $@;
if($@) {
$conn->privmsg($conn->{channel},"6[Calculator] 4" . $@);
} else {
$conn->privmsg($conn->{channel},"6[Calculator] " . $r);
}
} else {
$conn->privmsg($conn->{channel},"6[Calculator] You have used illegal characters in your expression. Valid characters are numbers, decimal points, +, -, *, /, and parenthesis.");
}
}
} else {
$conn->privmsg($nick,"4You are currently banned from using TurbBot. Please try again later.");
}
}
sub on_msg {
my ($c,$event) = @_;
if($event->{args}->[0]=~/^auth (.*)$/i) {
if($admins{$event->{nick}} eq $1) {
$admin_list{$event->{nick}} = 1;
if($event->{nick} eq "Turbulence") {
$admin_list{$event->{nick}} = 2;
}
$conn->privmsg($event->{nick},"3Your admin privileges have been applied.");
$conn->privmsg($conn->{channel},"6[Admin] " . $event->{nick} . " is now a TurbBot Admin.");
} else {
$conn->privmsg($event->{nick},"4Incorrect password!");
}
} else {
if($admin_list{$event->{nick}}) {
if($event->{args}->[0]=~/^--ban (\d+) (.*)$/i) {
$bansecs = $1 * 60;
$ban_list{$2} = time() + $bansecs;
$conn->privmsg($conn->{channel},"6[Admin] $2 has been banned from TurbBot for $1 minutes, by " . $event->{nick});
}
if($event->{args}->[0]=~/^--unban (.*)$/i) {
$ban_list{$1} = 0;
$conn->privmsg($conn->{channel},"6[Admin] $1 has been unbanned from TurbBot, by " . $event->{nick});
}
if($event->{args}->[0]=~/^--grant (.*)$/i) {
$ban_list{$1} = 0;
$conn->privmsg($conn->{channel},"6[Admin] $1 has been granted TurbBot admin, by " . $event->{nick});
}
if($event->{args}->[0]=~/^--revoke (.*)$/i) {
$ban_list{$1} = 0;
if($admin_list{$1} > $admin_list{$event->{nick}}) {
$conn->privmsg($event->{nick},"4You cannot revoke $1's admin privileges!");
} else {
$conn->privmsg($conn->{channel},"6[Admin] " . $event->{nick} . " has revoked $1's admin privileges.");
}
}
} else {
$conn->privmsg($event->{nick},"4Sorry, but you haven't authenticated with TurbBot yet.");
$conn->privmsg($event->{nick},"4Please say 3/msg TurbBot auth <your password>");
}
}
}
$conn->add_handler('msg', \&on_msg);
print "LOG> Initializing...\n";
my $i = 0;
while($i < 10) {
$irc->do_one_loop();
$i++;
print "LOG> *\n";
}
print "LOG> Connecting...\n";
print "\n";
print "\n";
$conn->join($conn->{channel});
$conn->privmsg("authserv@services.gamesurge.net","auth TurbBot letmein123");
print "LOG> Connected.\n";
$irc->start();
[/code]
And here's a script from a CGI game I wrote in 2004:
[code]
#!/usr/local/bin/perl
require CGI;
$cgi=new CGI;
print $cgi->header();
$opbullets=$cgi->param("opbullets");
$bullets=$cgi->param("bullets");
$bullets="0" if (! $bullets);
$opbullets="0" if(! $opbullets);
$win1=0;
$win2=0;
@todo=("Shoot","Load","Rebound","Sheild");
while(1) {
$random=int(rand(4));
if($cgi->param("opbullets") <= 0 && $todo[$random] eq "Shoot") {
redo;
} else {
last;
}
}
if($todo[$random] eq "Load") {
$opbullets=$opbullets+5;
}
if($cgi->param("shoot") && $bullets <= 0) {
$disabled="disabled=\"true\" ";
}
elsif($cgi->param("sheild") && $todo[$random] eq "Shoot") {
$message=$cgi->param("opponent") . " tries to shoot you, but you block it!";
$opbullets--;
} elsif($cgi->param("sheild") && $todo[$random] ne "Shoot") {
$message=$cgi->param("opponent") . " does a " . $todo[$random] . " and you sheild.";
} elsif($cgi->param("rebound") && $todo[$random] eq "Shoot") {
$message=$cgi->param("opponent") . " shoots, but you rebound and win!";
$win1=true;
$opbullets--;
} elsif($cgi->param("rebound") && $todo[$random] ne "Shoot") {
$message="You rebound but that doesn't matter because " . $cgi->param("opponent") . " doesn't shoot.";
} elsif($cgi->param("load") && $todo[$random] eq "Shoot") {
$message="Ahh, don't you hate that? Your opponent shoots while you're reloading!";
$win2=true;
$opbullets--;
} elsif($cgi->param("load") && $todo[$random] ne "Shoot") {
$message="Reload! (by the way, " . $cgi->param("opponent") . " $todo[$random]s).";
$bullets=$bullets+5;
} elsif($cgi->param("shoot") && $todo[$random] eq "Shoot") {
$message="Ooop! You both shoot, anyway, on with the game.";
$opbullets--;
$bullets--;
} elsif($cgi->param("shoot") && $todo[$random] eq "Rebound") {
$message="Game over! Your bullet was rebounded!";
$win2=true;
$bullets--;
} elsif($cgi->param("shoot") && $todo[$random] eq "Sheild") {
$message="Ahh! " . $cgi->param("opponent") . " blocks you.";
$bullets--;
} elsif($cgi->param("shoot") && $todo[$random] eq "Load") {
$message="Yay! You got " . $cgi->param("opponent") . " while he was reloading!";
$bullets--;
$win1=true;
} else {
print "Unknown error!\n";
exit;
}
$move=$cgi->param("shoot") . $cgi->param("sheild") . $cgi->param("load") . $cgi->param("rebound");
$opponent=$cgi->param("opponent");
if($opbullets <= 0) {
$obcol="#FF0000";
} else {
$obcol="#00FF00";
}
if($bullets <= 0) {
$bcol="#FF0000";
} else {
$bcol="#00FF00";
}
print<<MARK;
<html>
<head>
<title>
ClapClap
</title>
<script>
function dis_Shoot() {
if(document.forms[0].bullets.value <= 0) {
document.forms[0].shoot.disabled=true;
} else {
document.forms[0].shoot.disabled=false;
}
}
</script>
</head>
<body onload="dis_Shoot();">
<center>
<table>
<tr>
<td>Your bullets:</td>
<td bgcolor="$bcol">
<font size=6 face=arial><b>$bullets</b></font>
</td>
<td>
${opponent}'s bullets:
</td>
<td bgcolor="$obcol">
<font size=6 face=arial><b>$opbullets</b></font>
</td>
</tr>
<tr>
<td colspan=4 align=center>
<b>ClapClap</b>
</td>
</tr>
<tr>
<td colspan=2 align=center>
You: $move
</td>
<td colspan=2 align=center>
$opponent: $todo[$random]
</td>
</tr>
<tr>
<td colspan=4 bgcolor=#ccffcc align=center>
$message
</td>
</tr>
</table>
<p>
MARK
if($win1) {
print "You win!<p><small><a href=\"index.cgi\">Play again!</a></body></html>\n";
} elsif($win2) {
print "$opponent wins!<p><small><a href=\"index.cgi\">Play again!</a></body></html>\n";
} else {
print<<MARK;
<form action=play.cgi method=post>
<input type=hidden name=opbullets value=$opbullets>
<input name=rounds value=1 type=hidden><input name=bullets value=$bullets type=hidden><input type=hidden name=opponent value="$opponent">
<input type=submit name=load value="Load"><input type=submit name=shoot value="Shoot"><input type=submit name=sheild value="Sheild"><input type=submit name=rebound value="Rebound">
</form>
MARK
}
[/code]
omg it's a GIF screenshot of said CGI game from 2004
[img]http://i.imgur.com/l5ZOa.gif[/img]
/nostalgia
[URL="http://pastebin.com/QC02WyZf"]http://pastebin.com/QC02WyZf[/URL]
In my defense, my native language isn't english and I was about 12.
At least you could spell shield correctly
Oldest thing I can come up with, [URL]http://planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=55309&lngWId=1[/URL]
[IMG]http://planet-source-code.com/Upload_PSC/ScreenShots/PIC2004821224232568.jpg[/IMG]
Edit: Even found a image of the next version of this:
[img]http://planet-source-code.com/Upload_PSC/ScreenShots/PIC20077211248242313.gif[/img]
I wrote some crappy MMO game a long time ago but people still play it...
Also toyed around making OS's and other dumb stuff.
September 2010 - GMod Valkyrie Rockets. I think I lost the code, but it was so awful that I was sending Entity:GetForward() value over networked variables to the client.
August 2011, when I knew only Lua and JS:
[code]
bindataFloat = function(fInString,fBigEndian)
{
if (fInString == null) return;
fInString = fInString.toString();
if (fInString.length < 4) return;
var fBits = "";
for (var i=0;i<4;i++)
{
var curByte = (fInString.charCodeAt(i)&255).toString(2);
var byteLen = curByte.length;
if (byteLen<8)
{
for (var bit=0;bit<(8-byteLen);bit++)
curByte = '0'+curByte;
}
fBits = fBigEndian ? fBits+curByte : curByte+fBits;
}
var fSign = parseInt(fBits[0]) ? -1 : 1;
var fExp = parseInt(fBits.substring(1,9),2)-127;
var fMan;
if (fExp == -127)
fMan = 0;
else
{
fMan = 1;
for (i=0;i<23;i++)
{
if (parseInt(fBits[9+i])==1)
fMan = fMan + 1/Math.pow(2,i+1);
}
}
return(parseFloat((fSign*Math.pow(2,fExp)*fMan).toFixed(3)));
}
[/code]
My eyes...
[QUOTE=Zeh Matt;38226220]Oldest thing I can come up with, [URL]http://planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=55309&lngWId=1[/URL]
Edit: Even found a image of the next version of this:
[/QUOTE]
Wow Planet Source Code. I remember using that site for code snippets when I was an absolute beginner doing VB6, I used that same Windows XP theme for a good long while too.
I wonder if my account still exists there (if I had one).
[QUOTE=Ziks;38222361]Have some Flash crap:
[url=http://www.newgrounds.com/portal/view/502077]Pirate Launch[/url]
[url=http://www.newgrounds.com/portal/view/487844]Guns and Monocles[/url]
I also made a complex raycaster thing in C++ around the same time but I can't find it anywhere, just a vid: [url]http://www.youtube.com/watch?v=AV8g1FspF5o[/url]
This stuff was from when I was around 15 / 16. There's more of my older stuff on my youtube channel.[/QUOTE]
Pirate Launch is amazing!
[QUOTE=SteveUK;38260960]Wow Planet Source Code. I remember using that site for code snippets when I was an absolute beginner doing VB6, I used that same Windows XP theme for a good long while too.
I wonder if my account still exists there (if I had one).[/QUOTE]
All the 'trojans' that are on there; oh man...
[editline]31st October 2012[/editline]
Also, here is some old stuff I done which wasn't done right:
[video=youtube;qsgDji6IQNs]http://www.youtube.com/watch?v=qsgDji6IQNs[/video]
[cpp]#include <a_samp>
#include <core>
#include <float>
#include <Dini>
#define COLOR_GREEN 0x33AA33AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_RED 0xFF000055
#define FILTERSCRIPT
forward MortarAim(playerid);
forward firemortar(playerid, Float:x, Float:y, Float:z);
forward returncamera(playerid);
forward GiveMissiles();
forward RemoveTextDraw(playerid);
forward TextDraw(playerid, text);
new Float:ROCKET_SPEED[256]; // 70.0
new Float:ROCKET_HEIGHT[256]; // 600.0
new int:MISSILE_OBJECT_ID[256]; // 3790
new int:MISSILE_MAX_AT_ONE_TIME[256]; // 5
new int:MISSILE_REFILL_TIME[256]; // 60
new int:MISSILE_EXPLOSION_TYPE[256]; // 7
new Float:MISSILE_EXPLOSION_RAD[256];
new int:ADMINS_HAVE_SUPER_POWERS[256];
new PLAYER_IS_AIM_MORTAR[MAX_PLAYERS];
new Float:OLD_CAMERA_POSX[MAX_PLAYERS];
new Float:OLD_CAMERA_POSY[MAX_PLAYERS];
new Float:OLD_CAMERA_POSZ[MAX_PLAYERS];
new Float:OLD_CAMERA_AIMX[MAX_PLAYERS];
new Float:OLD_CAMERA_AIMY[MAX_PLAYERS];
new Float:OLD_CAMERA_AIMZ[MAX_PLAYERS];
new mortaraim[MAX_PLAYERS];
new missile[MAX_PLAYERS];
new missilesmoke[MAX_PLAYERS];
new mortar_esc[MAX_PLAYERS];
new mortar_is_firing[MAX_PLAYERS];
new mortar_missiles_left[MAX_PLAYERS];
new Text:textdraw[MAX_PLAYERS];
main()
{
print("\n<|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^>>");
print("<|----{Mortar Strike By C0BRA}------|>");
print("<|_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-|>\n");
}
public OnFilterScriptInit()
{
ROCKET_HEIGHT[0] = floatstr(dini_Get("/mortarstrike/config.ini", "ROCKET_HEIGHT"));
MISSILE_OBJECT_ID[0] = strval(dini_Get("/mortarstrike/config.ini", "MISSILE_OBJECT_ID"));
ROCKET_SPEED[0] = floatstr(dini_Get("/mortarstrike/config.ini", "ROCKET_SPEED"));
MISSILE_MAX_AT_ONE_TIME[0] = strval(dini_Get("/mortarstrike/config.ini", "MISSILE_MAX_AT_ONE_TIME"));
MISSILE_REFILL_TIME[0] = strval(dini_Get("/mortarstrike/config.ini", "MISSILE_REFILL_TIME"));
MISSILE_EXPLOSION_TYPE[0] = strval(dini_Get("/mortarstrike/config.ini", "MISSILE_EXPLOSION_TYPE"));
MISSILE_EXPLOSION_RAD[0] = floatstr(dini_Get("/mortarstrike/config.ini", "MISSILE_EXPLOSION_RAD"));
ADMINS_HAVE_SUPER_POWERS[0] = strval(dini_Get("/mortarstrike/config.ini", "ADMINS_HAVE_SUPER_POWERS"));
SetTimer("GiveMissiles", 1000*MISSILE_REFILL_TIME[0], true);
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/texttest", cmdtext, true, 9) == 0)
{
if(cmdtext[9] == 0)
{
SendClientMessage(playerid, 0xF30000FF, "Usage: /texttest [TEXT]");
return 1;
}
new txt;
txt = cmdtext[10];
TextDraw(playerid, txt);
return 1;
}
if (strcmp("/mortar", cmdtext, true, 10) == 0)
{
printf("SPEED:%f HEIGHT:%f MAX:%i TIME:%i", ROCKET_SPEED[0], ROCKET_HEIGHT[0], MISSILE_MAX_AT_ONE_TIME[0], MISSILE_REFILL_TIME);
if(mortar_missiles_left[playerid] == 0) {
SendClientMessage(playerid, COLOR_RED, "You have no missiles, please wait to be alicated more!"); return 1;}
if(mortar_is_firing[playerid] == 1){
SendClientMessage(playerid, COLOR_ORANGE, "You can only fire one missile at a time!");
return 1;
}
mortar_missiles_left[playerid] -= 1;
mortar_is_firing[playerid] = 1;
new Float:x, Float:y, Float:z;
TogglePlayerControllable(playerid, 0);
GetPlayerPos(playerid, x, y, z);
OLD_CAMERA_POSX[playerid] = x;
OLD_CAMERA_POSY[playerid] = y;
OLD_CAMERA_POSZ[playerid] = z+30;
OLD_CAMERA_AIMX[playerid] = x;
OLD_CAMERA_AIMY[playerid] = y;
OLD_CAMERA_AIMZ[playerid] = z;
SetPlayerCameraPos(playerid, x, y, z);
PLAYER_IS_AIM_MORTAR[playerid] = 1;
mortaraim[playerid] = SetTimerEx("MortarAim", 100, true, "i", playerid);
return 1;
}
if (strcmp("/missilesleft", cmdtext, true, 15) == 0)
{
new str[128];
new missleft = mortar_missiles_left[playerid];
if(missleft == 0){
format(str, sizeof(str), "You have %i missiles left, Please wait for more!", missleft);
SendClientMessage(playerid, COLOR_RED, str);
}
else if(missleft == MISSILE_MAX_AT_ONE_TIME[0]){
format(str, sizeof(str), "You have %i missiles left, You are at your maximum limit!", missleft);
SendClientMessage(playerid, COLOR_GREEN, str);
} else {
format(str, sizeof(str), "You have %i missiles left!", missleft);
SendClientMessage(playerid, COLOR_ORANGE, str);
}
return 1;
}
return 0;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(PLAYER_IS_AIM_MORTAR[playerid] == 1)
{
TogglePlayerControllable(playerid, 1);
SetCameraBehindPlayer(playerid);
KillTimer(mortaraim[playerid]);
PLAYER_IS_AIM_MORTAR[playerid] = 0;
}
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnPlayerDisconnect(playerid)
{
mortar_missiles_left[playerid] = 0;
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
KillTimer(mortaraim[playerid]);
mortar_esc[playerid] = 0;
return 1;
}
public OnPlayerConnect(playerid)
{
mortar_esc[playerid] = 0;
mortar_missiles_left[playerid] = 0;
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
KillTimer(mortaraim[playerid]);
return 1;
}
public MortarAim(playerid)
{
if(PLAYER_IS_AIM_MORTAR[playerid] == 1)
{
new Float:multi = 2.0;
new keys, updown, leftright;
if(IsPlayerConnected(playerid))
{
GetPlayerKeys(playerid, keys, updown, leftright);
new Float:x, Float:y, Float:z, Float:x2, Float:y2, Float:z2;
x2 = OLD_CAMERA_AIMX[playerid];
y2 = OLD_CAMERA_AIMY[playerid];
z2 = OLD_CAMERA_AIMZ[playerid];
x = OLD_CAMERA_POSX[playerid];
y = OLD_CAMERA_POSY[playerid];
z = OLD_CAMERA_POSZ[playerid];
if(keys == KEY_SPRINT)
{
multi = 10.0;
}
if(keys == KEY_WALK)
{
multi = 0.5;
}
if(keys == KEY_ANALOG_UP || updown == KEY_UP)
{
y2+=2*multi;
y+=2*multi;
x2+=2*multi;
x+=2*multi;
}
if(keys == KEY_ANALOG_DOWN || updown == KEY_DOWN)
{
y2-=(2*multi);
y-=(2*multi);
x2-=(2*multi);
x-=(2*multi);
}
if(keys == KEY_ANALOG_RIGHT || leftright == KEY_RIGHT)
{
y2-=(2*multi);
y-=(2*multi);
x2+=2*multi;
x+=2*multi;
}
if(keys == KEY_ANALOG_LEFT || leftright == KEY_LEFT)
{
y2+=2*multi;
y+=2*multi;
x2-=(2*multi);
x-=(2*multi);
}
if(keys == KEY_ACTION)
{
z2+=2*multi;
z+=2*multi;
}
if(keys == KEY_JUMP)
{
z2-=(2*multi);
z-=(2*multi);
}
OLD_CAMERA_AIMX[playerid] = x2;
OLD_CAMERA_AIMY[playerid] = y2;
OLD_CAMERA_AIMZ[playerid] = z2;
OLD_CAMERA_POSX[playerid] = x;
OLD_CAMERA_POSY[playerid] = y;
OLD_CAMERA_POSZ[playerid] = z;
SetPlayerCameraPos(playerid, x, y, z);
SetPlayerCameraLookAt(playerid, x2, y2, z2);
if(keys == KEY_SECONDARY_ATTACK)
{
KillTimer(mortaraim[playerid]);
PLAYER_IS_AIM_MORTAR[playerid] = 0;
missile[playerid] = CreateObject(MISSILE_OBJECT_ID[0], x2, y2, z2+ROCKET_HEIGHT[0],0.0,-90.0,0.0); //rocket
missilesmoke[playerid] = CreateObject(269, x2, y2, z2+ROCKET_HEIGHT[0], 0.0, 0.0, 0.0); //Smoke
MoveObject(missile[playerid], x2, y2, z2, ROCKET_SPEED[0]);
MoveObject(missilesmoke[playerid], x2, y2, z2, ROCKET_SPEED[0]);
mortar_esc[playerid] = 0;
mortaraim[playerid] = SetTimerEx("firemortar", 50, true, "ifff", playerid, x2, y2, z2);
}
}
} else {
TogglePlayerControllable(playerid, 1);
SetCameraBehindPlayer(playerid);
KillTimer(mortaraim[playerid]);
}
}
public firemortar(playerid, Float:x, Float:y, Float:z)
{
new Float:xx, Float:yy, Float:cz;
GetObjectPos(missile[playerid], xx, yy, cz);
if(mortar_esc[playerid] == 0)
{
SetPlayerCameraLookAt(playerid, x, y, z);
SetPlayerCameraPos(playerid, xx+0.500001, yy+0.500001, cz+1.500001);
}
if(cz == z)
{
KillTimer(mortaraim[playerid]);
CreateExplosion(x, y, z, MISSILE_EXPLOSION_TYPE[0], MISSILE_EXPLOSION_RAD[0]);
DestroyObject(missile[playerid]);
DestroyObject(missilesmoke[playerid]);
if(mortar_esc[playerid] == 0){
SetPlayerCameraLookAt(playerid, x, y, z);
SetPlayerCameraPos(playerid, x, y+20, z+50);
}
mortaraim[playerid] = SetTimerEx("returncamera", 50, true, "i", playerid);
}
new keys, leftright, updown;
GetPlayerKeys(playerid, keys, updown, leftright);
if(keys == KEY_SPRINT && mortar_esc[playerid] == 0){
mortar_esc[playerid] = 2;
}
if (mortar_esc[playerid] == 2)
{
TogglePlayerControllable(playerid, 1);
SetCameraBehindPlayer(playerid);
mortar_esc[playerid] = 1;
}
}
public returncamera(playerid)
{
new keys, leftright, updown;
GetPlayerKeys(playerid, keys, updown, leftright);
if(keys == KEY_SECONDARY_ATTACK) {
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid, 1);
KillTimer(mortaraim[playerid]);
mortar_is_firing[playerid] = 0;
mortar_esc[playerid] = 0;
}
if(mortar_esc[playerid] == 1){
KillTimer(mortaraim[playerid]);
mortar_esc[playerid] = 0;
mortar_is_firing[playerid] = 0;
}
}
public GiveMissiles()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(mortar_missiles_left[i] == 5)
{}else{
mortar_missiles_left[i] += 1;
}
if(IsPlayerAdmin(i) && ADMINS_HAVE_SUPER_POWERS[0] == 1)
{
mortar_missiles_left[i] = MISSILE_MAX_AT_ONE_TIME[0];
}
}
}
}
public TextDraw(playerid, text)
{
new textdr[256];
format(textdr, sizeof(textdr), "%s", text);
textdraw[playerid] = TextDrawCreate(350.0, 500.0, textdr);
TextDrawFont(textdraw[playerid], 1);
TextDrawSetOutline(textdraw[playerid], 1);
TextDrawAlignment(textdraw[playerid], 2);
TextDrawShowForPlayer(playerid, textdraw[playerid]);
SetTimerEx("RemoveTextDraw", 2000, false, "i", playerid);
}
public RemoveTextDraw(playerid)
{
TextDrawDestroy(textdraw[playerid]);
}
[/cpp]
Sorry, you need to Log In to post a reply to this thread.