HTTP server Maker?


Future Freak

  • Posts: 412
If you're capable with javascript - maybe instead of PHP on the server why not look at node.js http://nodejs.org/

MeToo

  • Posts: 355
Thank you Future Freak, I'll make sure he sees this (I know no java).

Here's a question, and I know it may sound a little elaborate, but could a person:

Assemble Stencyl blocks, copy the code that it makes from the code preview, and paste it and compile   it with HAXE compiler as PHP? Obviously it would be insane to ask something like that to be officially supported but is it possible? Or is the code that Stencyl generates a little different from the HaXE NME stuff that other non Stencyl users are using?

Obviously the more things I'd be doing like learning what to cut and paste, and what to leave, and how to compile from the command prompt etc, the more some coders would want to say "just learn to code! :-)", but it's just such a beautiful thing how by dropping and moving these blocks Stencyl allows me to be a game maker when I had no such ability before. I can't help but wish this was available for more things! Especially the ones that would further enable my games!

I've been doing some looking around for that kind of thing in the past few days. As an interesting side note, did you guys know that google has a drag and drop called Blockly, and that quite interestingly there's a version out there that works with arduino? Drag and drop robotics? Drag and drop games? I submit to you that it's gonna be someone like me who accidentally makes Skynet.

dripple

  • Posts: 747
The approach of this tools like Google Blockly, Stencil or any others, is time saving. Simple said: if you're able to connect Stencyl blocks in the right way, you're also able to write code, but you need more time to configure your setup (i.e. frameworks, tools like Levelhelper and so on).

Look, the Google Example for Blockly:



is an good example. In plain text it looks like this:

Code: [Select]
if get(count) > 256:
do:
set(count) to 0
print "Game Over"
endif

In Java this could look like this:
Code: [Select]
if (count) > 256 {
count = 0;
System.println("Game Over");
}

Finally, the code generation tools (or rapid prototyper, call it what you want) are  more or less tools that use predefined code blocks you can combine and prevent you from making mistakes by offering a fool-proof editor (sorry, Stencelers don't want to offend us!).
Think of a bike with training wheels. But a very powerfull bike. With highspeed training wheels. :-)

And don't mix two different stories:
- Stencyl is for 2D game development.
- The back-end development is something complete different.

If you want to archieve fast results with little learning, try something like Modelbaker. You design the data model (remember: persistence) and the necessary controllers (the logic) and helps you with the front-end (i.e. views). Those views are the part your game is calling (think of an more clever replacement for the php-file in my example).

Cheers,
Heiko

« Last Edit: June 07, 2013, 01:31:23 am by dripple »
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

MeToo

  • Posts: 355
Thanks Dripple! I'll check it out first thing tomorrow!

Future Freak

  • Posts: 412
Basically Stencyl is a 2D games engine that has HTTP access to REST API's  http://en.wikipedia.org/wiki/Representational_state_transfer which essentially means you can POST data and get a response - GET data.

Imagine Stencyl as a courier - they can deliver and collect parcels from your house - they only ever come to your front door. What happens behind your closed door is your business - the courier (Stencyl) knows nothing about your life.

So when Stencyl send a request to a web server - it know NOTHING about what's behind the webserver. It doesn't care. It asks for data and gets data from the doorway (web server) - that's all.

What you do to serve and save this data is up to YOU.  You can use HTML, PHP, Perl, ASP, Java, Javascript, Python, Node.js, Coldfusion, Ruby on Rails.  Choose one (I recommend PHP http://php.net ) then learn it.

MeToo

  • Posts: 355
Thanks Future Freak. Here is a puzzle I've been wondering about, gang. Using http requests what would be the best way to add live chat to a game? A mail system like in WoW would seem relatively easy. However when it comes to live chat short of every few seconds having the client send an http request that asks  the server "did anyone type anything in the channel?" And having it respond "no" or "yes,this" I can't think of much, and it sounds like an awfully busy way of doing things, even if that behavior were only enabled while players had a chat window open.

@Dripple: anything as good as ModelBaker for Windows?

« Last Edit: June 07, 2013, 07:53:58 am by MeToo »

dripple

  • Posts: 747
... Coldfusion ...
Coldfusion, the good old times (I started with 1998 with HomeSite and ColdFusion and turned later to Web Objects and finally then to Java. *sigh* No I do feel old :D )
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper

MeToo

  • Posts: 355
Haha! Thanks guys!

dripple

  • Posts: 747
Using http requests what would be the best way to add live chat to a game?
With Stencyl, you have to poll (send a request) the Server for new messages (chat) every second or so, depending on the power of the server. Thats the common technique if you don't have so-called Sockets (simple said: connections, that stay open and can be pushed by the server)

@Dripple: anything as good as ModelBaker for Windows?
No idea, I am the Mac-guy. :-)
But I am sure that there are solutions out there.
Sure, my games won't get better with all the new features of Stencyl.
But I do have more fun creating bad ones.


MayazCastle Keeper


MeToo

  • Posts: 355
I see that this is referring to ActionScript. Would it still apply to Stencyl 3.0?

captaincomic

  • *
  • Posts: 6108
Nope, for 3.0 you'll need haxe, which also has a sockets class
http://haxe.org/api/sys/net/socket

Btw. here is an example chat client written in haxe (for Flash):
http://haxe.org/doc/flash/chat
;)

MeToo

  • Posts: 355
Thanks captain! Given hat my first few games are going to be Aysyonchronous multiplayer should I (aside from possibly the chat part) ignore sockets and go http? Or is there some advantage to sockets that I may still want?

captaincomic

  • *
  • Posts: 6108
Hm, I don't know, it depends on the game. If the game runs more or less on his own for each player, and just needs to get some game state information from the server at some times, you can do it all with requests.