Jump to content




Cookiebal's Programs (CookieSystem || Turtle advanced movement || Skynet networking || Project World Eater || And a lot more)


160 replies to this topic

#1 Cookiebal

  • Members
  • 82 posts

Posted 29 January 2012 - 12:04 AM

The first post will mostly contain my more or less finished projects.
The second post is for my filebrowser system (CookieSystem).
The third post is for project world eater and related things.

CookieCannon
Spoiler

Chicken Factory
Spoiler

E-mails (and virus)
Spoiler

Connect 4 (multiplayer)
Spoiler

Persistent Variables (api)
Spoiler


The Turtle Factory
Spoiler


Pathfinding and Waypoints (using coordinates)
Spoiler


Skynetapi
Spoiler

IRC
Spoiler

CookieTV
Spoiler


Frame Engine Factory
Spoiler


#2 Cookiebal

  • Members
  • 82 posts

Posted 29 January 2012 - 12:05 AM

CookieSystem

Latest version installer: V1.1
Pastebin: http://pastebin.com/J9DAzTKf
Mediafire: http://www.mediafire...vl7r3byy8va2x03


V1:
Spoiler

V1.1

Spoiler


planned for 1.2 if it ever comes:
-CSInstaller moves to /Cookiesystem/CS after it's finished
-When a program ended it will only continue after a key has been pressed, and it will clear the screen before the program starts.
-Show file levels on the file tiles.

#3 Cookiebal

  • Members
  • 82 posts

Posted 29 January 2012 - 12:07 AM

Advanced coordinate based movement system with basic block avoidance and waypoints

Spoiler

Movement System (update)
Spoiler

Guide to an automatic turtle activator and installer
(useful for factories that produce turtles)
Spoiler


#4 FuzzyPurp

    Part-Time Ninja

  • Members
  • 510 posts
  • LocationHarlem, NY

Posted 03 February 2012 - 07:32 PM

Lol - CookieMonsta :(/>

#5 Cookiebal

  • Members
  • 82 posts

Posted 10 February 2012 - 08:34 PM

Been a bit inactive, but now I got something useful for factories and other things which need to remember stuff for a long time (like a counting machine that needs to keep track of something even if you quit or the server dies),

Persistent Variables!
A standalone api that saves your variables and allows you to change/read them later on. It is designed to work together with CookieSystem, which is why the default path is "/CookieSystem/CS System/pervar/", but that can be changed at the top of the program.

Currently there are four functions:

pervarcreate(variablename) -- creates a new (empty) variable. but only if it doesn't exist already.
pervardelete(variablename) -- deletes an existing variable.
pervarchange(variablename, newvalue) -- changes the variable to newvalue
pervarread(variablename) -- reads the variable


so pervarcreate("rawr") would create it.
Then you can use pervarchange("rawr", 30) to set it to 30.
print(pervarread("rawr")) will give 30.
pervardelete("rawr") will then delete the variable.


The code:
Spoiler

To use it in your programs you can either paste this code on top of your program or put this code in a separate program and add the line "shell.run("path+name")" to the top of your code.

#6 arongy

  • New Members
  • 37 posts
  • LocationQuebec, Canada

Posted 10 February 2012 - 09:32 PM

I like your Persistent Variables! :D/>

#7 Cookiebal

  • Members
  • 82 posts

Posted 23 February 2012 - 03:29 PM

The Turtle Factory
]

You throw the items in the bucket (or have a turtle do it!) and push the button at the end of the production line and get a ready to use pre-programmed turtle! It automatically sorts all materials you throw in it, with a build in incinerator to dispose of what you don't need, then it processes the raw materials until it eventually becomes a wireless mining turtle!

Some (slightly outdated) images to explain what each part does:
Spoiler


Pathfinding and Waypoints (using coordinates)
outdated video: (it's easier to use now, but the core still works the same)

A navigation program based on coordinates, using my persistent variables api I made it possible for the turtle to remember where he is, so you just give it his coords when you set him up and you're good to go. It automatically follows coords in a waypoints text file (using the format x,y,z so without any brackets). It also has some basic block avoidance (see video), though it will still get stuck sometimes, especially against larger or complex things, but it's designed for air travel where there aren't many obstacles usually.

#8 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 23 February 2012 - 03:49 PM

Nice, I like your turtle factory.
Fully automatic minion creation and deployment... ready for battle. ^_^/>

#9 Cookiebal

  • Members
  • 82 posts

Posted 23 February 2012 - 06:21 PM

Just finished this

#10 DarkNinja2462

  • Members
  • 107 posts
  • LocationThe 4th Dimension

Posted 23 February 2012 - 10:36 PM

Can you give us the waypoint/pathfinding program?

#11 Cookiebal

  • Members
  • 82 posts

Posted 24 February 2012 - 12:57 AM

View PostDarkNinja2462, on 23 February 2012 - 10:36 PM, said:

Can you give us the waypoint/pathfinding program?

I'll make it public tomorrow. Not enough time now. Already 2 am for me and I first need to upload this video about project world eater!

#12 Cookiebal

  • Members
  • 82 posts

Posted 24 February 2012 - 01:56 AM



#13 Espen

    Curious Explorer

  • Members
  • 708 posts

Posted 24 February 2012 - 02:27 AM

Seeing them devouring the earth somehow reminds me of the Langoliers.^^

#14 Cruor

  • Members
  • 413 posts
  • LocationNorway

Posted 24 February 2012 - 01:58 PM

what do i need and how do i use your pathfinding? i was planning to make it myself, but acces to realworld coords is going to be helpful :huh:/>

#15 Cookiebal

  • Members
  • 82 posts

Posted 24 February 2012 - 03:18 PM

Movement system released!
You will need three files for this. The pervarapi, the movementapi, the pathfinding program and the waypoint program! You'll also need to configure the starting coords and orientation.

First, the edited pervarapi. (path is a bit different)

Spoiler

Next, the movementapi, which you should name "movecoordapi" (either that or change the shell.run stuff in the other programs)

Spoiler

The pathfinding program!

Spoiler

And the followwaypoints program

Spoiler


If you don't want to edit anything in the programs, name them "pervarapi", "movecoordapi", "pathfinding" and "followwaypoints".


Now you'll need to make the tiny files and a folder.

First create a folder named pervar and go in there.
In that folder you'll need to make 7 files.
"coordx.txt" put the turtle's x coordinate (f3) in there.
"coordy.txt" put the turtle's y coordinate (f3) in there.
"coordz.txt" put the turtle's z coordinate (f3) in there.
"currentface.txt" put the orientation in there, look in the same direction as the turtle and check F3, under the coords it says "f: " and a number. You need to put that number in there (should be either 0,1,2 or 3). It's south, west, north or east, but in number form.
"gotox.txt" just leave it empty.
"gotoy.txt" just leave it empty.
"gotoz.txt" just leave it empty.

Now, outside the pervar folder, in the root (where you placed all the other stuff) you make one last file called "waypoints.txt".
That is the one you'll need to edit to put in the coords where the turtle goes to when you run followwaypoints. To use it you must enter each waypoint coordinate on a different line with this format: x,y,z no brackets or anything.
Like this:
-194,105,-24
-210,100,-43
If that is in the waypoints.txt then when you run followwaypoints it will first go to x:-194, y:105, z:-24 and then x:-210, y:100, z:-43. This is so you can easily use sky travel (tell the turtles to go via a high Y to avoid terrain obstacles which the turtles can get stuck in.


In your turtle folder it should look something like this:
Posted Image

#16 coolblockj

  • Members
  • 84 posts

Posted 24 February 2012 - 05:36 PM

The error i keep getting with this cookiebai is:
pathfinding:117: attempt to call nil

#17 Cookiebal

  • Members
  • 82 posts

Posted 24 February 2012 - 07:01 PM

Strange, especially since line 117 is a function where it doesn't even call anything.

I just follow all the instructions on a new turtle, and it worked.
Try installing again and make sure you copypaste everything properly and the file extensions are correct.

#18 cybervico

  • New Members
  • 3 posts

Posted 25 February 2012 - 10:48 AM

I have an error too when I try to run your followwaypoints program. This is the error : "followwaypoints:7: attempt to index ? (a nil value)"
Please if you could help me.

#19 Cookiebal

  • Members
  • 82 posts

Posted 25 February 2012 - 11:14 AM

Make sure that your waypoints.txt file is called waypoints.txt and that there is a coordinate in it.

#20 cybervico

  • New Members
  • 3 posts

Posted 25 February 2012 - 11:44 AM

I join all the prints screens
I have coordinates in the waypoints.txt

The coordinates:
-209,73,190
-209,75,207


I have the coordinates in coord files:
-coordx : -207
-coordy : 75
-coordz : 205
-currentface : 2

Attached Image: turtle.png

Attached Image: pervar.png

Attached Image: waypoints.png

Attached Image: coordx.png





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users