Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.

Sean T. McBeth

Member Since 11 Sep 2000
Offline Last Active Nov 21 2014 08:08 PM

#5193861 Want to get the barebones of a Trading Card Game running but need some help i...

Posted by Sean T. McBeth on 20 November 2014 - 02:58 PM

Hello everyone. I am currently making a trading card game based on the DC comics universe.


If you take this any further than your own table DC Comics will serve you with a Cease & Desist order.


Why not spend just as much effort making the game on characters of your own design and then you won't be in a position to have your efforts wasted by lawyers? If you don't think you can make up your own characters, there are several characters in the public domain at your disposal. For example, this seems like something that would map very well to the Greek or Norse mythologies.

#5191619 what technology to use: Android 2D game

Posted by Sean T. McBeth on 06 November 2014 - 11:24 PM

pix or it didnt happen

#5191323 Build/design a mobile app using HTML5/Javascript?

Posted by Sean T. McBeth on 05 November 2014 - 07:49 AM

I'm generally a contrarian guy.


I have zero interest in incurring app store selling fees or being at the mercy of their random-at-best-bribed-at-worst featuring lists.


Everything else you mention can be done in the browser already. I can bookmark an SPA and have my own icon on the smartphone's launcher screen. I can design whatever touch interactions I want. I can run in offline mode. I can build around screens instead of scrolling. And I have access to a plethora of APIs, yes, including the camera. All without a wrapper.


I can even do virtual reality.


The app store isn't going to help you sell units. It's going to help you feel like you've done "enough" to sell your app and then you're going to languish at 2 sales a week for the next 5 years. If, then, marketing and advertising my app is already on me, then why put up with the Apple or Google taking a 30% cut? What, exactly, did they provide for a larger chunk than the US government charges me? At least I get roads out of that deal. At least I get... no, sorry, roads is all I'm coming up with.

#5188426 How to remove GET variables from URL in php

Posted by Sean T. McBeth on 21 October 2014 - 06:48 PM

Well, all the GET parameters can be "hidden" if you used an Ajax query. Everything will be sent to the server, the user just won't see it in the URL of their browser.


GET is usually used when you want the URL to be unique, e.g. for printing coupons, etc. I don't remember ever having a problem with POST, either.


Just look up XMLHttpRequest, and the libraries that make it easier (jQuery was the framework of choice a few years ago, I have no idea if Angular does AJAX too, as I haven't done Web programming for an year to two).


It's a little better to think of GET as "a request that changes nothing" and POST as "a request that changes things". A different GET requests at different times of day to different or the same URLs on the server may return different results, but only because of some other, outside influence. The previous GET requests cannot be the reasons why the future ones are different, i.e. GET is read-only. There are other HTTP verbs, but they are mostly out of fashion/only useful for WebDAV (which is itself mostly out of fashion). 


So, submitting a form, almost always should be a POST, unless it's very clear that the form is selecting navigation elements. But then, forms mostly shouldn't be used as navigation elements.


To the OP, I urge you to please take the time to learn how to do the correct thing here. Don't hack in a solution. Start here: http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol

#5187026 transforming a rectangle into a trapezoid

Posted by Sean T. McBeth on 14 October 2014 - 03:31 PM

Wow, you realize this thread is 10 years old?

#5135878 How to get good fast?

Posted by Sean T. McBeth on 02 March 2014 - 12:04 PM

"How do I get the work done?" By getting the work done. There is no better substitute for getting the work done than getting the work done. Finding the best chair, the best keyboard, the best text editor, the best caffeine vector, the best excuse this week for why you haven't gotten the work done, they all feel like getting the work done. But they aren't. You just have to get the work done.


Or, in the words of my father, standing over me as I procrastinated my homework, "Put the pencil, on the paper. Move your hand. Move your hand."

#5093272 Highest level of math needed for 2D game development?

Posted by Sean T. McBeth on 11 September 2013 - 08:06 AM

I consider a solid understanding of discrete math to be a necessary skill for any type of programming. If you don't agree, I submit you probably don't know discrete math very well. Learn it, and you'll be enlightened.


I've only just started delving into lambda calculus, but what I have learned so far has drastically improved my productivity and the quality of my code.


If you're interested in anything involving free motion, i.e. an Asteroids clone or an FPS, then trigonometry and linear algebra are important. A solid understanding of differential calculus can significantly enhance your understanding of many problems you might encounter with your update loop as well.

#5045318 Database change management

Posted by Sean T. McBeth on 21 March 2013 - 11:35 AM

I'm curious about how other people use and live with databases, specifically the types of tools they use around their database to simplify work with it. For background info, what database(s) do you use, and what is the scope of your project? What kind of tools do you use to manage change with your database (implicit or explicit schema, server deployments, etc.)? What kind of "generator" tools are you using (thick- or thin-ORM, data access layers, whatever)? What pain points do you still experience? Thanks!

For myself, I have worked on a lot of custom enterprise resource planning systems over the years. Data is generally small, and highly relational. It's been mostly SQL Server, but there is some MySQL in there too. In other words, all pretty basic RDBMSs. I've played around with ORM systems like NHibernate and Entity Framework, found them quite useful for designing the initial database, but lacking something in the long run for any time changes were necessary after a nontrivial amount of data had been recorded. As a result, I've tended to try to leave the database changing in the database realm and use only a thin ORM (direct table mapping) with classes automatically generated from the schema. This seems to avoid lost data problems, but comes at a high development cost for constantly repeating yourself and not having change management ala source control in place.
Redgate has a tool called SQL Compare that I've used in the past that makes diffing and merging databases a snap, but it is very expensive. Without a SQL Compare-like tool, it's really easy to miss changes to tables and stored procedures without extremely comprehensive testing (and really, who does that?) when deploying from a development- to testing- or production-environment. And still, that is a uni-direction move. Unlike source control, you never get to see the past again (unless you're restoring from backup, and that is just not automatic enough or simple enough to be a workable solution).

#5021812 Source Control - Perforce

Posted by Sean T. McBeth on 15 January 2013 - 09:11 AM

Client-server model SCMs are just a degenerate case of distributed SCMs; you can model a client-server SCM with a distributed one, but you can't model a distributed SCM with a client-server one. Also, Git's merge tool is killer, and without its powerful merge tool, branching (which is a vital operation in mature code bases) is just too difficult and dangerous to bother.


I remember thinking SVN was leagues away from VSS or CVS in quality. Now, I see them as more alike than different. All client-server SCMs are basically garbage, and Git is the gold standard of distributed SCMs.

#5018857 Programming progression

Posted by Sean T. McBeth on 07 January 2013 - 08:19 PM

There is a reason why I didn't recommend a specific language. It doesn't matter. Learn Prolog as your first language. Learn Fortran. Heck, learn Malebolge. Doesn't matter. 


What does matter is your incessant worrying about the "right" and "proper" and "correct" way to do things, which is going to do nothing but hurt you in the long run.

#5017841 Java images?

Posted by Sean T. McBeth on 05 January 2013 - 01:13 PM

drawImage returns immediately, whether the image is loaded or not. Check the return value of drawImage. If it's false, then the image has not yet loaded. Since you're reloading the image every time you paint, I suspect this is probably the case.


This may have more information for you

#5017837 Javascript / HTML5 best practices

Posted by Sean T. McBeth on 05 January 2013 - 01:02 PM

First and foremost, since JavaScript is a programming language, the same general rules apply to writing efficient code:

  • Use the best algorithm for the task. Example, don't spend hours optimizing your bubble sort procedure when a quicksort will always be faster.

  • Use the features provided by the language's standard library, because they're probably written better than anything you'll create. Example, don't write your own quicksort. The standard library sort probably already does it.

Since javascript is a dynamic language, most of the same rules apply when optimizing:

  • Function calls to JavaScript are expensive. Calls to built-in functions may or may not be.

  • Dictionary references are expensive. Example: dictionary['thing']. If you need to access the same element more than once in a loop, assign it to a local variable before the loop then reference it with the variable.

  • Consider dictionary.thing to be equivalent to dictionary['thing'] as far as performance is concerned.

  • Functions are first class objects, and being first class objects they are no different than any other element in a dictionary on your objects: This line: "myobject.function()" can be considered the equivalent of "myobject['function']()" as far as efficiency goes. You can hoist this outside the loop too: 
    var myobject = new MyObject(whatever);
    var hoisted = myobject.function;
    for (var i = 0; i < 1000; ++i) {
        for (var j = 0; j < 1000; ++j) {
            hoisted(i, j);



  • "for (var i = 0; i < arrayLength; ++i)" is more efficient than "for (var i in array)" or even "for (var i = 0; i < array.length; ++i)" when the dictionary can be indexed sequentially.

  • Use built-in functions whenever possible, because they're often implemented in a low level language and compiled to machine code.

  • jsPerf is a great resource.

  • Don't optimize until you've profiled.

  • What is fast in Chrome might be slow in Safari, Firefox or Internet Explorer.


This is all very good advice, with the exception of "quicksort is always faster than bubblesort". That isn't necessarily true. Bubblesort is very fast on nearly sorted data and quicksort has a large constant value to its runtime that makes some algorithms like insertionsort faster than it for small sets of data. It really, really depends on the situation, which I think was your more general point, assume nothing.


Really, really, assume nothing. There is so much out there that can go wrong or can change at the last minute or looks one way but is really another. Whenever you find yourself in a situation of not understanding why something is broken, that is a big hint that you have a false assumption somewhere and need to start proving and disproving them.

#5017836 Javascript / HTML5 best practices

Posted by Sean T. McBeth on 05 January 2013 - 12:54 PM

There are some cross-browser issues you will have to watch out for, but you'll find them with experience and figure out how to get around them.

Well isn't that what JQuery, Mootools, and other JS libraries are for?

I haven't used Mootools that much, but I have used JQuery a fair bit. I like the design of the interface a lot. Unfortunately, I think it adds a lot of overhead, especially on mobile devices. I don't think there are *that* many cross-browser issues to warrant such a huge cost in download size and startup time. Yes, the issues are annoying, but they are really easy to get around, and then you've learned it and never have to deal with it again.

#5017508 Javascript / HTML5 best practices

Posted by Sean T. McBeth on 04 January 2013 - 03:28 PM

Honestly, so few people know what they're actually talking about with JS, it's really hard to make any recommendations. There's a tendency these days to treat JS as a "low level" language (lol, I know) and everyone is scrambling to figure out what the best other language to get that "compiles" to JS (lloll, I double know).


As long as you're following very basic principles of OO and Functional Programming, not writing sloppy code, you're going to be fine. There are some cross-browser issues you will have to watch out for, but you'll find them with experience and figure out how to get around them. JS isn't hard, just spend a little time with it and you'll know what to do.

#5017388 Applying for local jobs with the intent to move.

Posted by Sean T. McBeth on 04 January 2013 - 12:35 AM

Just tell the truth, you're "willing to relocate". Don't try to game the system with half-truths and technically-rights.


Most places start off with phone interviews. If they like you and need you to come in for a face-to-face interview, a lot of companies will pay for a plane ticket to get you there. I had one place even pay for my hotel and dinner, it was rather nice.