Coder Social home page Coder Social logo

turtleminer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

turtleminer's Issues

Formspec Icons

The formspec is getting better and better, with more and more functionality. However, many of the icons used in the formspec are very high quality, making them look very out of place. The most notable example being the dirt block, which is way to high quality, and quite frankly, looks bad. These textures should all be much lower quality, so that the individual pixels can be seen, much like any other texture in the game.

I feel the same way about the turtle texture, that it is far too high quality. Textures should typically be 16x16 and at most 32x32 for the nicest appearance.

If you are willing to make the change, I'd be happy to provide textures.

Add mod.conf such that cloning from github directly works

I suggest adding a mod.conf, which is a file that... as far as I know, does nothing but let you specify the name of the mod to minetest, otherwise it tries to use the directory name as the mod name. When Minetest attempts to guess the mod name with TurtleMiner, it gives an error because of the capital letters in the directory name. Adding a file called "mod.conf" containing "name = turtleminer" (no quotes of course) would make directly cloning the repo into the minetest mod directory easier.

See this example of mod.conf from another mod.

Make turtles consume fuel

I suggest adding option of making turtles consume fuel, such as coal. Each action could cost a certain percentage of the fuel, after which the user would have to add more. This would make it a bit better balanced IMO for non-creative worlds. Turtles could even autonomously refuel themselves maybe by digging coal blocks.

Formspec Improvements

  • new buttons for the new features - may be a better similar design for all of them
  • rearrange the buttons make the formspec as small as possible
  • add an inventory, that can be opened with a button on the remote-formspec
  • the inventory should behave like a chest and you can drag and drop items between turtle and you own inventory

Don't work with Minetest 5.2

Screen became grey when placing and digging a block

2020-06-01 15:39:08: ACTION[Server]: singleplayer places node turtleminer:tech_turtle at (-730,3,240)
2020-06-01 15:39:21: ACTION[Server]: [TurtleMiner] singleplayer moves building_blocks:grate to turtle inventory at (-730,3,240)
2020-06-01 15:39:26: WARNING[Server]: Undeclared global variable "nodeupdate" accessed at ...est-5.2.0-win64\bin..\mods\TurtleMiner-master/t_api.lua:506
2020-06-01 15:39:26: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'turtleminer' in callback on_playerReceiveFields(): ...est-5.2.0-win64\bin..\mods\TurtleMiner-master/t_api.lua:506: attempt to call global 'nodeupdate' (a nil value)
2020-06-01 15:39:26: ERROR[Main]: stack traceback:
2020-06-01 15:39:26: ERROR[Main]: ...est-5.2.0-win64\bin..\mods\TurtleMiner-master/t_api.lua:506: in function <...est-5.2.0-win64\bin..\mods\TurtleMiner-master/t_api.lua:495>
2020-06-01 15:39:26: ERROR[Main]: ...est-5.2.0-win64\bin..\mods\TurtleMiner-master/t_api.lua:52: in function 'run'
2020-06-01 15:39:26: ERROR[Main]: ...est-5.2.0-win64\bin..\mods\TurtleMiner-master/t_api.lua:165: in function 'on_receive_fields'
2020-06-01 15:39:26: ERROR[Main]: ...est-5.2.0-win64\bin..\mods\TurtleMiner-master/t_api.lua:235: in function <...est-5.2.0-win64\bin..\mods\TurtleMiner-master/t_api.lua:232>
2020-06-01 15:39:26: ERROR[Main]: ...is\minetest-5.2.0-win64\bin..\builtin\game\register.lua:429: in function <...is\minetest-5.2.0-win64\bin..\builtin\game\register.lua:413>

Programming the turtle

I've made a custom primitive programming language and successfully used it for maidroids: https://github.com/HybridDog/maidroid
https://github.com/hybriddog/pdisc
I tried to make it resemble assembler, you can use mov to assign/copy values to variables, there are neither if statements, nor loops, you need to do it manually using jmp (conditional jump).
If statements and while and for loops don't represent the basic possibilities of programming, they're changed to conditional jumps when compiling.
A visual editor should be easy to implement for this simple language.
Here's an example program for maidroids:

call init
mainloop:
	call make_frames
	mov target.z, buildpos.z
	sub target.z, 3
	call walkz
jmp mainloop

; changes the "maidpos" and "buildpos" fields
init:
	setyaw 0
	getpos $maidpos
	copytable $buildpos, $maidpos
	add buildpos.x, 0.5
	floor buildpos.x
	add buildpos.y, 0.5
	floor buildpos.y
	add buildpos.z, 0.5
	floor buildpos.z
ret

; uses "target.z"
; changes "maidpos.z"
; taints "stop_walk" and the "vel" fields
walkz:
	setwalk 2
	walkz_loop:
	getpos $maidpos
	mov stop_walk, target.z
	sub stop_walk, maidpos.z
	less stop_walk, 0
	jmp finished_walk, stop_walk
		sleep 0.5
		getvelocity $vel
		equal vel.z, 2
		jmp walkz_loop, vel.z
		print $don't stop me
		flush
		setwalk 3
		jmp walkz_loop
	finished_walk:
	setwalk
ret

; uses the "buildpos" and "maidpos" fields
; changes buildpos.z
; taints "near_enough", "dist" and the "pos" fields
make_frames:
	mov dist, buildpos.z
	sub dist, maidpos.z

	jump; demo

	make_frames_loop:
	mov near_enough, dist
	less near_enough, 5
	jmp one_more_frame, near_enough
	ret
	one_more_frame:
		copytable $pos, $buildpos
		call make_frame
		inc buildpos.z
		inc dist
	jmp make_frames_loop


; uses the "pos" fields
; taints the "pos" fields
make_frame:
	mov hole, pos.z
	mod hole, 2
	equal hole, 0

	; floor
	dec pos.y
	call place_if_needed

	; right wall
	inc pos.x
	inc pos.y
	call place_if_needed
	inc pos.y
	jmp frame_no_wallright, hole
		call place_if_needed
	frame_no_wallright:

	; ceiling
	inc pos.y
	dec pos.x
	call place_if_needed

	; left wall
	dec pos.x
	sub pos.y, 2
	call place_if_needed
	jmp frame_no_wallleft, hole
		inc pos.y
		call place_if_needed
	frame_no_wallleft:
ret

; uses "nodename"
; changes "walkable"
; taints the "def" fields
is_walkable:
	get_nodedef nodename, $def
	jmp node_known, nodename
	jmp unknown_node
	node_known:
	mov walkable, def.walkable
ret

; uses the "pos" fields
; taints "nodename", "placing_problem" and a few "pos" fields
place_if_needed:
	get_node $pos
	mov nodename, pos.name
	call is_walkable
	jmp no_placement_required, walkable
		mov placing_problem, $pos
		place placing_problem, errormsg
		sleep 0.03; for demonstration purpose
		neg placing_problem
		jmp placing_error, placing_problem
	no_placement_required:
ret

; jumped to on error
unknown_node:
	print $unknown node detected at, pos.x, pos.y, pos.z
	jmp end

placing_error:
	print errormsg
	jmp end

end:

Create a cool looking turtle!

Is anyone able to create in blender a nice turtle with feet and head, mostly green, a bit like a block but even a bit rounded.

The turtle should become look more and more "intelligent" as the turtle learns more and more (or better the owner/user learns )

  • First turtle with no additional things
  • A turtle connected to a remote control with something like an aerial to have contact to the turtle
  • A turtle that can dig with a pickaxe
  • A turtle that has got an inventory with a backpack
  • ...

You should add some features or just change the textures to show the the turtle learned

Crash when attempting to access turtle inventory

Right clicking on turtle, and selecting 'inventory' button, results in Minetest window becoming a blank grey screen.

Log snippet:

2017-01-22 08:13:07: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'turtleminer' in callback on_playerReceiveFields(): /home/avril/. minetest/mods/turtleminer/t_api.lua:149: attempt to index local 'turtle' (a nil value) 2017-01-22 08:13:07: ERROR[Main]: stack traceback: 2017-01-22 08:13:07: ERROR[Main]: /home/avril/.minetest/mods/turtleminer/t_api.lua:149: in function 'on_receive_fields' 2017-01-22 08:13:07: ERROR[Main]: /home/avril/.minetest/mods/turtleminer/t_api.lua:235: in function </home/avril/.minetest/mods/turtleminer/t_api.lua:232> 2017-01-22 08:13:07: ERROR[Main]: /usr/local/share/minetest/builtin/game/register.lua:412: in function </usr/local/share/minetest/builtin/game/register.lua:392> 2017-01-22 08:13:07: ACTION[Server]: Portals for player singleplayer changed, writing to file 2017-01-22 08:13:07: ACTION[Server]: singleplayer leaves game. List of players: 2017-01-22 08:13:07: ACTION[Main]: Triggering shutdown cache to file write check

Prevent Breaking of Unbreakable Blocks

I hope the name " show-jumping course " is translated correctly?
The idea is that there should be blocks that can be used to give some exercises and that are not diggable by the turtle. One that is transparent and one that is not transparent.

There are two ways to solve this problem:

  • define some of the default blocks that are not diggable (diamond, obsidian, obsidian-glass...)
  • create two new blocks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.