Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Roland Chastain

Pages: [1]
1
Pulsar2D / Porting a LÖVE project
« on: 14. July 2016, 19:56:23 »
Hello!

I made a chessboard with LÖVE and would like to port it to Pulsar2D.

Here is where you can find the LÖVE project:
http://www.eschecs.fr/lua.html

I wonder how to start. I would like to get advices. In the meanwhile I begin to study Pulsar2D Lua examples.  :)

Best regards.

Roland

2
EGSL / First impression
« on: 03. March 2014, 12:49:13 »
Hello gentlemen !

I have just discovered EGSL, and I would like to congratulate the author. I tested it under Windows 8. The IDE is simple, clean and easy to use. The examples are nice (I mean the code and also the result).

The only correction I would wish to see in a future release, is that the IDE would remember the last directory opened. (I saw that another user already complained about that.)

Here is a Lua script of mine, quickly adapted to EGSL. :)

Code: [Select]
--------------------------------------------------------------------------------
-- Nom du fichier : oudin.lua
-- Date de Pâques par l'algorithme d'Oudin
-- Roland Chastain 26/02/2014
--------------------------------------------------------------------------------

function div(a, b)
  return math.floor(a / b)
end

Y = os.date("*t").year

G = Y % 19
C = div(Y, 100)
C4 = div(C, 4)
E = div(8 * C + 13, 25)
H = (19 * G + C - C4 - E + 15) % 30
K = div(H, 28)
P = div(29, H + 1)
Q = div(21 - G, 11)
I = (K * P * Q - 1) * K + H
B = Y + div(Y, 4)
J1 = B + I + 2 + C4 - C
J2 = J1 - 7 * div(J1, 7)
R = 28 + I - J2

--[[
if R < 32 then
  D = R
  M = "mars"
else
  D = R - 31
  if D == 1 then
    D = "1er"
  end
  M = "avril"
end

print("En " .. Y .. ", le dimanche de P" .. string.char(131) .. "ques est le "
  .. D .. " " .. M .. ".")
]]

-- EGSL

if R < 32 then
  D = R
  M = 3
else
  D = R - 31
  M = 4
end

screen(320, 200, 0, "Date of Easter")
backcolour (0, 0, 0)
cls()

loadmonofont("monofonts/Courier New Regular 10.bmp")
colour(255, 255, 255)
monotext(0, 0, "Current year : "..Y)
monotext(0, 15, "Date of Easter : "..os.date("%m/%d", os.time{year=Y, month=M, day=D}))
sync()

inkey()
closewindow()

P.-S. The games (Astrorocks, Brickmaster and Wallman) are really beautiful.

Pages: [1]