Programmers can talk all about their craft here
Programmers
reading pixel depth in linux
Would anyone know how to read the current pixel depth in linux
(like 8 bpp 16 bpp or 32 etc). The XF86VidModeGetModeLine will
give you the x and y and frequency but how do you read the bits
per pixel?
Programming and Chicks?
I was just wondering, as an offshoot to the last post of the "When did you start programming" thread, does being a programmer help or hinder people picking up chicks, and picking up guys for the women...
What about insights from people that have a significant other? Did you find that your occupation/hobby was a hinderance or a positive effect?
And would the inability of some programmers picking up be an offshoot of just the programming, or the whole "geeky" environment that they are stuck in?
Anyways just some questions that I am pondering...
Hopefully this doesn't lead to us opening up a "Sumea Personals" forum ;->
I called in some expert assistance to answer this one (ie my wife). Her comment? "As long as you think of it as 'picking up chicks', you won't" :-)
Personally, I'd say drop the "chicks" tag and think about the actual implications of what you're saying when you label a woman as a "chick". Cute, small animal with barely a brain cell? The respect is just dripping off that description... Not :)
Occupation is irrelevant once you meet the right person, IMO. If you want a real relationship just toss out the crap that society feeds us, and be yourself :) People are much more interesting when they are passionate about things in their life rather than constantly trying to adapt themselves to what they imagine everyone else expects of them.
Cheers,
Mark
Well my fiance and I are both gamers, were as bad as each other, fighting, pushing and shoving to see who can get to EB first etc, or be first to get the 'cumfy' chair when playing a bit of Champions of Norrath.
I dont really think being a gamer or interested in games really makes that much of a difference anymore, but it definately did in the beginning as I met her at uni whilst studying for my DIP.
I have had 3 previous girlfriends, and the first 2 basically said " ITS ME OR THE PLAYSTATION! " ... so ... i just curled up with my ps1 controller, and said " BAH! Dont make me choose !! you evil , EVIL being!! " the third however was a bit more recieving, even had a bit of a streak there where I thought I was onto a successful non-nerd to nerd conversion. But alas it was not meant to be.
I didnt have any gamer related problems attracting members of the opposite sex, it was more of a " Oh my god you play games ? you nerd ! Pffffffffff good bye " problem.
/end of of Hazard's 'This is your life' episode.
HazarD, you?re a lucky man! Oh, to find a woman that understands?
My previous girlfriends/dates have mostly considered the games thing to be overly geeky, but then I consider the gay pop/dance music that some of them were into a million times worse.[:P]
As far a programming goes, I think it depends on the girl or ?chick?. If they are young and dumb (i.e. a chick) then you?ll probably be labelled a geek, but if they have a brain (like all the good ones) then I think it might help put you into the intelligent category ? but that?s only first impressions. Once a couple get to know each other, I don?t think it really matters what you study or work as.
Then again, that?s just my experience. I?m no romance guru! [:P]
Looking back onto this now it was a mistake to use the word 'chicks' :-
I have to mention that at University in Computer Science when I started there were maybe a couple of girls doing the subjects, compared to several hundred guys. However there seems to be a higher concentration of girls starting computer science subjects this year. This might seem to indicate that computers are becoming more mainstream?
Thought I doubt that it will help our chances of finding someone that is "compatible"...
something really shocked me and my fiance both yesterday, we were in the city store of EB, and a couple of young girls, about 18 - 20 at a guess, dressed quite funky and fashionably entered the shop.
Things are definately on the change - these wernt the stereotypical glasses wearing nerd-girls either, they looked and appeared just ordinary averager teenager 'hip' sorta young woman.
It was quite the odd culture shock ( and very apparent ) for many of the young men in the store, to see 2 good looking young females talking and rummaging through the stacks of games, sounding exactly like any hardened gamer would, speaking of gameplay elements in the various RPGS and FPS's they were picking up etc.
programming tends not to be a female friendly disipline (IMHO)
Unfortunatly a. you have mostly males b. the males tend to like to do things the 'interesting' way, rather than what may be correctly sugested by a female as a 'practical' way, so the males get pissed off, make the femalaes work less comfortable, and she leaves.... and c. most programmers smell, and females (and some males) may tend not to like that. //not to generalise/ start flame war, but that is my impression, and the impression given to me by several females, so of which where programmers.
Daemin, if you want chicks, take up salsa dancing or an arts course/ language... again, IMHO (or i should realy type, in my not so humble opinion)
DSC
I totally disagree with you david!
Females can code fine, they just have to want to.
And I dunno what programmers you hang around, but I don't know any that smell.
Here's my take on all this:
Because programmers aren't so popular, you'll probably have to get to know a girl first before you get a chance to go out. The easiest way to get to know someone is to work with them, but as there are not many female programmers around, you will have to find some other way to meet women. So in that regard, it hurts your chances unless you get out an make an effort.
I took up programming to pick up chicks!
I agree with Redwyre about programming. It is not unfriendly to women and we can do it just fine. I think the major issue is that programming is not being presented as a career option to girls thus they do not realise it. Also, when I did my TAFE programming stuff half the course was female. So there is a big difference between specialised (games) and standard (business apps) in terms of women and career opportunities.
I do agree with Dave on actually getting out there to meet girls. You are not going to find them sitting in your house playing LAN games with your buddies at 3am (unless of course you start looking at mail order brides). You do actually need to get out and do things to meet people.
well, you never know, playing LAN games at 3am, the girls might suddenly start falling out of the ceiling.
Hello Redwyre, good to know that you don't know any proggramers that smell, i know too many. (though my own 'do i pass the smell test?, oh, better have a shower before going to work' test in the morning is not fool proof, or at least not proof of this fool)
salsa dancing is fun though, helps a lot with animating :)
Daemin, daemin, daemin. I sure hope you haven't been using your 'games programming' status to try and impress the ladies :)
Personally, I think the only problem with being a games programmer is the fact that alot of your colleagues are also male...so unless you are gay (no can of worms intended here) you aren't exactly going to hook up with anyone from your workplace... :(
As for this whole 'chicks'-rage...women change their mind all the time, call 'em ladies and they reckon you are labelling them as old, call 'em girls and they think you are referring to a little kid, call 'em women and suddenly you are labelling them as some kind of middle-aged mum, call 'em females and you are some kind of odd-ball. SO yeah, you are all chicks/girls/ladies/women/females/lassies whatever. It's better than some other names people use for de women.
Lastly, my one and only relationship failed utterly so I'm not going to offer any advice for how to meet Ms/Miss/Mrs (hah! See can never make up their minds!) Right - because I can't say I've ever had any experience there myself.
Daemin - what's your advice for how to pick up chicks?
Aside from alcohol....(ahhhhh I am so mean in the afternoon) :P
quote:Originally posted by Maitrek
As for this whole 'chicks'-rage...women change their mind all the time, call 'em ladies and they reckon you are labelling them as old, call 'em girls and they think you are referring to a little kid, call 'em women and suddenly you are labelling them as some kind of middle-aged mum, call 'em females and you are some kind of odd-ball. SO yeah, you are all chicks/girls/ladies/women/females/lassies whatever. It's better than some other names people use for de women.
HAHA! I'm sorry, it's just so funny that you mention that, as I have recently spoken to 2 separate guys from different companies that haven't known what to call me! Seriously, I really don't think too many girls worry what they are called as long as it isn't rude!
As for picking up chicks.... It really has nothing to do with being a programmer... Just try and be nice, natural, funny (in a non nerdy way!) and make friends with girls, we won't bite! (unless you want us to of course [:0])
quote:HAHA! I'm sorry, it's just so funny that you mention that, as I have recently spoken to 2 separate guys from different companies that haven't known what to call me! Seriously, I really don't think too many girls worry what they are called as long as it isn't rude!My sentiments exactly :)
quote: I can only be funny in a nerdy way ^.-Yeah, I'm stuck there too Blitz.
quote:Just try and be nice, natural, funny (in a non nerdy way!) and make friends with girls, we won't bite!lol - you'll brand me misogynistic for this but you should check out [url="http://www.intellectualwhores.com/masterladder.html"]this[/url] site -> it's not serious (I hope) but absolutely hilarious! (not for those offended by crude language)
daemin, the challenge is to get the girl to talk about herself, if you can get her to do that for and extended period of time, you get to be called a 'good listener'.... just add some 'un huns' and a few questions, just don't offer solutions to problems, she might just be looking for sympathy/ empathy
Visual Studio 2005 Express
Microsoft have release free beta versions of their visual studio 2005 products:
http://lab.msdn.microsoft.com/express/
You can download the .NET2 beta installer from here: http://www.microsoft.com/downloads/details.aspx?FamilyId=F1232C37-0FEE-…
If you like to keep backups of the installers, check your temp directory for a folder called something like VSSETUP and grab the .exe files from there after they are downloaded.
2D Platforms
I've finally managed to attempt my first game and i've been fiddling around over the last few days with an api called sdl[url]http://www.libsdl.org[/url]. I've managed to get sprites working and a scrolling background, also some basic collision with bmp's. However i've run into a problem with making a level, i can't think of a good way to get a 'ground' surface. I can get a big long bmp along the bottom to work, and also place little bmp's around the screen, but this makes level design dreadful. I was wondering if it's possible to do some sort of colour collision within a bmp, i can set a transparency colour so i figured it would be something to do with that? If anyone has used sdl before and knows how to help or any other solution, it would be appreciated.
~thanks [:D]
It sounds like you're working out your collisions through looking at the actual pixel data of the bitmaps. Reading between the lines I think you're using bitmaps to render and represent the platforms?
What I'd suggest is making 3 tiles for each platform - the left end, "middle" and the right end. These should all tile together ok - then you can define your platforms as being a line in space, and render the end tiles and as many middle tiles as you need to complete the line.
So instead of using bitmaps, you're doing rectangle calculations for collisions, which are much much faster.
You could extend this tile scheme to do your ground too - so that there's water along the ground in parts, then sand, then grass etc - you can do some nice transition tiles to link between the different terrain.
A quick hacky way to do your level design then might be having a text file that had various characters representing the tiles:
[code]
%%%%%%%%
**** ***** ******* *********
###############&&&&&&&&&&&&&&&&##############-----------#############
[/code]
Where say % = clouds, * = steel mesh catwalk # = grass & = water - = ice
And you could do nifty things like make your character slide on the ice, and do a swimming animation through the water etc.
Cheers,
Mark/CW
Farb-Rausch releases Werkkzeug, Demo Toolkit
Saw this on slashdot this morning:
[url]http://slashdot.org/articles/04/06/22/0332241.shtml?tid=126&tid=152&tid…]
Game programming
Well, if some of you have read my one other post, you'd know I have just recently picked up C++. So far, its fairly simple, with a few hard things to remember here and there. But to the point... I havent found any source code for... let's say a game coded in C++. If anyone has source code (want to post some or link me to some), it would be astoundingly appreciated.
Also, do not call me a NOOB or tell me to LEARN IT BY MYSELF. I have tried to put my knowledge of C++ into the process of game producing, but it's so limited nothing happens. If someone has some source code to a small game (no text advents plz), GREATLY appreciated. [:D]
There?s plenty of general information and tutorials around for games programming (check out the links in the coder section), but personally I think that nothing compares to a good textbook. Sure, you?ll have to fork out over $100 dollars, but there are many excellent texts around which pretty much all come with CD?s chock full of code samples and thorough explanations of that code in the text.
Check out [url]http://www.sumea.com.au/forum/topic.asp?TOPIC_ID=1242[/url] for what people around here reckon are good books. I guess it all depends on what level your at for what book is right for you.
Another thing I?d strongly recommend is looking for a well-documented, open source 3D games engine. There?s plenty around, just search around a bit. This thread [url]http://www.sumea.com.au/forum/topic.asp?TOPIC_ID=897[/url] lists a bunch of engines that people here have experience with. But there are plenty out there, you just have to look for them. Personally, I found that studying how game engines work greatly improved my games programming ability.
But personally, I think you just can?t beat a good games programming textbook!
PS ? Don?t worry about being new. Sumea is all about learning and developing after all. Not everyone here is an expert!
Also, places like [url]http://www.gametutorials.com[/url] provide good source code to specific game problems such as character animation, map loading, etc.
Hi, I remember trying to learn a language and build something that resembled a game.. back then it was all books and courses - now the internet is a brill resource for code.
As for C++ code, all depends what you are trying to do but looking at complete systems are always an excellent way to learn.
Try some free engines like:
Nebula/Nebula2 - http://nebuladevice.cubik.org/
This is a great well designed and _free_ engine (not GPL). With a huge community and excellent capabilities. Myself and quite a few others I know have used it to make games.
Ogre - http://www.ogre3d.org/
Another excellent source of C++ code - and gaming capabilties. Unlike Nebula Ogre is under LGPL which requires certain obligations if you wish to make a commercial product.
Other places to try for source:
www.flipcode.com
www.gamedev.net (already been suggested I think)
www.gamasutra.com and www.gdmag.com (associated sites)
and there are many more... google is your friend :-)
Also.. for really poor code try my site.. erg.. only if you dare..
users.senet.com.au/~dlannan/
there is just alot of oldish junk here - be warned, not C++ friendly!!
Cheers...
I'm trying to use OGRE now, because otherwise I'd be spending weeks on getting a nice base rendering system done.
Also LGPL licence means that if you modify the engine source code then you have to distribute your modifications. You don't have to do a thing if you just use the engine in a binary form. Although I believe that you also have to include the source code of the engine somewhere. But then again how many other game cd's (used to) contain "fun stuff" like developer images and such?
Gamecube shaders?
I got told that the gamecube doesnt support pixel shaders, and I've read some stuff that supports this, but I have seen a lot of great effects like, reflection and refraction, dynamic light and shadows, which as far as I know, are pixel shader effect.
So anybody thats programmed for the cube feel like clearing the air for me?
I don't know anything about the gamecube, but those things don't need pixel shaders to be done - but they do need pixel shaders to be done accurately :)
Reflection is done with cubemapping, refraction too I guess, light and shadows can be done via light mapping or per-vertex, and shadows can be done with the stencil buffer or projective textures, or before that, projecting a mesh onto a plane (very simple, kinda dodgy).
Pixel shaders allow those tasks to be done per-pixel instead of being done per-vertex and interpolated, so the visible result it much more accurate.
Don't have time to elaborate, but that should help you out.
There's a great article about building pixel shader like things for the gamecube up on Gamasutra (http://www.gamasutra.com/features/20021002/sauer_01.htm)...
Generally those effects don't require pixel shaders themselves, they can be done using conventional means too albeit they are far slower and take away processing power from the CPU that could be used for other things. This is all because shaders are just instructions executed on the GPU rather than the CPU...
The last hours of a Game Programmer
Hehe, wow, that subject sounds kind of morbid :)
Well, guys and gals, the day is quickly approaching. As of Tuesday (22nd) of next week, my stint as a Game programmer will be over. It's been a good few years, and through the job, I have had a chance to fulfill a few of my dreams.
From a million selling Expansion Pack, to a multimillion block buster, to even being credited on probably one of the worst games ever made (Renegade), to working on two games at once for a small independent company. I've had some good times and some great times, and occasionally, some really freak'n crappy times (Like 6 months worth for Generals :), but who's counting right). But the day is upon me to move on, to close this chapter in my life. To lock away the memories and hope they will never be forgotten.
Chances are, I will probably never set foot in a game studio again, will it be missed? I'm sure it will, but at the same time, I'm not sad to see it go. I've had a chance to live what other have only dreamed, it is now my time to hand the torch over to another enthusiastic youth so that he or she may be able to live out their dream. To you, my replacement, I wish you the best of luck, and to the rest of you who are still in the queue of gaming glory, "patientce" you too will get your chance to shine.
For those of you who are in Perth, or visiting Perth, I will be there as of July 14th. Feel free to drop me a message and the first cold one is on me :)
Chris
Credits:
C&C Yuri's Revenge
C&C Generals
C&C Renegade
Kohan 2: Kings of War
Axis and Allies
Thanks Everyone!!!!!!!! :)
quote:Originally posted by Leviron
So what's your new career (or job choice) going to be?
Hehe, I'll figure it out as I go along :) I'm hoping to stay in the land of C/C++ but away from things like ASP/internet technologies. Then again, there's always codyalday's suggestion of becoming a porn star :) But somehow I doubt my girlfriend would be to happy in me doing that.
quote:Originally posted by Aven
Don't feel too bad. Postal was a hell of a lot shitter then Renegade :D
Hehe, that's good to hear there was at least one game worse then Renegade :)
quote:Originally posted by Souri
.. and are you still gonna lurk here occasionally? : :)
Definitely! I'm also interested in setting up some kind of once a month or so "STS" (shoot the sh*t) session in Perth if people are interested.
So now that your arent working for EA anymore, give us all the dirt! [;)]
Good luck man! Also, your going back packing around Australia arent you? If your in Canberra there are a few Sumea fans who would probably appreciate meeting you *Cough, me [:p]*. But then again there are a lot of Sumea fans and members [;)].
Oh and as for Renegade, the last i heard it wasnt to shabby. I might pick it up from the bargain bin sometime if i can find a copy.
Haha, actually, my backpacking trip was last year, that was when I left EA (hehe, wen't a little insane from the crazy work conditions) Then I came back to the US after 6 months and started working for a small game company "Timegate" so, that's where I'm at today (my last day :)) Anyway, I'm not sure when I'll make it through Canberra.
As for bargin bin prices on renegade, I saw it for 7 bucks the other day :)
quote:Originally posted by Souri
Anyway, I'd be interested I hearing on why you've left the games industry. Did that IGDA Quality of Life paper have anything to do with it?
Haha, it was more like living the IGDA QoL paper that did it :) Actually, like I've said before, my last company, Timegate, they treated us good and we were able to have a life. So I guess my decision to leave is A) Timegate is the exception, finding another company like that would be hard to find, b) I already had my 15 minutes of fame with C&C Generals, so now the "coolness" of being a game programmer has lessened. In the end, it's just a job. and c) I get bored doing the same thing for too long :) So, with the move, nows a good time to try out new things. I hear they need explosive experts for the mining companies in WA :)
Essentially, I'm glad I did it. If I had to do it all over again, I would! I mean, C&C Generals was my dream project, so now that I've lived one of my dreams, it's time to move on. Of course, I still enjoy games, and I'm always willing to chat about the expriences and to help out those that are trying to get into the industry (I have LOTS of friends in the US game industry).
In any event, I'll still hang out here and help out when I can :)
quote:Originally posted by Daemin
DaMunkee: You should still attend the Australian Game Developers Conference this year, I reckon it will be a blast having you there, meeting the Sumea 'crew' etc :-)
Sounds like a plan Daemin :) I was actually planning to present this year, but with the move, I completely forgot about the deadline! Maybe I'll present next year. Hmmmm, what topic would interest you guys?
Anyway, I'll definitely try to attend, I mean hey, i feel like I have a few friends on here :)
quote:Originally posted by bullet21
Two questions:
Did you work on zero hour as well?
and do you have a yankee accent :)?
Nope, Zero Hour was completed in LA, that was after I left (they finished that as I was backpacking).
As for your second question, I don't have an accent, all of you guys do :) Just kidding :P Yeah, I spent about 23 of my 26 years in the US so i lost my accent a long long time ago.
Hehe, yeah, A&A is coming along great!!!! They had just a little bit longer on it before they are able to print the gold master, but hey, at least A&A and Kohan 2 will actually come out before christmas, unlike some games :) (Doom3 and Half Life 2... yes yes, I know they're suppose to be out before xmas, but hey,I'll believe it when I see it sitting in my hands :) )
Visual C++ .Net Standard 2003 + VC 2003 Toolkit?
We're looking at moving from VC++ 6.0 to the newer M$ compiler. VC++ 7.1 sounds to be closer to fully implementing the ISO C++ standard (eg scoping of variables in for statements + partial template specialization), so boost is more fully supported under it, among other things.
Some extra info might be handy here: we're only interested in native C++ code, not .NET, and only interested in using the STL, not ATL or MFC.
So, to get hold of the compiler for VC++ 7.1, we have three options:
* Visual C++ .Net Standard 2003 (does not have an optimising C++ compiler, about AUD$170)
* Visual Studio .Net Professional 2003 (has a lot of crud we don't want, but has an optimising C++ compiler, and is about AUD$1,700)
* VC2003 Toolkit (free in terms of price, but overly restrictive EULA - which even appears to prevent it being used on OSS projects!, an has optimising C++ compiler, but no debug libs and no debugger...)(http://msdn.microsoft.com/visualc/vctoolkit2003/)
Nice how microsoft don't do a Visual C++ .Net Professional 2003, hey? [:(!]
Now it seems to me that it should be quite feasible to get the Standard edition, copy some files from the VC2003 Toolkit, and bump the Standard edition to the Professional edition we're after.
Has anyone tried this? Interested in what people have found.
We'll have to get the "real" professional version of Studio at a later date to be able to release our finished game - either that or we'll grab the intel C++ compiler, I guess. There really are some nasty clauses on the EULA for the free version of VC2003... (At least, I assume professional version of studio has a more relaxed EULA)
Cheers,
Mark/CW
Yeah what I hoping that if I copied the right executables across, that it would be possible to debug (non-optimised) code with the VC2003 tools... I'm assuming that the only differences between the cl.exe will be the fact that the VC2003 version will implement the optimisation behind the /O1 and /O2 flags - just wanting to check before I pay any money to the evil empire though ;->
However, it wouldn't suprise me if microsoft actually did something nasty like stop the cl.exe from the VC2003 tools from generating debug information that was compatible with the Standard edition's IDE :)
You can use the 7.1 compiler with 7.0, I've done it myself and know of other that are doing it now. The main thing is that you have to specify the optimising command line args manually (the IDE doesn't have them). I even have a command script that let me switch between 7.0 and 7.1...
Also, Standard doesn't support source control at all, so you'll have to do that manually too..
You should only need one copy of Professional to compile the final release build.. ;)
c#
Hello all,
Does anyone here use c#? I havent used c# yet. I was thinking of porting some of my c/c++ engine code to c#. I'm quite sceptical about performance issues and whether it would be worth doing.
any suggestions..?
adios
rx
quote:Originally posted by rx
Hello all,Does anyone here use c#? I havent used c# yet. I was thinking of porting some of my c/c++ engine code to c#. I'm quite sceptical about performance issues and whether it would be worth doing.
any suggestions..?
I haven't used c# but I enter a few programming competitions for which performance is important (mostly at an algorithmic level though) and I've seen quite a few people using c#.
Personally I just stick to C for really simple stuff, and C++ when things get bigger. I've programmed in too many languages over my life to want to learn a new one without good reason :-)
C# appears to me to be the Microsoft Java clone, although I think it has superior features to Java and I think I'd enjoy working in it more than in Java (Uni, ergh). However having said that I don't think anyone would be developing games in it yet, maybe the tools to make games assets with, but not the actual games themselves. If you are looking for a scripting language to write a game with there are plenty out there, Python being by far the most popular, with Lua/Ruby coming in close too.
I'll write more about C# when I actually get a chance to use it in a concrete application.
C# is nice, however as an "experienced" programmer, I feel there are a few things wrong with it, and the .NET CLR. However, it is very nice for writing GUI apps in, and very fast for simple apps development, so if that's what you're using it for then it's great (trying to do the same thing in C++/MFC/WTL/etc is much much more painful).
Also remember that .NET and the CLR allow you to mix languages at will, so you can write all your low level stuff in C++ and write a quick and rich UI in C#.
Well I've had a bit of a play around with C# using the new fangled Visual C# Beta Express thing. It seems to be a lot like java with some of the nice things of C++ built into it. I must say that I enjoyed programming in C# more than programming in Java. Of course the tools might have something more to do with it, but still.
One of the nice things that I found out about C# while coding in it was that I wasn't doing as much casting as I would have been in Java, at least with the Generics of C# (though the help docs warn that they are not CLR compatible?), and thus the code seemed to be easer to write.
Now I will actually start writing some serious applications in it and see how it goes. I might even like it and decide to become an applications programmer - heck Game Tools need to be made too! (Now if only I could find a job doing that!)
Also, please be aware of Mono http://www.mono-project.com/, a cross platform runtime. If you are going to start writing C# apps, you should probably try and avoid using windows.forms if you want real portability. Mono has Gtk#, which seems to be a very good alternative to windows.forms.
As to RX's original question I would say that building graphical tools in C# would be quite easy to do, and I would recommend it, however building a game engine in it, I would advise against it. Maybe if you used C++ .Net and then C# for the scripting that might work out. However personally I would stick with C++ for the engine and use C# for tools if necessary.
Java in games
Is it true that most (If not all) console and PC games are coded in C++
And there a chance of a change to Java or any other programing language. I know Java has it's speed disadvantages being a half compiled half interpreted language,is ther any major advantage that Java has over C++
I just want to know what language I should focus most of my attention on, I have just started lerning Java and I like it more than C allready.
Acer
I'm unaware of any PC (or console) games that were written in java (other than hobby projects, this is).
I can't see game developers changing to java any time soon. The reasons, as I see them, are performance (not only from slower execution of code, also from garbage collection hits), protection of their code from decompilers (a higher level bytecode makes it easier to see what the code is doing), and the variation in versions of the java runtime (potential support nightmare :)
At least when I was doing a little bit of java development a few years ago, the speed problems were quite noticable - especially in slight interface lag which irks me.
There are also a few compilers around that do compile java to native code (eg gcc) but I've not used these.
I'd say the main advantage that java holds over C++ is that it's a simpler langugage and it's easier to learn.
Certainly once you know C++ reasonably well (and have started to develop some good OO design skills), one can pick java up very quickly. The opposite way, going from java to C++, will be more trouble as there's a lot of things will strike the new C++ developer as quite unintuitive (they're not, but they just appear that way :)
If your dream is to write FPS or RTS games, I'd suggest C/C++ is the way to go, but if you're wanting to write puzzle games or turn-based web games, probably java is all you'll need.
Cheers,
Mark
I eally doubt that Java will be used at all for programming console games. The main reason for this would be the garbage collector, since it would run whenever it felt like it, and that is not good when on a console you need to make your code run at a constant rate. On PC however there might be a future in Java, however it would require better graphics and sound libraries in order to do so. Probably also better input libraries too!
One area where it could be used is as a scripting language on top of a pre-built engine already made in C++ etc.
Garbage collection is not a problem in java if you are reasonably smart about your memory usage. You can control the garbage collector and only have it run when when you call it. Java is getting faster all the time, but so is C++. Even with java compield into machine code, it still has all the little extras of overhead that can hurt your code that needs to be badass optimized.
I don't see C/C++ being replaced anytime soon for intensive console and PC games.
However, Java is used a LOT for web-based games and also for quite a lot of mobile phone games, so if you're interested in those platforms, then java will do you fine.
CYer, Blitz
Wurm Online is a Java MMOP
http://www.wurmonline.com/
and i know of other companies that are going java MMOs
Thanks for the input, I definately want to do FPS and 3D games, so I will have to focus my attention to C++, Im just wondering where can I find out about all the C++ funtions, is there a catalouge of the standard C++ functions, i have only got the basic compiler, and it has little documentation.
Thanks again.
Acer
Check out the microsoft MSDN site, they have their full documentation online. Other then that, just search online for C++ tutorials and refereces.
By the way, for hard core games (pc or Console), C/C++ is the way to go. If you're looking to make games for Phones and handhelds like phones. Java is the way to go.
Looking for someone
Hey a guy from america email a friend of mine from here he said he worked on a command and conquer game and was asking about moving to perth and about our game programming course at uni. If your that guy email me because i would be interested in helping you develope the course here at murdoch.
look forward to hearing from you
You're after DaMunkee .. [url="http://www.sumea.com.au/forum/pop_profile.asp?mode=display&id=623"]You can find him here[/url] where you can send an email to him.
Enumerating Display Modes in Linux
I'm writing an OpenGL application for Win32 and Linux. I use WGL on Win32 and GLX on X-Windows to handle OpenGL rendering contexts.
In Win32 I use EnumDisplaySettings( ) and ChangeDisplaySettings( ) respectively to handle full screen mode switching at various display modes. I'm wondering if there are eqivalent routies for enumerating display modes in Linux for full screen rendering?
I don't want to use GLUT, because it is not suitable from my application.
hello
hope this might help
http://www.xfree86.org/4.4.0/XF86VidModeModModeLine.3.html
this site has some documentation about calls to the X server
Bool XF86VidModeGetAllModeLines(
Display *display,
int screen,
int *modecount_return,
XF86VidModeModeInfo ***modesinfo);
this is function u wanna call to get the display modes from the x server.
chao
rx
"Universal" 3D File Formats
I'm after a file format specification that serves as a "standard container" for 3D geometry data. I know that CAD applications comply with various universal formats such as IGES and STEP, which allows them to export/import 3D design data between different CAD applications. I'm after something similar specifically for computer graphics.
Basically, I need information on non-application specific 3D file formats. Any suggestions?
My suggestion is to try and make your own, not all formats support all things, and the ones that come close are bloody hard to parse.
I haven't seen the lightwave object format but I'd assume that it wouldn't be 100% suited towards games because half of the processing and all of the animation is stored in the lightwave scene file rather than the object file. I suppose it would be easier then to make an export format based on the two file formats though, although I've never tried.
Try and avoid the 3ds file format, since that only supports one set of texture coordinates per vertex, and right now we definetly need more than that for modern games. I.e. texture map, displacement map, bump map, normal map etc...
DXF might be interesting but I think its text based
MAX is also text based but a lot more complex and contains a large amount of 3DS MAX specific data that is superfluous to games.
You could try checking out DotXSI
http://www.softimage.com/connect/xsi/
It has free plugins for the major 3d programs and a developers toolkit.
Hi everyone,
This doesn't really give an answer to the "which format to use" question, but check out http://www.theregister.co.uk/2004/04/21/intel_u3d/ ... looks like there could finally be a standardised universal file format for 3D information.
Cheers
OJ
Alia: Isn't it always the way :) I'm usually on the other end aswell! Looks like I finally got in before someone else this time :)
I think they're going to have quite a challenge in making a decent format that covers a good percentage of the requirements for people in the industry. Bearing in mind that this (probably?) might not be just for gaming, it'll be a really tough task to keep people happy.
Good luck to them, I look forward to seeing the result.
OJ
Universal 3D File Format In The Works
http://developers.slashdot.org/article.pl?sid=04/04/21/197203
Might be worth reading some of those comments ;)
This discussion topic reminds of the pain I went thru while writing a .3DS parser :S. Specially the key frame animation chunk in a .3DS file is the worst of all.
3ds files are smaller and IO efficient being a binary file. But writing a parser from scratch can be challenging! Simpler file formats such as .ASC, .ASE are easier to read but bulkier. there's always a trade off for efficiency.
The good thing is, if u're not comfortable with one format there's always a second choice and there are hundreds of plugins for interconversion.
Jumping Characters
I'm not making a game involving this or anything, I was just curious because I have never tried to do it before...
How do you make a 2D character jump? Is it like moving the image up a certain number of pixels over time, then dropping them down again?
And how how would you tell when the character has jumped and landed on a higher platform?
You just move the character's y position up temporarily. Like you'd keep a flag or a variable that tells you how many more seconds the character will be jumping up for, and you keep moving them up for that period of time, then after that you just let gravity do the work to get down.
If they jumped up on a hihger platform that would just mean that they have landed on a higher platform, just by virtue of following the laws of gravity (albeit to some limited extent)
Win32 stuff...
ok, what is Win32 programming used for in games and how much is it used?
i know that to get a game up and running, you can use Win32 to create a window and display your game in it, but what else is it used for? do tools use Win32, or is something else used?
basically, give me the run down on game dev and Win32...
Win32 is the Windows API, it provides access to all OS functions such as window creation, file i/o, process management, etc. Many of the ANSI C functions in MSVC are wrappers to the Win32 equivalents. eg. fopen() wraps CreateFile(). Likewise, on a Unix system you would use the POSIX API, or Carbon or Cocoa on OS X.
In reality, you shouldn't need to use it much, just little bits to handle all the interfacing with the OS. This is why it's good to use cross-platform libraries and design your application so that it is abstracted from the OS-dependent things. If you do that then you won't need to completely re-write the program if you need to run it on a different platform - you just re-write the little bits of platform-interface code and recompile.
Hope that helps.
Well you can either use the "raw" Win32 API functions, or use some sort of library such as GLUT (shudder) or other game type library.
If you're going to use Win32 you might as well then use all of the functions containted within the API instead of the standard C functions since it'll all be the same thing and you can do extra things if you just use the Win32 API.
To create a window you'll need to use the RegisterClassEx and CreateWindowEx functions (tho you might not want to use the extended versions right away, they are the ones with the Ex at the end), you'll need to fill out the WNDCLASS structure etc. You will also be requried to create a function that processes window messages.
Some other funky things that could be done with Win32 functions are: using memory mapped files, for which the OS can handle most of the work for you, using sleep so that your program uses only as much CPU as it needs to, and handling the minimisation and maximisation of your window properly - so like the user can alt-tab in and out of your game with no worries.
Yep, basically just go have a scan of the Platform SDK on msdn.microsoft.com - or if you have Visual C++ have a look in the help.
Memory mapping files is funky stuff, but it's not like other OS's can't do it. If you want to see how to create a window using Win32, check out the NeHe OpenGL tutorials at http://nehe.gamedev.net - they take you through everything you need to know and then some.
Also, a little self plug here, but I have an example of the funky stuff you can do with Windows on my site at http://shplorb.ods.org/develop/icqnobanner/ - it's a little program that starts icq and injects some code into it that hijacks the window and prevents it from displaying the ad banner at the top of the contact list. The Win32 API has loads of stuff to let you do almost anything imaginable with Windows. If you're really interested in learning all that you can do then I'd suggest buying one of Microsoft's books on it.
Just to through in my 2 cents. On the last couple projects we always kept a distinction between where we used Win32 and where we didn't. The theory is, when porting the game to another system (like macs... shudder....) to make the life of the porting company easier we had a strict line between device dependent and not. We created virtual classes that we would then inherit Win32 specific classes off of that. That way our code will only deal with the virtual base class and when the game is ported, the only changes that need to be made is to derive a new class from the base class. Of course we also split the project into os dependent directories. Everything that is os independent go into a common location and every device dependent item goes in its own directory. When dealing with two, three, even ten thousand files for a game, this is the only way to do it :)
In terms of is it worth learning win32? Like was said before, things like registry, file io and of course DirectX (if you want to get into graphics) are all you need to know. Occasionally a game will use Window's Widgets for their UI and in that case a decent knowledge of Ownerdraw is usefull. (Yuri's used all owner draw widgets where as Generals we used our own UI system... and man was that a pain in the butt!)
Anyway, just have fun, focus on what's fun, and the rest will follow :)
Yeah, using your own isn't too difficult it's just a pain in the butt when 2 weeks before you ship, they tell you they want all the functionality of a windows widget, right after they told you that they're scrapping the look of the UI and it will all be programmer generated/animated and you have no systems for this in place. Ahhh I loved the feature creep that happens post beta...
Maya PLE dissection :)
Hi,
I was wondering if anyone knows how to modify a maya ple file so that it is importable into maya complete? I have heard rumours there is only a 4bit difference in the file itself and I wondered can u open ur saved file even in a txt document and try to find something to modify that would make it a complete file..Or on the otherhand is there a mel script for maya complete that allows you to import a ple?
I have no experience with maya file formats but I had a look around. Alias obviously don't want you opening .MP files in maya complete but I expect the formats will be very similar.
I compared two .MP files to a .MB and noticed some differences in the first 17 bytes of the files:
MB: Bytes 0-4 read "FOR4 ". Bytes 8-16 read "MayaFOR4 "
MP: Bytes 0-4 read "FOR4K". Bytes 8-16 read "MPLEFOR4K"
Bytes 5-7 don't seem to matter. Note that the spaces are not ASCII spaces but NULL characters (value = 0).
My suggestion:
Change byte 4 from "K" to " ", bytes 9-11 from "PLE" to "aya" and byte 16 from "K" to " ". Again, spaces are NULL characters.
I am sceptical that this will work though; it seems too easy. Also, I could only find a few files to compare so the "FOR4 " and "FOR4K" differences could be purely coincidental. The "Maya" and "MPLE" part is pretty obvious though.
You might find this link useful:
[url]http://caad.arch.ethz.ch/info/maya/manual/FileFormats/[/url]
Good Luck. Let me know if it works.
when attempting to modify a binary file, don't use things like notepad and such. I recommend either Ultra edit, or if you don't have that, just open the file in Visual Studio so you're actually viewing the hex data in the file.
Visual Studio 6.0 you can drag and drop any file into the window to view it's binary contents. Visual Studio .net 2k3 on the other hand, first try's to Open the file (meaning if it's aliased to use Maya to open the file, it will run the program instead of opening the file in VS.net.)
Anyway, It's worth a shot right :)
Good luck.
Chris
Yeah I forgot to mention that. I used Visual Studio 6.0 to view the file. If you don't have a hex editor there are some freely available for download such as this one: [url]http://www.hhdsoftware.com/hexeditor.html[/url].
Design Help - Object Manager
Just wanted to get some feedback for a better way to design an Object Manager. This was from one of my assignments last year I want to clean up and the object storage is shocking.
What I have now:
Object Manager
StaticObject staticObj[STATIC_NUMBER]
DynamicObject dynamicObj[DYNAMIC_NUMBER]
PlayerObject playerObj[PLAYER_NUMBER]
So basicly the object manager sets up the static, dynamic, and player objects and holds an arry of each as well as reading in file information for the static objects and created the databases for the different object types.
Static objects have set positions.
Dynamic objects have random positions.
Player objects is the player (only single player).
ATM the code is quite nasty - the assignment was only 3 weeks :) But I am keen to try and clean it up so that I can use it as a test bed to play with other things.
Really - I was just wondering about how people would set up an object manager design and what type of storage you'd use.
Managing during execution - main thing it would be for would be running collision tests on objects etc really.
The objects are fairly static - there's only something like 5 of the objects which the player can "pick up" and when they do that I just make those objects invisible since they can "respawn" later.
How about a map with the object ID and an object pointer? you could derive the objects from the same class:
class Object{
ID object_id;
TYPE object type; // (static/dynamic/plr)
... (object data)
}
map< ID, object *> blah
then to updatee just iterate through the map
to do collision test - iterate trhough with two iteraters.. etc
quick and _dirty_ :)
A.
findfirst( ) / findnext( ) functions in Linux
Just wondering, what are the equivalent functions for findfirst( ), findnext( ) and findclose( ) in Linux? I'm particularly intereted in functions that portable across Win32 and *nix systems.
What means static?
Gday,
Just wondering what the static statement means in C++ and Java?
ie. public static void JavaMethod() or
static int variable;
textbook def - by prefixing the variable declaration with static the compiler maintaines the variables value even after losing scope.
Example given:
long IncreasePeopleCount()
{
long NumberOfPeople = 0;
NumberOfPeople =+ 1;
return NumberOfPeople;
}
main()
{
long Num;
Num = IncreasePeopleCount();
Num = IncreasePeopleCount();
}
What happens is that count will always be 1 because NumberOfPeople is reset to 0 each time the function is called. So two ways around that is creating a global variable or make it static (static long NumberOfPeople = 0 ).
That may not be the best explanation - so if one of the other programmers has more to add.....
I think part of it is personal preference in terms of how you code. Using a static in the function or a global outside are really the same thing. From a point of view for reading code I find it better to keep the variable as close as needed (local) to what your coding - this can make it easier to read other peoples code.
I am not sure what/if the performance hit would be between global and static local variables.
static member fucntions: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcceln…
static data members: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcceln…
A static variable within a function in C or C++ is like a global variable but just for that function.
A static variable within a class in C++ is a global variable, shared among all instances of that class. A static function within a class is the same as a standard C function as it exists on the global scope, it cannot access any non-static variables in the function though. A static C function is only seen within the file that it is defined.
A static method or variable in Java means that there is only one for that class, no matter how many objects of that type exist. It also means that you do not need to create an object of that type to call that method or access that variable.
That's why the main method in Java is static becuase you only want it executed once, and you shouldn't need to create an object of that type beforehand.
In a phone interview for Westwood studios, I was once asked what a static function was. My answer was. "I really have no idea, I could tell you what a static variable does." The guy laughed as said it was fine. Sure enough it was as I got the job :) Back then C was the main language we were coding in so he wanted the answer to be what Daemin said about it only being seen within the file it was defined. Now a-days though, working in C++ land, Static functions are your friends when working in a truly OOP style.
So, just remember, when preparing for job interviews, it's good to know a few obscure terms :)
Some tricky things that have caught me out in past interviews:
Multiple inheritance and where it can be useful. At the time I couldn't think of anywhere I'd want to use it.
What is the biggest number we can store in an C++ integer? I asked on what platform but forgot to ask about sign.
Why are man holes and their covers round?
The technical definition of a static variable, is that it occupies a static location in memory. That is, no matter what the program does, the variable will always occupy the same chunk of memory for the run-time of the program. This is in contrast to stack variables (whose location changes depending on whats on the stack) and dynamic/heap variables (whose location depends on where the memory allocator put it). However, as has been said static has other meanings as well :)
Also, static variables should not be seen as being any sort of exact equivalents for globals. Static variables in functions are only available in the scope of that function (although you could return a pointer/reference to the variable), and within functions, static variables are only initialised the first time they are encountered.
Possibly the more important thing is for global-scope static variables. Global variables will be initialised in the order they are encountered in the file/s. Static variables make no such guarantee, so you should never use one static variable to initialise another static variable! There is, however, a guarantee that both static and global variables will be destroyed in reverse order to the order they were initialised.
This is my recollection anyway...possibly based on older C++ standards :)
CYer, Blitz
Teach Yourself Programming in... 3652.42 days?
[url]http://www.norvig.com/21-days.html[/url]
So true...
Edit: Whoops, I don't know how many days there are in a year, luckily google does ;)
Heh heh.. My favourite is Sam's "Learn Game Programming in 24 Hours".
But seriously, I've been programming in some form or another for about ten years (more if you count C64 and QBasic) and I still have plenty to learn. Programming (especially game programming) is the sort of field where there's always more to learn.
OpenGL 2.0
I've been an OpenGL coder a while ago. But I haven't kept up with 3D programming for over 2 years now. I want to get back in to OpenGL coding, particulary with OpenGL 2.0. Is anyone here who used the OpenGL 2.0 spec before? How does it compare with D3D? Should I bother with OpenGL 1.5 backwards compatibility, or shall get straight into 2.0? Will there be a solid support for OpenGL 2.0 across different platforms in the future, like on Win32, Linux, PS2/PS3, GameCube? Where can I get headers and libs for v2.0? I know 3DLabs has some, but are there other sources?
Thanks! :)
Executing Programs Within Code
I want to write a program that runs different programs depending on user input. How on earth do I do this?
Using C++ by the way...
Boost 1.31.0 released
"A unified Boost Software License has been developed and will gradually replace the individual licenses for most Boost libraries. The new license offers better legal protection for both users and developers, and should speed user's legal reviews of Boost libraries. Dave Abrahams led the Boost effort to develop better licensing."
The update also includes two new libraries and updates to numerous others.
Get it now: [url]www.boost.org[/url] (You know you want to)
Returning multi-dimensional arrays
I should know this, but unfortunately I don't...
I have an array in a file called Character.h that looks like the following:
char board[8][8];
And I want a function that returns this array called Get_Player_Board(), but I do not for the life of me know how to return this array! I have tried eveything I know and still cant get it to return...someone help me![?]
I have declared the function in a source file and it is declared as follows:
char Character::Get_Player_Board()
{
//need to return array here
}//close function
You can either return a pointer to the array, or pass in a pointer to a pointer of the array of that size as a function parameter, then the function sets the pointer.
i.e.
[code]
char board[][];
void Get_Player_Board( char ** b ) { *b = board; }
[/code]
Either that or you could make the board be a structure instead of a character, although you'd still have a similar problem. Unless you wrapped the whole board in a structure or class, but that's going OO, and I don't think that you are doing that atm.
ok, i tried what you said Daemin, and it spat out this error
my new code looks like
[code]
void Character::Get_Player_Board(char **tempBoard)
{
*tempBoard = playerBoard;
} //close Get_Player_Board function
C:KoolGame DevChessCharacter.cpp(60) : error C2440: '=' : cannot convert from 'char [8][8]' to 'char *'[/code]
What the?
Man, those smilies are making garbage of this thread :P
Ok, I think this comes down to the way the compiler (and ANSI standard too i guess!) percieves pointers and arrays as different entities. For instance, when you do
char c[10];
char *d;
d = c; // Note may need to be "d = &c"!
sizeof(c); // 10
sizeof(d); // 4 (sizeof(char*))
Because of this, often you can't directly assign an array to a pointer, and sometimes if you can strange things may occur that you don't expect...
The solution to this should simply be to replace:
*tempBoard = playerBoard;
with
*tempBoard = &playerBoard;
or, i like to use this for better (IMO) readability
*tempBoard = &(playerBoard[0][0]);
This just takes the address of the array (first element of the array).
AFAIK the array and the array address should both equate to the same pointer value, but the compiler just throws a fit over type differences. Hope i'm not wrong :)
Hope that helps.
CYer, Blitz
You can pass the whole array by reference like this (remember, a 2d array is basically just a pointer
to a pointer (in c++)):
char ** Get_Player_Board()
{
char **board; // Your board array
return board;
}
or you can pass in the pointer and set it to that value as mentioned earlier
void Get_Player_Board(char **b)
{
char **board; // your board array
b = board;
}
Can't answer the question immediately, but can help you find the information you're after (xfree86 didn't exist the last time I was doing any serious X windows programming :)
Can I ask what you're wanting to do with the information? (ie is it for direct graphics access, for a utility program that tells you the bit depth, or is it for setting up a Pixmap with the same depth as a Window?)
One thing to look at may be the DGA extension (http://www.xfree86.org/current/XDGA.3.html)
You might find it useful to look at a slightly higher-level interface than using the X-extensions directly (eg the SDL media layer: http://www.libsdl.org/index.php)
Finally, a PDF of a book called "Programming Linux Games" is available at: http://unia.ual.es/docs/sdl/plg-final.pdf In terms of copyright of the PDF, AFAIK this has been made freely available by the author.
Cheers,
Mark