Haciendo jueguecitos con TIC80

TIC80 es la implementación libre del famoso pico-8, tiene soporte para múltiples plataformas(android,linux,raspberry,nintendods) y nos ofrece todo lo necesario para hacer nuestros jueguecitos en su versión gratuita, tiene una versión de pago donde ofrece otras características adicionales.

TIC80 nos ofrece en su interfaz unas características muy similares a pico-8(editor de sprites, editor de mapas, sonidos sfx,música..) el código en el que tenemos que escribir nuestros juegos es LUA un lenguaje de scripting muy popular usado en múltiples juegos libres como minetest,0AD,battle of wesnouth y no tan libres como la popular plataforma roblox.

 

 

He hecho un pequeño ejemplo rápido y chorra para que  lo podáis ver, tenéis el código más abajo.

object={}
object.x=104
object.y=14
final={}
final.x=232
final.y=26
player={}
player.x=64
player.y=98
lives=5
enemy={}
enemy.x=50
enemy.y=50
enemy.speed=1
SCREEN_X=100
SCREEN_Y=100
GAMEOVER=false
LEVELUP=false


function collision(spr1,spr2)
if spr1.x==spr2.x and spr1.y==spr2.y  then
      	return true
     end
end
function update_lives()
print("vidas: "..lives)
if enemy.x==player.x and enemy.y==player.y then
lives=lives-1
 if lives<=0 then lives=0 GAMEOVER=true --print("GAMEOVER",color==12,20,20) end end end function move_player() if btn(0) then player.y=player.y-2 end if btn(1) then player.y=player.y+2 end if btn(2) then player.x=player.x-2 end if btn(3) then player.x=player.x+2 end if enemy.x > player.x then
 		enemy.x=enemy.x-1
 end
 if enemy.x < player.x then enemy.x=enemy.x+1 end if enemy.y > player.y then
  enemy.y=enemy.y-1
 end
 if enemy.y < player.y then
 	enemy.y=enemy.y+1
 end
 enemy.speed =enemy.speed+ 0.0001
end

function level_up()
if LEVELUP==true then
cls(0)
print("NIVEL COMPLETADO",color==12,20,20)
end
end

function gameover()
if GAMEOVER==true then
cls(0)
print("GAMEOVER",color==12,20,20)
end
end

function TIC()
	cls()
	map(0,0,SCREEN_X+1,SCREEN_Y+1)
	spr(257,player.x,player.y)
	spr(256,enemy.x,enemy.y)
	j=move_player()
	t=update_lives()
	y=gameover()
	k=level_up()
	--print (player.y)
	--print (player.x)
	if collision(player,object) then
	print("Exclusa activada,",color==10,20,20)
	enemy.x=400
	end
	if collision(player,final) then
	LEVELUP=true
	end
end

 

Asi que ya sabeis que quereis hacer jueguecillos con estetica pixelart no teneis excusa.

Hapyy Gamming ;)

Compartir

1 Comentario

Deja una respuesta a fanta Cancelar respuesta

Your email address will not be published. Required fields are marked *