Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 02/11/2019 in all areas

  1. 1 point
    Back in the mid-90's, my brother created what he called an "action MUD". He called it "Paintball Net". PBN used ANSI text terminal commands to create a combined roll-and-scroll and animated text experience. ! (exclamation points) were trees, _ (underscores) were grass, ^ (up carets) were mountains, and more. Your "avatar" was a "Y" (uppercase y) and enemies were * (asterisks). You used MUD-like commands to move around the world and target your paintball gun and buy and sell and more. I wish I had a screenshot of what the first version looked like, but you'll just have to imagine. šŸ˜ƒ He asked me to create the GUI for the game. That was 1996, and I had just purchased Delphi 2 and wrapped up my first "learn Delphi" project. This sounded like a good next step, and "PBTerm" was born. I *do* have screenshots of that. Oh, yeah. Love those 16-color Windows graphics. šŸ˜ƒ During the years it was online, the game evolved and upgraded to look more like this: We were never going to win any awards, but we had a very devoted player community. šŸ˜ƒ Paintball Net was online from the summer of 1996 through the summer of 2000, when we took it offline to focus on other projects. The game was never huge, but we had thousands of players come through over that period. And since then, every year at least a few of the players have reached out and asked/begged/pleaded/demanded if we were going to put it back online. There really wasn't much chance of the original version going back online. The original server, written in ANSI C for Linux had proven rather fragile, and was a big part of why we took the game offline. It was taking hours every day just to keep it up and running, in addition to time spent managing the community of players. On top of that, a hard drive incident in 2008 had cost me the source code of a number of core third-party/modified components for PBTerm. This past summer, though, I realized I might be able to make the game live again using Smart Mobile Studio. I would do a straight port of the ANSI C server to Smart Pascal using Node.JS and WebSocket, and I would rebuild the PBTerm client as a browser-based client. I'm not going to say it was *easy*, but it has been a lot of fun. ANSI C converts to Pascal without a lot of painful gyrations. And Node.JS seems a LOT more flexible, stable, and powerful than the TCP sockets approach we were using before. Also, game development is a lot easier when you already own all the graphic and audio resources. šŸ˜ƒ This is the server "in action"... Recreating the client has been more complicated. 20+ years of Delphi habits had to be adapted to the new reality of SMS and a browser-based UI. But that's coming together too. It might be obvious, but I'm not targeting this game at mobile. Paintball Net needed a mouse and keyboard in 1996, it's gonna need a mouse and keyboard in 2018. Also, I've made as few modifications to the gameplay as possible. I really wanted to bring back the original as much as I could. Today I got the handful of sound effects integrated, which was easier than I expected. I'm planning to start testing soon. I just need to line up a server to use and find a few volunteers. I'm excited. This would never have happened without Smart Mobile Studio. So I figured I would share. Merry Xmas! -David
  2. 1 point
    lynkfs

    Mixing Javascript and SMS

    Example 2 : see below (first post in that thread) for some function call examples Example 1 : depends on what attribute. In your example you want to manipulate the visibility property of a button. These types of properties usually are mapped on a property or attribute of the underlying DOM-element. In this case you could use the style element visibility : W3Button1.handle.style.visibility := 'hidden' / 'visible'. 'handle' is the doorway between object pascal on the left hand side and the dom on the right hand side. No need for an asm block here. you can go the other way too : var x : variant := W3Button1.handle; asm console.log((@x).style.visibility); end; but you can't directly manipulate the properties of an object pascal object, as in asm @W3Button1.Visible = true Of course you can do some conditional js coding and execute object pascal code (like W3Button1.Visible := true;) depending on the return outcomes. Out of habit I suppose I try to minimise the use of asm blocks (although there is nothing wrong with using them). The only times I have to use them if a js object doesn't have a create constructor but instead can only be instantiated by the 'new' keyword var formData : variant; asm @formData = new FormData(); end; //from here all methods and attributes of the js object are accessible outside an asm block formData.append("userfile", EditBox1.handle.files[0]); or wrapping a js function. (you can set @result in an asm block)
  3. 1 point
    Yes. they removed the VarIsValidRef method. hum, at the System.types unit, there's a helper class TW3VariantHelper where lives a method Valid. if TW3VariantHelper.Valid(str) then ; I would prefer a global big unit with all methods instead of helper class approach.
  4. 1 point
    warleyalex

    Component styling

    Thanks for the components LynkFS. I have found this insertRule a useful technique, especially in prototyping. I just grab LynkFS SMS_MDL_Components and wrapped this set of MDL components and ended up put them on SmartMobileStudio IDE, and looks nice indeed. I've created a very simple projMDL with a set of MDL components. Iā€™m a little skeptical of the claim that adding rules to the stylesheet is more efficient rather than CSS lazy loading by inserting it in the DOM nodes. I didn't tested a lot. I think using this approach it will create some kinda penalties like browser reflows issue and is difficult to debug injected styles. I prefer implementing insertCSS procedure into the initialization scope instead of the ObjectReady scope, for instance, if we drop two TButtons into designer, I suspect on form load, will inject the same CSS twice (rerunning) on the entire document. I don't know if injecting dynamically styles is faster in some specific cases, in particular mobile environments.
×