MattEvans 473 Veteran Poster Team Colleague Featured Poster

When compiling under MSVC I get warnings about using 'this' explicitly in a constructor's initializer list. I don't get warnings if I use the return from member functions though, even member functions that return 'this'. I also experience no noticeable problems in any test* but; is using 'this' there bad, and if so why?

I want to pass 'this' of a class one of its superclass's constructors, ideally.. but if there are negative implications or possible problems, I will work around it in this new project.

* including a 'test' that was a massive project compiled originally without using MSVC, where 'this' was used in initializers extensively.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

what happens if someone posts in an already-solved thread? do they still get a +1?

MattEvans 473 Veteran Poster Team Colleague Featured Poster

O_o There is no such thing as this; not in Java anyway. It would require some kind of dynamic/run-time typing... You won't get that for free in a compiled language like Java, or C++.

One way to go about this would be to have 'helper objects' that contain the variables specific to an ability, and a interface/abstract method like doAbility( ) . Keep them in a dictionary/map/hash within each character; using a string key with the ability name. Instead of calling character.DoubleSlash( ) , you'd call character.getAbility( "DoubleSlash" ).doAbility( ) or similar. To link the two objects together ( i.e. so a 'DoubleSlash' helper can access the data in a Character; use a 'character' variable : either local to each helper ( perhaps provided as a constructor paramater ), or pass the character using the ability into the doAbility() function.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

I would: Create a 'pool' containing the 90 numbers, shuffle the pool so that all of the numbers are mixed, and then select them as needed in the order they appear in the pool ( i.e. random ). This is much the same as a bingo caller picking numbers really.

It's not inefficient; because you need to guarantee that the same number isn't chosen twice. Any method to achieve that limit would need to either select numbers in some non-repeating order from a set of all of the possible numbers; or check generated numbers against previously generated numbers. Checking generated numbers against existing numbers is highly innefficient because towards the end of the generation sequence; there's only a few numbers left to select from ( and the computer may NEVER pick them [ unlikely but possible ] ). Another method would be maintaining an ordered ( non-random ) list of numbers, selecting a random list index and then removing the index ( shortening the list ).. But; that means dynamically changing the list.. and for some reason it seems less random/more predictable in some way... But; I can't explain why I think that, or prove that it is the case. Walking through a shuffled pool means totally constant fetch time ( after arbitrary shuffle time ).

What's the algorithm you're using at the moment? I'm not quite sure that I understand the whole tickets/strips/rows/ranges etc thing.. It sounds complicated! ... I don't play bingo.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

no. The options are put in to make testing easier (and in some cases possible).
It allows testers to take shortcuts through the game in order to reach spots that need to be tested more quickly.

They're usually left in because changing the code to take them out after testing is complete can introduce new bugs.

Not always the case, and certainly not a 'no' to cheats being fun sometimes. Some cheats in games are purely for fun. You've never run around as a buring wireframe biped bat in shadowman 64 or flown a chevy through the star wars universe, I guess? =P

If developers accept leaving in their shortcuts and don't have a policy for removing them from release versions - then those that are left in are left in deliberately by someone. If you see those cheats I mentioned earlier as 'unlockable extras'; having to dig around in binary to reinstate closed code paths is just a more convoluted way of unlocking extras. But, that's usually unnecessary because many developers deliberately leave cheats available without having to resort to such means.

In single player; a n00b is happy to find an invincibility cheat or a shortcut, a pro is happy to find an utra-hard mode cheat, I'm happy to find an amusing character skin or a secret room. In multiplayer or 'serious games'; cheats are either non-present or bannable offences. I think; if you find cheating immoral, you miss the whole ethos of 'games as …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Well, data in that JSON format is valid, runnable javascript; the libraries that ~s.o.s~ suggests are just helper utilities.

A client-side library for interpreting the JSON safely is a good idea; since it's not totally safe to run code that you can't guarantee hasn't been tampered with.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Well, certainly not everyone who perhaps 'deserves' a high ego has such a thing in all areas of their life, I wouldn't expect that... Let's say ego is relative; there's 2 valid definitions of ego; both defs can be treated relatively. If person A gives person B advice, and person B ignores it, I would guess that's because person B thinks that person A doesn't have anything to add to person B's knowledge. That's ego ( an inflated sense of self [ relatively ] ) in my eyes; whether person A is right or wrong. But, if person B 'knows' person A is wrong; and person A is wrong, that ego ( sense of self ) is deserved; otherwise, it isn't. That's one example; but I can think of many examples where someone having an inflated sense of self relative to someone else in a given area might be completely reasonable.

>>People that feel they deserve my respect without earning it get my back up.

Everyone deserves some degree of respect in a way though. If those brilliant people had that attitude; you'd have had a hell of a job earning their respect.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Well.. call me wrong but the party with a noticable ego trip seemed to be the guy asking for the review.

People with a deserved high ego can be a little annoying; but they're rarer and generally more useful than people who provide little of worth, expect alot in return, and get insulted by any kind of criticism they recieve. That's also not directed at anyone specific.

Agreed though, it's much more dignified to remain calm and collected in any situation. Flipping out and throwing personal insults isn't helpful for anyone.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Actually, it seems that there are shorthand key/value array constructors; and this is what digital-ether suggested in your other thread of this nature: http://en.wikipedia.org/wiki/JSON. That format is directly interpretable by javascript.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Hm. there are apparantly no constructors for key/value type arrays ( hashes/dictionaries/w.e. you'd call them )

This might help you:

<html>
<body>

<script type="text/javascript">
function mkhash( )
{
  var ret = new Object( );
  for (var i = 0; i < arguments.length; ++i )
  {
    ret[arguments[i][0]] = arguments[i][1];
  }
  return ret;
}

var myhash = eval( 'mkhash( [ "name", "matt" ], [ "age", "22" ] )' );

document.writeln( myhash[ "name" ] );
document.writeln( myhash[ "age" ] );
</script>

</body>
</html>

As long as you print out a call to mkhash from PHP, i.e.:

echo "mkhash( [ 'name', 'mr box' ], [ 'age', '20' ], [ 'sanity', 'not really' ] )";

when you eval that in javascript, js will 'find' the mkhash function if it's present on the page, and use that to generate the key-value type array object.

Alternatively, if you just print:

[ 'name', 'mr box' ], [ 'age', '20' ], [ 'sanity', 'not really' ]

from PHP, you can then evaluate it like:

var myhash = eval( 'mkhash('+xmlhttp.responseText+')' );

and then use name-based indexing in JS. Note, that works because [ "a", "b".. etc ] is a shorthand constructor for a javascript array - in this case you're only using them to indicate the key/value pairs in a hash.

good luck, anyway.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Yes, that would work. You could also print output like this from PHP:

new Array( "Saab", "Volvo", "BMW" )

and then in javascript:

var myArray = eval( xmlHttp.responseText );

The eval function will treat the plaintext as javascript; returning an array type object in this case. That'd work for a numerically indexed array, you're using string indicies but you can use the same principle,

Don't use this principle the other way round whatever you do; that is, don't send textcode from client to server and evaluate it. That's the biggest security hole you could possibly make.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Eek.. again you need a way of determining IN JAVASCRIPT what the contents of a response represent. Semantically, there is no difference between an echoed PHP array and a line of plain text. All you are doing at the moment is reading the response text ( a string ) and trying to implicity cast it to a javascript array - this won't work.

When PHP echoes an array, it just prints out text to be output at the browser; at the javascript end you'd need to interpret that array using text manipulation functions or some other processing method, in order for that plain text to be a meaningful javascript array.

Just remember, the output from a typical server-side application doesn't have the same meaning as the running code that generated it; it has whatever meaning you choose to give it, but you have to choose how to deal with it, in order to give it any meaning atall.

That aside.. can you post the output from your PHP page? I'm not in the mood to run PHP code this morning, but I want to see how close to interpretable an array dump is..

MattEvans 473 Veteran Poster Team Colleague Featured Poster

As far as I know, RPG Maker is Windows only development and Windows only deployment; so no, it's not cross platform in any way. There's nothing technical to stop someone writing a non-Windows version of the engine or IDE but to my knowledge, nobody has.

With regard to marketing and licencing; you'd have to ask the developers of the engine about their terms or research in their own documentation. It's always best to adhere to the terms as specified by the developer of the product rather than treating anecdotes as precedents. Look for licensing information in the install documentation, if you can't find any, contact the developers since it's an important consideration.

Be aware, since the standard release of the package may incorporate graphics produced by more than one copyright-holder, you may have issues on a by-asset basis rather than a by-production basis.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

So does this mean i have to return other http status code manually incase i catch an exception?

That's what I would do; if PHP doesn't abort with true HTTP errors, then catch every possible error at the PHP level, set a 4xx or 5xx error status code and respond the error message, otherwise set a 200 status ( its the default so you dont have to do anything ) and respond a 'success' message or whatever else it is that you want to respond with on success.

I forgot to mention, if using headers manually; you must set the status and header before responding any other content - this might mean you have to buffer output until you're sure that the response is error free, or decide very quickly whether the response is an error or not. Also, you'd have to mark en entire response as either an error or a success, so, you wouldn't be able to mix error messages with success messages.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

If the user doesn't have 'rights' to download the stylesheet then it wont affect any pages they view. if i read your <link rel="stylesheet" type="text/css"href="style.css" />, I know that 'style.css' is either in the same folder as the page, or at the very least the server will act as if it is. The browser needs to download that file in order to render the page, so if you protect the file (i.e. give it no public read access), the browser cannot download it, and thus cannot style the page. Of course, there are ways to slow down those people trying to 'steal your work', but, in general; it doesn't matter what convoluted route or server trickery you perform - if you put it on the web, and link to it ( in any way ), anyone who can see it can get it.

I never consider the protection of intellectual property as one of the main reasons for using an external stylesheet. Neither does anyone else.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

An uncaught exception server side should cause the response to be an 'error 500 internal server error'. I think PHP generates its own descriptive error pages; but it still may respond with a status other than 200.. If you didn't know; every response from a server starts with a 'header' which has important information; a status code, the page's content-type, user-provided data, and a few other things. We don't see that in view-source, and PHP doesn't force you to consider it, but it's there. Use this http://web-sniffer.net/ to view the header of a page that raises an error. See if the HTTP status code is something other than "HTTP/1.1 200 OK". The property ajaxobject.status returns the number of the status code: in this case 200. You can't split up the response from a server into 'errors' or 'non-errors' unless you define how to split it up. There is no such thing as an 'error' in a valid response : it is all basically plain text. The header tells you what the response should be treated as. [ and you can, via PHP, set the response to have any header/status you desire ]

MattEvans 473 Veteran Poster Team Colleague Featured Poster

If by 'error message' you mean an error in the server side code; the error message is returned in the response text. If the error message is generated by conventional means; the xmlhttp object's 'status' property will be anything but 200, where 'anything but' is one of the standard HTTP status codes: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html The 400+ range off codes are usually errors.

If you mean an error in the client-side code; use some try/catch blocks or pre-checks to find the error and output the message.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

<off-topic>

off-topic: What's going on with the game-dev forum lately? Is it just me or is it becoming a horrible mess of useless posts?

Agreed.. there's alot of "how do i make a game?" which is an unanswerable question without more detail; a bit of "how do i do [some thing] in [some commercial game]", which is nothing to do with games development; a load of other questions that either aren't worth answering or are too general to answer in less than an essay; and very few real support questions. But; the games forum's always been a bit like that; I guess that one 'games development board' in a big general IT site isn't gonna get the best conversation. Perhaps stricter and more visible rules could help; although, a sticky post is quite likely to get ignored; since the thread "Game Development FAQ's, Books and Resources" should give anyone asking "how do i make a game?" something to be reading.

The weekly spammer isn't much help either :| I don't think 'addy999' could be a bot; some of the stuff he's said in other posts is too stupid to have come outta a machine.

</off-topic>

<on-topic>

There's not really a moral question involved if you're modifying your own copy of a single player game.. maybe it breaches the software's licensing agreement, but those things are honestly too strict anyway. If I'm allowed to 'delete' the game, I'm allowed to modify the binary of the game, …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

3D math and physics, artificial intelligence ( as it relates to games ), 3D graphics [ stay on top of all of the updates ], general programming skills, data formats, optimizing, and more... of course, pick/change/add the parts that are relevant to what you're trying to do. A good way to learn alot is to try and make something ( a game ) that you don't know how to make. You'll be forced to find out and learn alot of things. There's no real substitute for that.. reading all the theory is mighty boring unless you have ( or can see ) a use for it.

scru commented: thanks this helps +1
MattEvans 473 Veteran Poster Team Colleague Featured Poster

If you work real hard in C# you'll learn some neccessary skills and they'll transfer. Ask yourself this; do you seriously think that you, alone, are going to make a game that exceeds C#'s capabilities? If not, use C#! If you start 'a game' in C# and find it's beyond C#'s capabilities, for whatever reason; you'll have got quite proficient in many aspects of [games] programming, and you'll understand which parts would benefit from being written in another language, and why.

As jbennet implied - the major consoles all have devkits that only professional, established developers can get hold of. Whilst there are alternatives for amateurs, to some degree available in all of the popular languages; the fact is: if you do all the games programming you like, in every language, and learn everything; you're still an amateur until you're employed as a professional. I didn't learn C++ until I'd learnt and heavily used lots of other languages beforehand; that didn't make it particularly easier to learn C++, but I did learn alot of principles about programming games without the pressure of learning a complicated, unforgiving language at the same time. Now, not to brag, but I can knock up a 3D movement, collision detection and basic physics system, from scratch, in days; and I'd still say I'm "learning", because everytime I make one I do it slightly differently/better in some way. It took me months to do it the first time ( in C++; but I'd also experimented …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

For anything that can be said that's bad about microsoft; they certainly encourage amateur developers at times, and that's good for the industry; encouraging more people to learn and use a general and reasonably powerful programming language rather than the modkit for their current favorite FPS/RPG isn't a bad thing. Ok, you wouldn't want to write Halo 4 in C# + XNA, but a professional dev team should know that anyway.

XNA isn't really a 'full' game framework. It does graphics, input and sound, it does some work towards importing graphics data; not much else. That aside, you can write games in C#+XNA, you can write games in Java, you can write games in Visual/QBasic. You could probably write games in COW ( http://www.bigzaphod.org/cow/ ) if you had a way to call graphics libraries or talk to a runtime.

Again though, my stance is that engines and high-load libraries *should be* written in C++ or a lower level language that compiles to machine code, where *should be* can be replaced with *nearly always are* if an irrefutable fact is desired. However, any language that compiles to equivalent machine code and exposes a neat C[++] call interface is equal in any metric that matters.

Personally, I wouldn't mind writing lower-load aspects of some of my projects in a more domain-specific language.. but.. I've yet to encounter one that really appeals to me.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Er.. this was a hot-ish topic last week: http://www.daniweb.com/forums/thread88858.html

C# is a Microsoft lock-in, Java doesn't work (yet) on any major consoles. I would say, neither of these languages will replace C++ in games, perhaps another language will, and perhaps it'll be the next revision of the C++ standard http://en.wikipedia.org/wiki/C++0x.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Hm.. the only other thing I can suggest is putting a background color on the movie that fits in better with the other colors on your page. That's not really a fix though, by any means. You could also try giving the section(s) underneath position:relative; and top:-3px; via CSS, and then only serve that rule to FF.. but that's even messier and a little complicated to say the least..

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Try adding CSS like this to wherever the rest of your styles are defined:

object,embed
{
margin:0;
padding:0;
}

That's the only thing I can think of off the top of my head... Also.. check to see if the space is INSIDE the object/swf instance itself, or if it's in the page; that is.. check to see if the movie itself is exactly 31px high, and whether changing the height specified in the object tag and embed tag changes the white space atall...

MattEvans 473 Veteran Poster Team Colleague Featured Poster

In some FPS games of a few years ago; physics simulation is a part of gameplay.. Think Halflife 2; you throw things ( boxes, cars, etc ) around, they affect other things; in Red Faction, which is really quite old now; you can blow holes in walls. In other FPS games that I've played briefly, but not enough to remember specifics, you can hurt people by hitting them with shrapnel from exploded objects, take cover from explosions by ducking behind short walls, etc.. That isn't so advanced anymore, but; I would imagine, based only on the history of games so far, that the 'advanced' physics in any time period will be more prevalent in FPS than RPGs. For modern, look at anything that uses Ageia's PhysX SDK ( i.e. Unreal Engine 3 ), or Crytek's CryEngine2.. CryEngine has support for realistic ( and massive ) explosions and interaction with the environment, PhysX SDK potentially supports realtime soft body, cloth and fluid simulation.. There is more to physics in games than paths of bullets and the like... what's the last FPS you played?

Any RPGs I've played don't really have even single object, rigid-body physics; the map is usually non-modifiable, and when you destroy an object it just disapears. That's not to say it'd be unreasonable to put good physics in RPGs... just that it doesn't seem to get done.

Decent gameplay-altering physics in a massively online game of any genre would be hard to do; since it'd have …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Why did you repost exactly what I said, mohanrobin? :p use quote tags and only if you have something to say about what i had to say.

jbennet.. physics in most RPGs isn't as heavy as physics in most FPS; only because it's not as integral to the game experience. By that statement I meant, RPGs don't need to have, and don't tend to have, the same complex physics simulation as FPS; not that RPGs don't have any kind of physics and FPS do.

'Advanced physics' implies soft body/fluid dynamics and realistic destructable/multipart objects in this day and age =P.. First-person shooter/adventure engines are starting to have them, based on ( certainly approximate ) solvers that take alot of variables into account; those MMORPGs you listed might fake this on a certain level ( i.e., breaking and fluids based on pre-written animation ), and have some degree of rigid body simulation; but.. that's not advanced anymore. I hold by my statement, that RPGs don't ( generally ) have physics like FPS. Correct me if I'm wrong; I've only played WoW once at a trade fair.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Learn both. If you use only vertex buffer objects in OGL, and manually specify the transform state before drawing every object; that's how Direct3D works.. with a few other differences I suppose.. Hey, as an advantage in Direct3D you don't have to write your own matrix/vector classes -_-

Learning both simultaneously isn't really a good idea though.. I have been flitting between the two as tasks demand; I would say, that there are more similarities than differences between the latest OGL and D3D. Definately learn both at some point.. Unless you never need to work on a Microsoft plaform.

As jwenting said; there's more to DX than D3D. I guess you're using Glut/SDL/Windows API or similar, to do (some) of what the rest of DX does. If you're using SDL, you can keep using it with Direct3D; and it simplifies all the boilerplate code you'd usually have to write to set up D3D with the Windows API..

MattEvans 473 Veteran Poster Team Colleague Featured Poster

But why? I actually have tried to do it, Java worked OK for this 3D game; comparable with C++ on the same machine; most of the speed problems were introduced via naive coding style. There aren't any show-stopping technical disadvantages to using Java; if releasing for the PC. Reasoning? The CPU intensive task that most games want to do is transform/lighting/texturing/etc - this is usually written in very low level code, and always accessed via some level of abstraction whatever platform is used. If you have low-level libs for physics aswell; the rest of the code in a game is usually 'light', event-based, quite dynamic; so, in a way, it doesn't matter what language you use for that part.

I didn't finish the game because I didn't finish the engine because it got stagnant and over-engineered. I'll happily write games in any language - some of the high level frameworks provide so many useful tools/libs, even runtimes these days. But.. if I was writing a tool, lib, or runtime; 'an engine'; I would want to do it in C++. In the games world C++ is more cross-platform-compatible than Java, it's got a proven track record; you rarely need to work at a lower level, but it is quite easily understandable, useable and well documented; a new language standard is going to be released soon, I don't see C++ stopping being de-facto.

The only time I'd want to use Java for any part of a game client, is if …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

It can be done with Javascript, using the function "window.print( );"

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Well.. I notice your javascript has disapeared from the output.. Why did you change the way you were outputing it? When I said, don't put the Javascript inline... that isn't exactly what I meant.

Certainly output a valid HTML document. Firefox is a bit nitpicky about standards.. What is printed is interpretted as a document, and whilst you can get quite... badly formed documents that still 'work', I'd advise that everytime you output anything to the browser; even something as short and invisible as this; that you make sure the document it is encapsulated in is a halfway valid document..

So.. I'm gonna tell you what you should try and get your script to output.. I'm not gonna rewrite your server script.. I'll leave that to you.. I've quoted attributes, which might seem a problem since you're allready quoting strings.. I've tried as hard as possible to only use single quotes; but there are a few places where I had to use double quotes... You'll have to escape those double quotes. If you don't know how.. read bottom few lines of this post.

Ok. You want your server script to output this exact HTML. It works, in Firefox, and Opera.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<TITLE>ASPXTOASP.aspx</TITLE>
</HEAD>
<BODY onload='document.forms["t"].submit( );'>

<FORM name='t' id='t' action='ASPXTOASP.asp' method='post'>
	<INPUT type='hidden' name='username' id='username' value='cpio@email.com' >
	<INPUT type='hidden' name='password' id='password' value='mypw' >
	<INPUT type='hidden' name='destpage' id='destpage' value='login.asp' >
</FORM>

</BODY>
</HTML>

To escape the double quotes; like …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

document.getElementById("t").submit( ), or document.forms["t"].submit(); should work.. It may be the case that the inline script isn't running at the right time, or that the form cant be auto-submitted from inline script... if that was the case you'd need a body 'onload' handler in javascript to invoke the submission of the form.. but, I can't see a good reason why inline submit should be problem.

If it still doesn't work with either those changes, please post the HTML output ( via View Source ) when that page is accessed in the browser.

That's a really messy way to pass values between two scripts sitting on the same server.. Don't you think it's a good idea to include a <html>, <head>, <body> element, and to quote the attributes of elements? Dunno if ASP decides to add/fix those things for you on output.. so ignore that comment if that's the case.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

A slightly better(definitely not the best!) way of doing it would be:
....

Definately not the best... What's the reason for assigning different classnames twice in sequence on the same object? Where do the variables link3 and link4 come from? Simple mistakes though.. I can see what you meant to put, although that's not all that helpful to a beginner in the language... On the other hand.. finding mistakes can lead to better understanding, I suppose =P.

Assuming that this is going towards each of the links only being 'active' at one time, and continuing for all 4 links:

<script type="text/javascript">
function activate( link )
{
  var e1 = document.getElementById( 'link1' );
  var e2 = document.getElementById( 'link2' );
  var e3 = document.getElementById( 'link3' );
  var e4 = document.getElementById( 'link4' );
  e1.className = e2.className = e3.className = e4.className = "nav";
  var the_selection = document.getElementById( link );
  the_selection.className = "sel";
}
</script>

Code posted by melles does the equiv, although, as a side effect it will switch all 'td's in the document to be of class 'nav', which isn't necessarily desired..

Or.. if wanting to remove obvious multiple redundancies in either melles' code, or the one I just put:

<script type="text/javascript">
var last_link = null;
function activate( link )
{
  if( last_link != null ) last_link.className = "nav";
  var the_selection = document.getElementById( link );
  the_selection.className = "sel";
  last_link = the_selection;
}
</script>

or some other orchestration.. the second relies on a global; which means that the function …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

The id attribute is required in a form tag in XHTML, the name attribute is required in the form tag in HTML. You have neither in the form in the last div displayed.

XHMTML id is NEVER required. name isn't required for form elements ( or even fields ) in HTML. It's optional. Not every form needs a name or id; not every form is necessarily accessed via javascript/CSS etc. Even if every form was accessed by javascript/CSS, it wouldn't need a name or id. id is always optional; it's defined in the XHTML core module for all elements as optional; as far as I know, so is name in HTML.

http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#a_module_XHTML_Common_Attribute_Definitions
http://www.w3.org/TR/xhtml-modularization/dtd_module_defs.html#sec_F.3.4.

If you can't read DTD, these are the relevant fragments from the XHTML DTD with commentary:

<!ENTITY % id.attrib
     "id           ID                       #IMPLIED"
>
( id.attrib is a DTD parameter entity in the syntax for an optional [ implied ] attribute, of type ID with name 'id' )
...
<!ENTITY % Core.attrib
     "%XHTML.xmlns.attrib;
      %id.attrib;
      %class.attrib;
      %title.attrib;
      xml:space    ( preserve )             #FIXED 'preserve'
      %Core.extra.attrib;"
>
( The id attribute is 'copied' into a list of core attributes; later, core attributes is copied into a list of 'common' attributes, but, take my word for it, I'm not gonna copy that one )
...

<!ATTLIST %form.qname;
      %Common.attrib;
      action       %URI.datatype;           #REQUIRED
      method       ( get | post )           'get'
      enctype      %ContentType.datatype;   'application/x-www-form-urlencoded'
>

( The 'common attributes' [ which contains 'core attributes' ] are copied into …
MattEvans 473 Veteran Poster Team Colleague Featured Poster

form != input..

name is XHTML deprecated as an attribute of the form element, that is <form...>. It's not deprecated on any of the form fields. The validator can't be wrong, it's fed the DTD/schema and it validates the input page; the schema/DTD can't be wrong; because they ARE XHTML 1.0. If the validator program itself was wrong... meh.. it's not.

I guess what people are trying to say is that name is not deprecated on the 'tags that make up forms'. which is a little ambiguous I'll admit.. but, read the posts, look at the context of examples.. name continues to be a valid attribute of input, select, submit and other form fields, and it is indeed needed for those fields to be submitted when the form is.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

If you document.write( ) AFTER the page has loaded fully, it tends to write in a new, blank page ( http://javascript.about.com/library/blwrite.htm ). It's not particularly well standardized behaviour between the browsers, so you're advised not to use document.write( ) after the page has been loaded ( i.e. button click -> document.write or similar is a no-go ). I guess, 'why' it doesn't work is because only with a document.write executed as the page loads can the browser infer in any reasonable way 'where' to put the written content. After the page has loaded, there is no reference point as to where the written content is supposed to go. IE assumes that's it's after the rest of the content in the body element, but the behaviour of document.write isn't defined after the loading phase, so any browser can, reasonably, do what they want with the content. Firefox puts it in a new window.

Infact, you're not even supposed to use it while the page is loading if your working with XHTML ( http://www.w3.org/MarkUp/2004/xhtml-faq#docwrite ).

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Ah, me to, in terms of formal teaching; but I don't believe that you haven't done ( or won't do ) a load of 'extra-curricular' reasearch to augment that. :)

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Dunno what high-school you went to, but they didn't teach 3D spaces at my school; certainly not at GCSE ( if that's "high school" ) level. I remember learning 2D triangle and vector basics; but nothing about projecting and transforming using 4x4 matrices, the intricities of 3D rotation, or anything atall about 3D surfaces, physics calculations in 3D, etc. The extra dimension does make alot of difference; unless you're only using 2D principles with 3D graphics..

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Do you understand 'basic 3D theory' that is, the math behind affine transforms / matrix algebra, vectors, projection into 2d space, etc? If you don't know how these things work in a practical sense; then you'll have a real problem with DirectX or OpenGL. ( If you're working in 2d only; I guess there's less to learn, although vector math is still quite useful in 2d ). If you want to do complex physics, spacial AI, or anything like that... well, it's nice to have a visualization framework to help you see what you're doing.. strictly speaking you don't 'need' one, but it's nice, and it helps.

I found playing around with Java3D http://java.sun.com/products/java-media/3D/ was quite helpful in getting my head around 3D concepts ( and it's good for visualizing/prototyping quickly ); the techniques involved aren't directly transferrable, since it tries to abstract most of the math into a scene-graph; which you don't get as-standard in DX or OGL, but it's a forgiving way to start with the basics, and to do anything complicated with it, you need to delve into the un-abstracted math side of things.

C# + XNA is also quite forgiving, it wraps much of DirectX's functionality, so you don't have to write so much code upfront.. you'd still need to have a decent idea of the 3D math basics though, to do anything beyond trivial. I don't mean by that, that you need to go study the theory / history behind the …

MattEvans 473 Veteran Poster Team Colleague Featured Poster

I'll agree, the Qt licensing sucks. GTK isn't bad though; it's LGPL, which is reasonable.. It (GTK) IS a messy API to use directly, but the Glade XML format is handy. Neither of these really aim to be standards; they are multiplatform APIs for user interfaces, that's all, and they do that well.

Anyway, I know where you're coming from, but if a standard for the runtime and GUI gets Java + Swing; I'll stick with no standard GUI, threads or networking; and C++ & libs / engine code. It's totally a preference thing, but there are good reasons for having that preference - and it's nothing to do with running speed ( or resistance to change - I learnt Java before I really understood C++ ) : it's mainly the lack of the same amount of groundwork in games libraries on Java as is on C/C++, but also a dislike of the simplicity of the Java language, which actually makes it highly complicated to use at times. Also.. for all of Java's proclaimed multiplatform-ness, I don't see a JRE on the Wii, DS, Xbox360, PS3, PSP, etc..

MattEvans 473 Veteran Poster Team Colleague Featured Poster

DirectX is hard because it's very raw. OpenGL is less raw, but not necessarily easier to learn. I would say, it's easier to start in OpenGL - you'll get that spinning triangle on the screen with less written code; it doesn't necessarily get harder, but you have to consider the OpenGL system state constantly, which can be confusing. Once you understand the basics of either, the other is easier to learn.

Why start from scratch.

Because it's fun, mentally stimulating and lets you do everything the way you want it, from the very beginning. Afterwards, you can look at it running and say. Wow. That's only happening because I explicitly told it to do that.

That said, it's also fun ( and fast ) to work with existing engines, although, the engines-in-3d-editors aren't my idea of highly polished and capable game engines..

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Swing indeed. And before that AWT (which is still at the back of Swing in the non-visual area).
There's nothing like that for C++. Each compiler and platform has its own user interface libraries, and often a plethora of them, some of which work only on some platforms and libraries and others on others.

Yeah, if you make a C++ application and insist on using one of the operating system's GUI systems/APIs directly, you're gonna run headfirst into portability issues. If you use a multiplatform layer inbetween, something like Qt or GTK or similar: your app will work the same on windows, mac, and linux.. the portability issue disapears ( as long as those are your target platforms.. ). Same with 3D even; use SDL + OpenGL, and all necessary porting is taken care of, between windows and linux atleast. I see the 'C++ apps aren't portable' argument as a myth; from experience with 2 largish apps: as long as I'm careful and avoid ( or allow the switching of [ which is rarely necessary ] ) all platform-specific code, and use multiplatform libs where appropriate; building the same code on windows and linux is trivial.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Basically whatever url I passed in xmlHttp.open("GET",urlstr,true) had to match the actual url in the address bar.

Yes, this is the case. www.domain.com is a different subdomain from domain.com in terms of the address.. it might not infact be a different subdomain but the address indicates that it is. FF is security conscious, it'll think your trying to issue ajax requests to a foreign domain.

If you're ajax-ing to the same server that the page is hosted on ( which is all you should be allowed to do ), then try using a '/' rather than a http:// and domain.. i.e, instead of ajax-ing 'http://www.yourdomain.tld/thescript.cgi', ajax '/thescript.cgi'.. this will only work if your page is on 'yourdomain.tld', and not in a subdomain (other than www).

agrothe commented: thanks, very informative. +2
MattEvans 473 Veteran Poster Team Colleague Featured Poster

It all works fine, well, it does since Dani fixed the problem I was having with Quick reply and Advanced reply buttons... But; don't you Opera users see the jumping period? Make sure you have scripting enhancements turned on; then refresh this page and quickly scroll down to the quick reply box at the bottom.. Personally I don't see this as not working in any sense.. but.. it's certainly strange looking. I see it on this (Windows) Opera client and also on another Opera client on another Windows machine.

Strangely, it seems to be more powerful and continue for different lengths of time depending on the thread.. this thread for eg. http://www.daniweb.com/forums/thread88858.html is also a full-page of posts, but there seems to be visibly less jumping than there is when viewing this thread... maybe though, that's because there's more text and it takes longer for me to scroll to the bottom, thus causing me to miss the beginning of the jumping?

Anyway.. Dani; thankyou for fixing the Quick Reply problem. Personally don't mind the jumping.. I've got quite used to it now.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Yep, there is still jumping/re-sizing in those places when viewing the site using the Opera 9.24 release.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

I am using version 9.10, the very latest stable version seems to be 9.24.. I will update right now and let you know if it's still occuring.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Oh, there's at least one jump on each blog page to... it's really not noticeable on any pages but thread view; unless consciously looking for it that is..

MattEvans 473 Veteran Poster Team Colleague Featured Poster

I see jumping on thread pages and user profile pages; the pale grey rounded-corner boxes at the top of a user profile change height twice every time the page is viewed.. all the grey boxes on thread pages change height aswel. On other pages; board view and the main page, I can't see any jumping/height changes.

The second question.. it happens on any thread page; my view is newest first.. i see a button for 'first unread': when I click that the height change in all grey boxes still seems to occur, although its not obvious because it's at the top of page; i.e. its only one visible height change. - at the bottom of the page though, all of the height changes are visible.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Well, it still jumps around a bit; but now the buttons continue to work afterwards ^_^

( note: that's with wysiwyg editor and scripting enhancements enabled, which means, the problem is gone )

MattEvans 473 Veteran Poster Team Colleague Featured Poster

Hm. As for the jumping in Opera - it is still occuring; and the submit buttons do not work whenever the wysiwyg editor is used in combination with the scripting option.
The problem does not occur atall in Firefox ( wysiwyg editor or otherwise ); there is no visible jumping phase in Firefox either.

MattEvans 473 Veteran Poster Team Colleague Featured Poster

I don't see it as the font changing size, although it could be in places.. most apparent visually is the page contents translating up and down.. on closer inspection though, objects are moving around slightly during that period; in the advertisement and user title/avatar blocks between posts - the small changes in height of each of these in rapid succession kinda accumulates towards the bottom of the page to give the 'vibrating' effect.