Jump to content

  • Log In with Google      Sign In   
  • Create Account


LJ_1102

Member Since 16 Feb 2006
Online Last Active Today, 03:12 PM
-----

#5120405 Frontend technolgy advice for browser game

Posted by LJ_1102 on 31 December 2013 - 08:52 PM

Im not quite sure what "support" you want for your RESTful service,

actually you'll just deliver the data in JSON and query it via javascript ajax calls and do what ever you want with it,

there is no framework or engine that knows how to interpret your REST interface.

 

 

What would be a good choice for a "frontend" technology.

 

So to answer your question, I would suggest using the only appropriate/available technology.

  • HTML for layout
  • JavaScript for interaction

If you need advanced 2D animations you could use a 2D engine like "construct 2" utilizing the canvas element.

Otherwise use gif images and transform the html with javascript.

Good libraries for DOM manipulation, interaction and basic animations are jQuery/jQueryUI, YUI and countless others.




#5119027 Isometric Cubes in Canvas

Posted by LJ_1102 on 24 December 2013 - 08:34 AM

ctx.setTransform(
  matrix[0],
  matrix[1],
  matrix[2],
  matrix[3],
  matrix[4],
  matrix[5]
);
//ctx.strokeRect(x, y, w, h);
ctx.strokeRect(0,0,w,h);

You're applying the transforms two times thats why the "planes" are shifted.

The last two indices of your matrix (4,5) are already a translation in space, using strokeRect with with x, y arguments

causes the translation to be applied again. 

 

I've adjusted your fiddle accordingly, take a look at MDN Transforms article for further information.

 

EDIT:

I added some colors to make it look more isometric.

http://jsfiddle.net/jeremythuff/S9TGU/324/

 

Merry X-Mas smile.png




#5118003 Forcing Code To Work !

Posted by LJ_1102 on 18 December 2013 - 08:25 PM

// sql injection
mysqli_query($sql,"INSERT INTO ".$table." (Game_Name,Login_Name,Blarg,ID)VALUES('".$_POST["Su_Game_Name"]."','".$_POST["Su_User_Name"]."','" .$_POST["Su_Password"]."','".$x2."')");

Why are you still not using mysqli_real_escape_string ? What happens if for some reason ever you may want to allow whitespaces or even free text -> cant use your "awesome" strip function anymore. Maybe its better if you just use an already existing and prooven ORM to handle database calls for you. This code is all coding horror, even when using mysqli_real_escape_string, a professional project would have the database logic abstracted away, use a templating engine for html output and a router to route the requests to the appropriate controllers.

Yes you can build a project the way you're but you'll soon encounter hard to find bugs and a total require/include global variables and functions mess.
Have a look at something like Yii, CakePHP or Zend. You'll save so much time and frustration by using a proper framework seriously.




#5115648 Forcing Code To Work !

Posted by LJ_1102 on 09 December 2013 - 08:03 AM

This code is awesome, it allows me to overwrite all files on your server that the php process has rights on.




#5097539 Is this really worth it?

Posted by LJ_1102 on 28 September 2013 - 08:55 PM


... when I realized that to build a proper company [...] involves investors, infrastructure, money, singular opportunities, team,a lot of luck and a lot of other variables ...

The idea is an MMORPG but that can also be played offline
 
[irony] MMORPGs are usually very fast to make and there are practically no competitors in the market, also servers and bandwidth cost nothing nowadays[/irony]
Seriously MMORPGs are amongst the most complex and cost intensive projects, not only to create but also to run and maintain.
You should better focus on your singleplayer/offline part.
 

I"m not the kind of guy that can work in something based only in the "faith" that my hardship will be a success
If you can not keep yourself motivated without the promise of money maybe going "one man army" isnt the best thing to do then.
You should plan your project as detailed as possible and choose something where you can achieve visible results fast to keep your motivation up.
Also get it out to other people(friends) as soon as possible so they can motivate you and promote it thorugh their friends.
You can also go steam greenlight->early access with your game(prototype) then to see if there is an audience and to answer your question "Who the hell will play this ****".
 
To answer your main question "is it worth it":
with sufficient planning, yes, if you dont try it you cant win.



#5093322 Collada Bone Matrix / Baked Transform Matrix

Posted by LJ_1102 on 11 September 2013 - 11:45 AM

iirc every transformation matrix is relative to its parent node.

Also there are exporters that will not bake the matrices and provide you with transform tags like (rotationX, rotationY, scale) in that case you need to build the matrix yourself.

Btw. you mean DAE file dont you?




#5087115 about lines of code

Posted by LJ_1102 on 18 August 2013 - 02:33 PM

imho LOC is completely useless without specifying the language.

Also one can write 1k lines of stupid code or 100 lines of awesome code accomplishing the same. 

 

EDIT:


5. I'd say <10K is fun size, <100K is small, <500K is medium, <1M is big, past that is monster.

Sorry for voting your post down, except for the above quoted statement i'm sharing your opinion.

Actually there seems to be no way to revert that vote :/ 




#5087087 Dart anyone?

Posted by LJ_1102 on 18 August 2013 - 12:29 PM

I took a look at it when it was relatively new, I liked the possibility of using types and classes and the overall syntax.

Unfortunately its not native implemented in other browsers than chrome/chromium (which has iirc dartium).

So you need to compile it to javascript to run in other browsers than chrome.

 

That makes it more an abstraction layer on top of javascript helping developers used to languages like C# or Java

that dont want to learn javascript since it has another structure than the aforementioned.

 

That was also the reason i stopped using it, since when I need to compile javascript out of it i can use javascript directly and use its unique traits and features

without having dart in the way.

 

 

Just my personal opinion on it.




#5087064 javascript vs c#/XAML vs c++/DX Windows 8 game development

Posted by LJ_1102 on 18 August 2013 - 10:48 AM

It depends on what hardware you're targeting, but when programmed right javascript is totally capable of doing this.




#5084574 What's your opinion on Game Makers?

Posted by LJ_1102 on 09 August 2013 - 07:51 PM


I wrote a game in pure Java once: no API's, just everything in Java. I have to say, I had a LOT of fun making it.
 

I usually use LibGDX and LÖVE for making games.
 

 

You have to be trolling or you need to get your facts right, you're not using any APIs ?

You use LibGDX which is a framework doing the "lower level" API calls for you,

and even worse for your argumentation LÖVE is a game engine.

 

Not using an API would mean you're actually programming against the hardware itself.

 

So what now?

 

I dont want to offend you in any way but you seem to be not very experienced.

When doing larger projects you'll need tools anyway, so people tend to skip this part if a ready to use solution fits their needs.

And in my opinion thats totally legit, since it saves months if not years of development time and costs.

 

EDIT:

I too dont like Unity3D or GameMaker but thats because of the low price point everybody thinks he can be a "game developer" putting some stuff together resulting in rather bad games. Game development is much more than just putting something interactive to the screen.




#5077448 Image Based Reflections - DX11

Posted by LJ_1102 on 13 July 2013 - 06:12 PM

I think its achieved by parallax corrected cube mapping, i recently read a great article about that.

http://seblagarde.wordpress.com/2012/09/29/image-based-lighting-approaches-and-parallax-corrected-cubemap/




#5077367 C++ Developer moving to Web

Posted by LJ_1102 on 13 July 2013 - 10:42 AM


Third, JavaScript is not C++...  it feels a hell of a lot like C++ at first, but it isn't and the faster you can come to terms with that, the happier you will be.  Probably the worst part of it is the fact you can basically turn JavaScript into C++... DONT.  JavaScript is a prototype based language and a dynamic ( not compiled ) language.  There is a lot of power in those two traits.

 

Couldn't have put it better! Word up for that one!




#5077336 C++ Developer moving to Web

Posted by LJ_1102 on 13 July 2013 - 07:26 AM

The server side language depends on what you want todo,

if you want it to communicate with your game(f.e. using websockets) you should go into node.js

also because you do not have to learn another language then since node.js is javascript.

 

Also creating a game using plain WebGL will propably take you ages since you have to write a lot of boilerplate code.

 

imho using three.js is also not a good idea, since everything more complex i've seen that was made with it was pretty slow.

I would recommend taking a look at other frameworks out there, google will help you find them.

 

In addition to that I highly recommend that you read JavaScript: The Good Parts and use a jslinter to achieve some proper javascript skills,

I dont know the quality of code academy but there are huge differences in the opinions about what is good javascript.

 

Giving a pointer to general web design is not that easy, its actually an intuition thing i guess.

Take a look at Twitter Bootstrap and see how they're structuring their code and how their design elements look like.

 

Hope that helps. 




#5071412 html 5 canvas implementation

Posted by LJ_1102 on 20 June 2013 - 05:39 AM

I've just checked your example and have no seam on the two boxes one, but on the triangles.

http://jsfiddle.net/uHdsY/

 

You can disable image smoothing, that will help if you dont want mag filtered images when drawing images larger than they are.

context.imageSmoothingEnabled = false;
context.mozImageSmoothingEnabled = false;
context.oImageSmoothingEnabled = false;
context.webkitImageSmoothingEnabled = false;

This has no effect on primitives like lines and rects, for them you have to go the above mentioned ImageData API way and plot the pixels for yourself.




#5071289 html 5 canvas implementation

Posted by LJ_1102 on 19 June 2013 - 06:57 PM

Could you post an example of that?

I never had such problems, maybe your canvas has some weird css scaling that causes the browser to interpolate the contents.

 

To plot or manipulate individual pixels you can use the ImageData API.

Google will help you there.






PARTNERS