Hello I am working on the PC version of TwoStep since some time.
This is the thread for it.

The PC version will have the same textures as the Android version, but will be entirely different from the Android one.
The PC version is written in C# and C++ and builds ontop of the SFML Framework. The Levels are written in Lua and are JIT-compiled at runtime.

You can download the latest versions here (try both; only one will work; e.g. i386 works for me on my intel i3 (64 bit processor + 64 bit windows 7) but amd64 not)

Downloads of version pa-150412b:

Windows (amd64)
Windows (i386)
For the Lua level integration:
ATM you can replace default functions with your custom lua functions and be able to receive all sorts of events and stuff.
So basically you can make a level with no code, but only a Init() function that loads the level data.
But you can also override all default functions and do all sorts of things and manipulate the whole environment.

Heres some sample level code I wrote (I originally made this sample for codewalrus, thats why I made the walrii easter egg on pressing W):

Code:
-- Main.lua
-- Level file sample

function Init()
   -- Create Map object
   Map = TwoStep.Game.Map();
   
   -- Load the assets
   PortalIn = Engine.TextureManager["Tile::Portal:In"];
   PortalOut = Engine.TextureManager["Tile::Portal:Out"];
   
   -- Populate the map
   Map.Tiles:Add(TwoStep.Tiles.Void(PortalOut, TwoStep.Game.Position(0, 0)));
   Map.Tiles:Add(TwoStep.Tiles.Void(PortalOut, TwoStep.Game.Position(1, 0)));
   Map.Tiles:Add(TwoStep.Tiles.Void(PortalIn, TwoStep.Game.Position(0, 1)));
   
   -- Create counter variable
   a = 0;

   -- Create the two player objects
   Girl = TwoStep.GameObjects.Girl(Engine);
   Boy = TwoStep.GameObjects.Boy(Engine);
   
   -- Helper vars
   Character = "Boy";
   ActionPending = true;
   WalriiEnable = false;
   Random = clr.System.Random();
end

function Update(delta)
   -- Update stuff
   
   -- Do some fun with the engine
   a = a + 1;
   if a == 75 then
      Engine:Window:SetTitle("Lua Rulez!");
   end
   if a == 100 then
      Engine:Window:SetTitle("Yeah!");
   end
   
   if ActionPending == true then
      if Character == "Boy" then
         Engine:Screen.Player = Boy;
      elseif Character == "Girl" then
         Engine:Screen.Player = Girl;
      end
      ActionPending = false;
   end
   
   if WalriiEnable == true then
      local newX : float = Random.Next(0, Engine:Window.Size.X);
      local newY : float = Random.Next(0, Engine:Window.Size.Y);
      WalriiSprite.Position = SFML.Window.Vector2f(newX, newY);
   end
end

function Draw(target, delta)
   Map:Draw(target);
   
   if WalriiEnable == true then
      target:Draw(WalriiSprite);
   end
end

function KeyDown(args)
   -- Keypress
   if args:Code == "Escape" then
      TwoStep.Core.Logger.LogInfo("Lua", "Esc pressed :)");
      Engine:Shutdown();
   end
   
   if args:Code == "Return" then
      if Character == "Boy" then
         Character = "Girl";
      else
         Character = "Boy";
      end
      ActionPending = true;
      
      TwoStep.Core.Logger.LogInfo("Lua", "Changed character to " .. Character);
   end
   
   -- Walrii Easter egg
   if args:Code == "W" and WalriiEnable == false then
      TwoStep.Core.Logger.LogInfo("Lua", "Walrii...");
      local wc = clr.System.Net.WebClient();
      
      TwoStep.Core.Logger.LogInfo("Lua", "Downloading walrii...");
      local walriibytes : byte[] = wc.DownloadData("http://img.codewalr.us/walrii.png");
      TwoStep.Core.Logger.LogInfo("Lua", "Download complete!");
      TwoStep.Core.Logger.LogInfo("Lua", "Generating sprite...");
      local WalriiTex : SFML.Graphics.Texture = TwoStep.Utils.TextureTools.TextureFromByteArray(walriibytes);
      WalriiSprite = SFML.Graphics.Sprite(WalriiTex);
      TwoStep.Core.Logger.LogInfo("Lua", "Generation complete!");
      WalriiEnable = true;
      TwoStep.Core.Logger.LogInfo("Lua", "Walrii done!");
   end
end
We are in alpha now!

Download the update here:
amd64
i386

Screenshot:


Changes:
- Redone tile interface
- Added TileCollection class
- Added Void block
- Added Solid block
- Added Portal block
- Fixed many bugs and issues
- Cleaned up code
- Optimized the lua routines
- Tiles now check if step is valid
- Tiles are now updated (animations possible)
- Speed improved
- Dynamic background added
- Broke whole tile api compatibility, but it is worth it
- Many conversion functions
- More unlisted improvements and additions
Wow, that's really cool stuff!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement