Jump to content
MakeWebGames

Another Game Engine


Hedge

Recommended Posts

Hey All,

So i've been away from the world of coding for a little while but still sorta kept up with what's been happening best I could. Now i've got some time on my hands, I want to get back up to speed.(In my case coding is a hobby not a profession)

I thought id use a game engine as the basis of getting back into it...I've always learnt best from putting things into practise.

Now i know text gaming isn't what it used to be, but there does still seem to be a following both here and around the net, so it's not completely dead.

What's planned so far? Almost nothing...I'll build it to the bare basics to start, then i'll review the project and go from there.

It will be built from scratch using current standards and technology. There will be no theme nor out-of-the-boxness, this will be purely an engine on which to build upon.

Built out of:

- PHP5

- PDO connecting to ?? (yet to decide, will work out what's best)

- Possibly XML

- HTML5/CSS3

- Some sort of front end template | Will be taking a Mobile First approach

- Javascript libraries | Whatever is appropriate

Stage 1:

- Landing Page

- Registration

- Login / In-Game Landing Page

- User Settings / Profile

Stage 2:

- Basic Dynamics of Gameplay | Energy/Nerve/..etc type or somthing different. As yet undecided.

- Drop in Module type system | End User should not need to code to add additional gameplay features.

- Admin Section | Ability to change game wide settings to better suit style user is after + normal Admin controls like Banning Users.

Stage 3 and Beyond:

- Basic Module

 

So for those of you asking yourself "So what different about this than xxxx engine?". The answer is: If you're asking that, you're missing the point. I'll be learning and this engine is a by-product not the otherway round.

If you have any suggestions about what should be included/excluded, in both what its coded out of or the engine itself, feel free comment.

As for release, i'm undecided about that as of yet. It will be either free or cost a couple dollars.

I will update here when i have something to update about.

 

Update

Posted elsewhere in this thread, but putting here also for ease.

I figured regular updates, even if they are only small, is the best was to keep anyone following this informed.

So far here is where the project is at -

Completed:

- Model/View/Controller Structure & Routing

- Landing Page

- Registration

- Login / In-Game Landing Page

- Language System using JSON

- Plugin System

Definite Too Add:

- LESS/SASS

- Gameplay Dynamics

- User Settings / Profile Page

- Admin Section

- Example Plugin

Apart from those listed, everything else (i.e. jail, inventory, etc..) will become a plugin.

Plugins I Plan To Include:

- Inventory

- Hospital

- Mail

Possible Plugins To Be Included:

- Chat

Well thats all i have for now, will update again when i have completed some more.

Edited by Hedge
Link to comment
Share on other sites

PHP 5? Oh thank god thought you might have gone with 4 .-. Anyhow. I would say 5.5 is a good place to start

PDO connecting to..... how about leave it up to the users choice? Laravel for example easily allows this

Why oh why XML?

HTML5/CSS3 I would expect nothing less, I assume you will minify/concat all css and js files at runtime or at least have an admin command to do it.

Front end template, Bootstrap or Foundation.

Javascript libs? Both ship with jQuery as far as I am aware.

You have odd stages but fair enough.

A wise man once said to never release something you learnt off.

Link to comment
Share on other sites

PHP 5? Oh thank god thought you might have gone with 4 .-. Anyhow. I would say 5.5 is a good place to start

PDO connecting to..... how about leave it up to the users choice? Laravel for example easily allows this

Why oh why XML?

HTML5/CSS3 I would expect nothing less, I assume you will minify/concat all css and js files at runtime or at least have an admin command to do it.

Front end template, Bootstrap or Foundation.

Javascript libs? Both ship with jQuery as far as I am aware.

You have odd stages but fair enough.

A wise man once said to never release something you learnt off.

If you could add a citation to that, that would be great. Saying something dumb and prefixing it with "A wise old man once said" doesn't make it fact.

XML for settings and/or SOAP APIs isn't below standard.

PDO is a database API and supports multiple database flavours. If the game runs on SQL, why would you need to change it (or add the flexibility to do so?) - it's not a framework.

@OP - Good luck & keep us updated. I look forward to it.

Link to comment
Share on other sites

If you could add a citation to that, that would be great. Saying something dumb and prefixing it with "A wise old man once said" doesn't make it fact.

XML for settings and/or SOAP APIs isn't below standard.

PDO is a database API and supports multiple database flavours. If the game runs on SQL, why would you need to change it (or add the flexibility to do so?) - it's not a framework.

@OP - Good luck & keep us updated. I look forward to it.

Never claimed it to be a fact, it's just "common". You can't do your best code when you're learning, so why release something half assed? You want to release something that your comfortable with.

Regarding XML & SOAP, well google it, not exactly hard to see why you would need SOAP http://spf13.com/post/soap-vs-rest for example.

Your right, why release something other people can use without flexibility.

He wanted suggestions? I gave him a few.

Link to comment
Share on other sites

I can see a use for XML but I myself wonder why? XML can do a lot of the same things as json can though I have never messed with SOAP requests and never bothered to even look into them since now a days most people use REST. The only positive I see to using XML is just for flexibility. The negative I see is loading another class to parse it. For novice people parsing XML can be a pain at sometimes.

Now ow I don't know what you plan to do with the XML, but if it's for something like data transfers and you are bent on using it, then maybe write your own class to be able to choose either JSON or XML

Link to comment
Share on other sites

PHP 5? Oh thank god thought you might have gone with 4 .-. Anyhow. I would say 5.5 is a good place to start

PDO connecting to..... how about leave it up to the users choice? Laravel for example easily allows this

Why oh why XML?

HTML5/CSS3 I would expect nothing less, I assume you will minify/concat all css and js files at runtime or at least have an admin command to do it.

Front end template, Bootstrap or Foundation.

Javascript libs? Both ship with jQuery as far as I am aware.

You have odd stages but fair enough.

A wise man once said to never release something you learnt off.

I will be using the latest stable version of php ArchEclipse. I follow a few forums and groups on facebook in relation to coding, it often surprises me how many people use very old versions of just about everything purely for the reason that's what they know so thats what they'll use.

So to save any confusion i thought it best to be less vague on what id be using. From your reaction, I take it you think thats a bit over the top.

FET, yes it will probably be Foundation. As for Javascript libs, I didn't just mean jQuery. Yes i'll be using that too, but theres a lot more out there that can help with various tasks.

As for minifying, yes both css and js will be. I will be aiming to have everything run to its best performance.

Thanks for your feedback :)

Link to comment
Share on other sites

I can see a use for XML but I myself wonder why? XML can do a lot of the same things as json can though I have never messed with SOAP requests and never bothered to even look into them since now a days most people use REST. The only positive I see to using XML is just for flexibility. The negative I see is loading another class to parse it. For novice people parsing XML can be a pain at sometimes.

Now ow I don't know what you plan to do with the XML, but if it's for something like data transfers and you are bent on using it, then maybe write your own class to be able to choose either JSON or XML

Having not used json previous, it wasn't something i thought of when i was writing the previous post. But i will definitely look into before i start, thanks.

The plan was to use xml for languages (english, spanish, etc...), but if someone has a better solution to that, i'm all ears.

Link to comment
Share on other sites

I like your approach to it.

I think I can say something that might be of interest to you. You may be able to use AJAX along with your modular system to give users the feel that your site is changing pages when in fact it isn't.

Set up a system that loads the content of the module / page onto the client screen. Then have it when the user clicks a link, javascript absorbs the link, i.e doesnt tell the web browser to change page, and then unload the current content on the screen and load the new content.

It'll be a complex little system to incorporate from scratch, but if you set your php modular system up correctly, then a few javascript functions will sort out the unloading and loading of the next page's content.

I am myself currently working on something similar to that. I'm doing it more to investigate the performance of it, it could hinder or help overall performance, but either way it would be a good thing to learn how to do, as i've noticed more and more websites having this kind of "feel" to it.

As for javascript libraries, look into node.js . I would suggest using it for chat, messaging and notifications in the game. Again its another learning curve and gives you experience using it.

Link to comment
Share on other sites

I like your approach to it.

I think I can say something that might be of interest to you. You may be able to use AJAX along with your modular system to give users the feel that your site is changing pages when in fact it isn't.

Set up a system that loads the content of the module / page onto the client screen. Then have it when the user clicks a link, javascript absorbs the link, i.e doesnt tell the web browser to change page, and then unload the current content on the screen and load the new content.

Its actually not that complicated to do. I recently built a php modular system with JS front end to load all content in a unique way. It can also load JS files for specific "plug-ins" if need be. I just never got around to add features to it. So for now, its login/register/select avatar... All 3 of those are actually plug-ins.

Link to comment
Share on other sites

Might as well just use AngularJS if your so inclined to make it feel like an SPA.

In regards to lang, you could use a database and cache the results in JSON or even just a PHP array, sort of like how composer caches the autoloader.

Laravel has a great example on the language side http://laravel.com/docs/5.0/localization

Process:

Insert lang into the database for easy modification

-> Press save

-> Caches into PHP array files

-> Just like Laravel it reads from the file

Just an idea.

Link to comment
Share on other sites

Insert lang into the database for easy modification

-> Press save

-> Caches into PHP array files

-> Just like Laravel it reads from the file

Just an idea.

Short run-down of what I do:

eng.php:

$lang['hi'] = "Hi";

$lang['bye'] = "Bye";

spanish.php

$lang['hi'] = "Hola";

$lang['bye'] = "cya";

Link to comment
Share on other sites

Short run-down of what I do:

eng.php:

$lang['hi'] = "Hi";

$lang['bye'] = "Bye";

spanish.php

$lang['hi'] = "Hola";

$lang['bye'] = "cya";

 

$lang = [
'hi'  =>'hi'
];

 

But yeh that is a good way :)

Link to comment
Share on other sites

  • 2 weeks later...

Heya People,

have been busy working away on the engine, which for now i've name JAGE (Just Another Game Engine).

Anyway, it's been quite sometime since i've used mccodes or any other engine for that matter. Just wanting to know what you guys disliked about them so that i can either avoid doing the same, or improve where i can't avoid.

Not after a bagging match here, so leave the engine name out of any comments you make please.

If you can take the time to do this, it would be much appreciated.

Link to comment
Share on other sites

Dislikes:

Buggy as hell, code has absolutely no structure to it. Code is messy and all over the place. All functions are in the one file, preferably I'd have collections of similar ones in different files. Like time functions in a time file, item functions in an item file.

Time consuming to edit or make changes when creating certain styles

Mixture of css in external file and css in the PHP files, meaning changing templates and design can be a pain in the ass.

Overuse of echo in each php file. I'd preferably have it that all PHP is executed then the page is created and displayed.

That way it separates the logic from the design making it easier to find and fix bugs as well as add new features.

Link to comment
Share on other sites

Dislikes:

Buggy as hell, code has absolutely no structure to it. Code is messy and all over the place. All functions are in the one file, preferably I'd have collections of similar ones in different files. Like time functions in a time file, item functions in an item file.

Time consuming to edit or make changes when creating certain styles

Mixture of css in external file and css in the PHP files, meaning changing templates and design can be a pain in the ass.

Overuse of echo in each php file. I'd preferably have it that all PHP is executed then the page is created and displayed.

That way it separates the logic from the design making it easier to find and fix bugs as well as add new features.

Thanks [MENTION=65530]Coly010[/MENTION], Have all of that sorted via the use of Model/View/Controller system and once i figure out some sort of plugin system, then adding features should be relatively easy.

As for the changing templates, the base is foundation 5, so adding a template will be as easy editing 1 structured custom css file.

thanks for the input.

Link to comment
Share on other sites

Thanks [MENTION=65530]Coly010[/MENTION], Have all of that sorted via the use of Model/View/Controller system and once i figure out some sort of plugin system, then adding features should be relatively easy.

As for the changing templates, the base is foundation 5, so adding a template will be as easy editing 1 structured custom css file.

thanks for the input.

Looking forward to seeing the final product !

Link to comment
Share on other sites

Thanks @Coly010, Have all of that sorted via the use of Model/View/Controller system and once i figure out some sort of plugin system, then adding features should be relatively easy.

As for the changing templates, the base is foundation 5, so adding a template will be as easy editing 1 structured custom css file.

thanks for the input.

Still using base CSS? Or LESS/SASS?

Link to comment
Share on other sites

Still using base CSS? Or LESS/SASS?

Currently just standard CSS, but i'm reading up on both LESS and SASS to see which will suit this project better. Theres heaps of articles out there comparing the two, but i've never used either before, so i'm not rushing into either or. With what i've read so far, i can see clear benefits using them as it seems to make customisation easier for everyone.

note: I have not created any "style/theme" to JAGE yet, so at this point in the project it makes no difference. Before i embark on the styling, i will make a decision on a preprocessor and implement it.

Link to comment
Share on other sites

[MENTION=65622]Hedge[/MENTION] Just something else I have thought of. If you are creating your own Model/View/Controller System, I think it might be worth having it so that the view file, the model file and the controller file have their own directory, with some sort of file (maybe xml?) which gets a standard call and is used to load the MVC of that particular plugin or whatever you want to call it.

I have an MVC set up at the minute using CodeIgniter I believe and I personally find it a pain in the ass in ftp to go from one folder, to another folder to another folder, when I'm trying to work on one particular feature

Link to comment
Share on other sites

+1 for using CI.

I dont have have that issue when using CI but I use an IDE that loads all my files up and just FTP through the IDE so it really doesn't bother me. Now I'm not a speed test professional and if I'm right I am probably talking 1000's+ of a second but couldn't that lead to a slower load time? I thought the point of having a MVC directory was all the MVCs were in their own directory so it's not sifting around different directories to load a model or controller.

Link to comment
Share on other sites

+1 for using CI.

I dont have have that issue when using CI but I use an IDE that loads all my files up and just FTP through the IDE so it really doesn't bother me. Now I'm not a speed test professional and if I'm right I am probably talking 1000's+ of a second but couldn't that lead to a slower load time? I thought the point of having a MVC directory was all the MVCs were in their own directory so it's not sifting around different directories to load a model or controller.

Possibly so, but it would save me a lot of time in filezilla... :P

Link to comment
Share on other sites

[MENTION=65622]Hedge[/MENTION] Just something else I have thought of. If you are creating your own Model/View/Controller System, I think it might be worth having it so that the view file, the model file and the controller file have their own directory, with some sort of file (maybe xml?) which gets a standard call and is used to load the MVC of that particular plugin or whatever you want to call it.

I have an MVC set up at the minute using CodeIgniter I believe and I personally find it a pain in the ass in ftp to go from one folder, to another folder to another folder, when I'm trying to work on one particular feature

The plan is to have the core separate from the plugins/features, as i want them to be just that - plugins. Easy to add, easy to remove.

The core of it is structured into its own folders, but i haven't worked out the plugin system yet, i'm going to do some research on how others have implemented such things in their projects.

Heres a screenshot of the folder structure as it currently stands

131746691_Screenshot(14).png.1df3711201a27e3a2d815502044027dc.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...