generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Discussion: MVC Layout

Previous Thread :: Next Thread 
ScripterJohn13 is not online. ScripterJohn13
Joined: 01 Jan 2010
Total Posts: 5658
18 Dec 2013 06:26 AM
Before I begin I want to mention that I am ENET and I bought a name change- just so some of you will know who I am.
I have been inactive a lot here lately, but after playing some call of duty and realizing there isn't a game that is real similar to it on roblox yet, I decided I would make my own PvP shoot 'em up game.

One thing when deciding to build my game is how to have all the scripts run together without having to write a script communication center or having to make a way for global and client scripts communicate or having the server trying to tell every client what to do. So what I decided to do after reading what MVC really is, was to try to utilize it in my game.

There is a model in the game representing all game data. This data consists of a bunch of int values and bool values representing the game map, mode, can guns be shot, game messages to display, etc...

I particularly find that the layout I had chosen was superior to any other way I could have done it because it has made it so easy creating guis that just display the data from the server.

If anyone else could discuss what they like about the MVC layout of programming please let me know...


* MVC - Model View Controller
Report Abuse
Charl3s7 is not online. Charl3s7
Joined: 07 Dec 2007
Total Posts: 4146
18 Dec 2013 06:33 AM
I use MVC formats for all the frameworks I make for the web. Views are templates, controllers process the pages, and models for each object that is used throughout the website, such as a database connection.

The way I set up my urls would be like:
domain.com/Controller/Argument/Argument/Argument/...

So index.php would load Controller and pass in all the arguments to it.

class Index extends Template {
public function __construct($args) {
$this->load('top');
$this->write('hello world ' . implode("\n", $arg));
$this->load('bottom');
}
}

(Template would be a model) It's a nice way to have organized code.

I've never tried it for a game so I'm not sure how much any input from me would help.
Report Abuse
ScripterJohn13 is not online. ScripterJohn13
Joined: 01 Jan 2010
Total Posts: 5658
19 Dec 2013 07:36 AM
I'm not really asking for input, as much as I am on discussing how you individually per person make a game interact locally, server-wide, and server-client.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image