Fengist's Forum Posts

  • With the future of Construct being very open now that 3's runtime has surpassed 2's, I'm personally optimistic for a shift from game engine to "experience engine" that truly embraces HTML5+.

    This is real blue sky optimism, but would open the engine up in ways suggested above.

    As an aside, Ashley and Tom recently hinted on a great game dev podcast that there was possibly a change coming to C3 this year that would reinvent how developers use the product.

    One of the problems with C3 is that Ashley and Tom have always focused on the 2D aspect of the engine. They assume that platformers and other retro style games is what C3 should do. While those games do sell on the market, C3 can and could do a lot more. For example, in C2 I wrote teleprompter software for Android devices. While it did work and work well, Google kinda screwed me over on placement and I never could get them to fix it, thus, it never sold. But, it was a concept to prove, at least to me, that Construct could build working apps and not just games.

    Point is, Construct can handle multiple genres of games including HTML5 browser games like Grepolis. The biggest problem to making those kinds of games in Construct is the woeful lack of controls. If for example, you wanted to create a scrolling list box of items, it becomes a nightmare to create and manage. In other IDE's like C# and Delphi, they're easy drag and drop items. Even Unity has a host of plugins developed to make a listbox an easy thing.

    With those form type elements, C3 could be a lot more than just be a game engine.

  • In game ads work only with Flash games, which is basically useless these days.

    Since web site ads are basically html, something could be worked out to add them to Construct games.

    You can do it right now if you use iFrame to display them, but there should be a better solution.

    And they do have separate mobile ads I think, you do not get access to those unless you sign up specifically for them.

    I don't know if this would work but there is a plugin HTML Element: construct.net/en/make-games/addons/190/html-element

    This plugin essentially allows chunks HTML5 to be incorporated into C3 with full JS and CSS without having to pull in a full page in an iframe. One of the cool features is, you can use JS onclick events to call CS functions and pass parameters. At present I have a working HTML 5 menu (even with mouse-over events) that easily switches C3 layouts.

    I'm guessing that with some PHP backend and Ajax calls that pretty much any HTML can be integrated with C3, including advertisements.

  • Kinda curious if anyone has had any luck with Patreon, or similar services.

    Seems like it might be better than Kickstarter, or Gofundme.

    Especially if supporters are giving feedback.

    I tried this and I have lost all faith in humans. Once upon a time, I modded for a game. Over the years, I spent hundreds and hundreds of hours writing code in C#, plugging all that into Unity, creating 3D models, texturing, making videos, etc. Over 100,000 downloads of just one mod which was always in the top 30 out of 2,100+ mods in popularity. Thousands of downloads of other mods for the same game. All of the forum posts for the mod were linked to a Patreon account and the forum thread for the big mod had well over 100,000 views.

    My donations? $1.00 in Patreon + around $50.00 in PayPal donations.

    I've stopped modding because I'm of the opinion now that if you can't or don't somehow twist people's arm into 'donating' they won't. They'll go out and chuck $5.00 into a really crappy cup of coffee. Donate a stinking $1 willingly? Well yes, there are some games that have succeeded at that. They're few and far between. I'm personally not going to be that stupid any more. If I invest my time and energy creating entertainment for someone else (especially when it benefits another game company's bottom line) I expect to be compensated with more than just someone clicking a stoopid like button on a forum.

    My next attempt will be most likely a freemium model.

    (Can you tell I'm a tad salty about the topic of people donating for entertainment?)

    <--- the like button is there. Feel free to click it on these forums as I'm not selling anything yet.

  • And there's one more comment that needs to be made when considering writing any software, game or otherwise, profitable or not, and this is from someone who has a somewhat successful shareware product on the market (written in Delphi).

    Creating any piece of software to do what you want is relatively easy.

    Creating a piece of software that's idiot proof is almost impossible.

    In working on my next creation I've spent weeks on just the login and registration process trying to consider all of the things people can possibly put in text boxes that would cause issues. Don't ever assume that the end user will use the software exactly as you expect, because they won't.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • As I see it, making a living off creating any game using any engine (C3, Unreal, Unity, etc.) is entirely possible, even as a solo indy dev. I'm aware of one game that is pure HTML that the owner was claiming to make $750 a month off Google advertisements alone.

    Whether it's possible or not isn't the question. The proper question is HOW to make a living off any game.

    There are a number of approaches as to how to earn a living. Dwarf Forest went for years with two brothers making a living off of crowdfunding alone. It's now been accepted into Steam and will likely rocket beyond it's previous income.

    Placing your game on any host type service (Google Play, Steam, Epic, etc.) is probably a good idea but then, you get buried in the thousands of other games in those services. The two brothers from Dwarf Forest focused on one game for years and constantly added to and updated it before going for the Steam platform. Their approach was one product focused on one specific segment of the market.

    Other gaming companies go for the shotgun approach. Lots and lots of games that are quick and easy to develop with each one making a small income. Or, one game with lots of players making small incomes off of some of them. The CEO of World of Tanks once said he'd rather have a million players occasionally paying a few dollars rather than a hundred players paying every month. This strategy created a huge player-base that helped him advertise the game. The thing you have to worry about there is an old sales adage: A happy customer will tell a friend, an unhappy customer will tell 10 friends.

    In the world of gaming you either make loads of cheap, pink bubble gum and sell tons of it it for a few pennies each or, you make designer bubble gum in a pretty package and sell a lot less for a lot more.

    So, the first decision is, a focused approach to a limited market making money off all of them (subscriptions) or, a broad approach to a wide market and making a few bucks off of some of them (in game purchases).

    Regardless of how you make money, the key to any games success is multi-fold. Foremost, you need a game that entertains people. Most game dev's create a game for their own liking. What they forget is they aren't in the game-making business, they're in the entertainment business. You game needs to be entertaining. If it's not fun, people won't keep playing it.

    Nextly, it needs to be engaging. You don't want people completing the game in a few hours. They'll consider themselves to have won and will quickly look for another game to beat. The longer you entertain people, the better the odds of you earning an income.

    The BIGGEST key to any games success is marketing. And I don't just mean buying ads on Google. By that I mean getting the word out and in the proper channels. For example. Albion Online just went free to play. If you look at the Steam charts prior to f2p it had around 400-600 players. Two days after going f2p it had 10,000 players. Their marketing team blasted out press releases to all of the major game review sites prior to going f2p and many of them picked up on that story. As a result, Google News grabbed those stories and showed those news articles to people who are interested in gaming (like me). As a result, I saw it and I decided to go play (and subscribe for a month). There are gobs of ways to market your game for free. Journalists who write stories about gaming love it when their job is made easy by press releases. It means they don't have to go digging for a story.

    If you want your game to succeed you need to promote it. Mark Twain once said that the perfect place for a spider to build a web is in the doorway of a business that doesn't advertise. In today's flooded game market, that's even more true. It does no good to create a game if nobody knows that it exists.

    So, as I see it, those are a few of the things you have to consider when creating a game and making it profitable. It's more than just writing code. Construct is a great gaming engine with lots of possibilities and flexibility and the potential to make a living is definitely there. And the ability to create entertaining, captivating games is there.

    Creating the game though is only part of the equation.

  • Did you actually add parameters to the function ? This is an additionnal step that you did not have to do before. Right-click on the Function event, and "Add parameter".

    That was what I was missing. Wow, ok. Thanks.

  • Inside your function event, you'll have access to your parameters as expressions directly under System > Global & Local variables.

    I still don't get it. That's what I was doing before.

    If inside the function I select system.setvalue, in the variable list I get all of my global vars which I'd expect. But in the value, there's no way I see to add in either function.param(0) or anything with the function name.

    With the old way, I could set a global to function.param(0). Now, function doesn't appear in the list nor does the function name appear in the list and gives an error when trying to set it.

    What am I not seeing here???

  • New function's parameters are treated as local variables.

    I don't get it, you mean an instance variable? How do you get the value of one?

  • Prior to the new functions I could use System and set a global variable to the Function.Param(0).

    Now, I can't.

    So what's the new method for getting the parameter of a called function???

  • Not sure if he's still around but years ago there was a guy claiming to be making a living off it. His methods were a bit 'dodgy' which is why I never looked into them.

    Basically, he would buy C2 games off of some trading website for little or nothing, reskin them and then, resell them on the same site. He also wrote a book on how to do it and was trying to sell it here on the forums.

    Whether that worked and was profitable or not is another question.

  • So far, I haven't run into any issues with the HTML Element. If you have found bugs I know that less than a month ago I know that el3um4s was responding to issues on the GitHub page. Try reporting them.

    My forte is PHP. I can read JS and if someone beats me severely I can probably write code in JS so I can't comment on React/Preact.

    I like your idea of using a div to hide the content. I'v been trying to come up with a way to make a message box work well. That might do.

    As for positioning, yea. Construct may work well when resizing games but I personally hate the letterbox black bars on the sides. I've already got absolute positioning in place with a function and in all of the layout startup.

  • What defenitely should work is setting the CORS origin to a wildcard

    header("Access-Control-Allow-Origin: *);

    This will allow access from ANY source. A little note from the W3 wiki:

    Agreed, this wildcard CORS should always work for C3 Ajax calls and for brief testing runs it should be fine. You don't want it set to that for any releases. The small script I posted earlier in this thread will allow for requests from multiple sites without opening requests up to everyone (something CORS doesn't do without help). The trick is, to find out what origin is accessing the script in the first place.

    To find out use this script:

    $http_origin = $_SERVER['HTTP_ORIGIN'];

    $myfile = fopen("origins.txt", "a") or die("Unable to open file!");

    fwrite($myfile, $http_origin."\n");

    fclose($myfile);

    header('Access-Control-Allow-Methods: "POST"');

    if ($http_origin == "https://preview.construct.net" || $http_origin == "https://www.myserver.com")

    {

    header("Access-Control-Allow-Origin: $http_origin");

    }

    In theory, when C3 does an Ajax call to the php script it will create or append to a text file on the server called origins.txt. In that text file will be the origin of the requester. Once you have a proper origin name, you can add it to the script like this:

    if ($http_origin == "https://preview.construct.net" || $http_origin == "https://www.myserver.com" || $http_origin == "https://www.anotherorigin.com")

    Once you get the origin from the text file, you can comment out these 3 lines until you need them again:

    //$myfile = fopen("origins.txt", "a") or die("Unable to open file!");

    //fwrite($myfile, $http_origin."\n");

    //fclose($myfile);

    This will allow you to have multiple origins as being valid without opening the script to the entire planet with the wildcard.

  • Thanks again Fengist for the extra information.

    I will try out what you said and see how I go.

    One other question: Does the CORS exception work the same from a desktop version (nw.js) of a construct project? I know you mentioned that it was probably possible. I'm just asking for better clarification because my game will be a desktop game.

    Well, I can't say for certain but I can tell you this:

    When I run the editor as an app it uses the construct.net as it's website. Since I work mostly on HTML5 exports, I can't really answer that. Once thing you can do to experiment is to take the $http_origin = $_SERVER['HTTP_ORIGIN'] and save that to a file on the server every time the php script is run. That should tell you what the scripts see as the origin.

    If this doesn't work then you're options are going to be a good bit more limited. You're going to have to work with websockets to exchange data. I've played around with one called Fleck which is written in C# and I have gotten C3 to exchange data with a Fleck server. There are a number of other websocket frameworks out there to play with. I've briefly looked into using the C3 multiplayer plugin to exchange data but it has one huge drawback, the server is just another client, and it has to be the first client in a 'room' for every other client to log into it.

    But, websockets come with a whole new level of programming and security.

  • Hi,

    I'm developing a full-fledged website to support my game. Including all kinds of views from login/registration, leaderboards, chat, etc. Basically, the game itself is just a component on a page.

    I would prefer to integrate deeply the game into the overall webpage. By this I mean, to have the login and all the details listed before handled by a proper web framework and have Construct to run only the game (it's a board game, like chess). How would you integrate such a setup with a Construct3 game?

    I'm working on a browser based game using Construct as the engine. Yea, I know that sounds strange but it's true. I've created full fledged php sites that do what you're looking to do, handle registrations, logins, email validation, session tracking, etc. I thought long and hard about this before making this decision but, here's what I chose and why:

    The website will handle any forums, or discussions, things of this nature. Things that aren't linked to the game. The only thing specifically game-related it will handle is email verification (click the link in your e-mail). That page will be pure HTML.

    Construct is going to handle the login and even the account creation. All of that is going to be handled by passing the events to a collection of php scripts via Ajax with JSON responses coming back to the client. By doing this, I'm first ensuring that any login attempt comes from the game itself (Ajax does this nicely with CORS.) I'm also guaranteeing that any account creation comes from the game itself. Unless someone seriously hacks the C3 code, this means I won't need captcha's to make sure they're human.

    Plus, now that I've figured out this plugin:

    construct.net/en/make-games/addons/190/html-element

    I can use html elements to generate the login screen and still have sprites flying around, making for a much more enticing login.

    And with this plugin:

    construct.net/en/make-games/addons/166/inject-css

    I can actually see how the stylesheet looks without having to upload the game to the server.

    PLUS: I've used the html plugin above to load a nice html vertical menu into the client that passes clicks to the C3 engine. 1 element on the layout handling 8 buttons in an unordered list with CSS handling all the cool stuff like mouse-over events and colors. Creating that same menu in construct and trying to keep all the buttons where I wanted them would have taken hours and dozens of events.

    So, while I could do my game the way you plan, I've looked at the advantages and disadvantages of both and I see no reason now not to put the HTML inside the client and reduce the server load to just handling php data manipulation.

    And you just gave me a great idea thinking about your decision. Since I can now use real HTML5 inside the game, I can generate news and events in HTML and have those passed to the game as well and even have sprites flying around them if I choose.

  • I've always had issues with the viewport/screen width. The only way I've come up with that somewhat solves the issue for me is this:

    Create a function in a an event sheet that you can add to other event sheets. Call it: "ResizeLayout"

    In that function call a: System - set canvas size

    Set the canvas size to:

    Width: Browser.ExecJS("window.innerWidth")

    Height:Browser.ExecJS("window.innerHeight")

    In the same event sheet create an event: Browser - On resized

    have it's event set to: function: Call "ResizeLayout"

    In the System - start of layout

    On all of my event sheets (the ones that have a layout) I also have it call that ResizeLayout function.

    If you use a mouse click to select and cancel the full screen browser, run that function after you request or cancel the full screen.

    I've used it with several full screen modes and it even works with the mode set to off.

    Or at least it does for me.

    Now, here's the downside to this. When your layout loads or when the screen gets resized your objects on the layout may not place correctly. I solve this by manually setting the position of every on-screen object after that function is called in the On start of layout.

    Here's an example of placing an element at the screen center:

    x = viewportleft(0)+(viewportwidth(0)/2)-(element.width/2)

    y = viewporttop(0)+(viewportheight(0)/2)-(element.height/2)

    That's assuming the element anchor is in the top left.

    This may not be the 'proper' way and it may or may not work for your game. Most of my objects are static but... hope this at least gives you some ideas.