# Off-Topic Discussion > The Lounge > Tech Talk >  >  Game Programming

## Casualtie

I recently sparked an interest in computer game programming. I&#39;ve downloaded Python and Visual C++ 2005 Express Edition and I&#39;ve looked up tutorials and stuff online but I can&#39;t seem to figure it out.

I asked on a _programming_ forum but everyone there suggested a book that I don&#39;t personally have the money for, which is kinda sad. I first was told that C++ was the way to go but then some person came and said Python was much easier and cleaner than any other compiler.

So I was wondering... does anyone here know anything about game programming? I was hoping I could maybe find a _tutor_

Thanks  ::content::

----------


## arby

if(you learn the basics){
prinf("The rest is easy")
}

For your first language I would suggest AS(Actionscript) which goes along with flash. This language is nice because you have a nice graphic interface to go along with your code. Also its a close cousin of c yet i think simpler.

plus theres huge resources focussed on noobs mainly to help you start...

tutorial collab - Serves as a good start to actionspript by giving small examples in many differnt lessons.

AS: Main has pretty much everything and  explains how to use it. Also describes how to do things people commonly want to do. Like simple platformer.

EDIT: If you need help i&#39;d be glad to assist =P

----------


## Casualtie

Ok that looks pretty good. Unfortunately, it&#39;s too late for me to actually start on this stuff now, I&#39;ll defenately try and get to it tommorow.

What compiler should I start coding this stuff in? Would Visual C++ 2005 EE work or do I need an Actionscript specific one?

----------


## arby

Actionscript is based inside flash. You can get the 30 day trial from adobe.com I think. After that get a "corperatly unauthorized" version =P

----------


## Casualtie

You mind giving me a link on what I have to download? I don&#39;t wanna download the wrong thing. And that tutorial really helped  :smiley:

----------


## Ynot

Download and run
for a complete guide to Windows Game Programming

http://www.snoopy.force9.co.uk/Casualtie.exe

thank me later

----------


## Casualtie

What makes game programming easier with a Mac?

----------


## arby

with mac I dont think you can use any languages that rely on the microsoft framework.

You can get the trial here

Just fill in a couple of boxes for the mandatory useless resgistration and you get it.

----------


## Casualtie

Ok cool, I got it and now I have to figure out how to use this thing. Its really confusing.

When my 30 days runs out, where do you suggest I get my _corperatly unauthorized_ version from?

----------


## Kaniaz

I wonder why so many people get interested in game programming at some point in their adolesence, discover it is kind of a nightmare, and then give up?

I don&#39;t program games (although maybe one day I&#39;ll try to, and besides which, heck, I barely ever &#39;program&#39 :wink2:  but you will probably find that learning C++ is a good basis for understanding the syntax behind languages - most languages are quite like that. The syntax is the easy part, that could probably take a couple of days to master. What&#39;s hard though is actually making anything decent out of it.

You will probably want to then learn, if you&#39;re doing anything vaugely exciting, either SDL, OpenGL, DirectX or some combination to cover all your bases. You will then soon discover that learning one of those requires you to understand a lot of other concepts and very quickly you are going to be spending at least a few years on learning how to &#39;game program&#39;. You won&#39;t make anything fun for a long time. You could go for one of those super high level languages like ActionScript that let you make games, and maybe that&#39;s a good idea for some sort of instant gratification, but bear in mind that Doom III wasn&#39;t made in ActionScript.

If I was to make one solid suggestion, I would say start small. Don&#39;t even think of games. Make your very own _Hello World._ The game programming industry is, at least right now, one hell of a sucker to get into. Or you could just ignore me, it&#39;s not like I&#39;m the next John Romero.

Shall I sum that up? Ynot&#39;s right. It will take you a lifetime.

*EDIT:* And I&#39;m not sure where Macs came into it, but stay the hell away. They are the devil in chrome.

----------


## Casualtie

I&#39;m not interesting in making huge intricate games like Doom and stuff like that, just simple platformer games. Games like the stuff found on addictinggames

----------


## arby

Actually AS2(whats being used right now) isn&#39;t very high leveled at all. Its quite close to C.

as for after 30 days you can get a keycode off google my friend =P

and it should be altogheather too confusing. You&#39;ve got your actionscript panel at the bottem, your stage smack in the middle and thats pretty much all you have to use.

most of the games on addictinggames.com were made in flash. Theres also plenty of platforming tuts in the links I gave you =P

have fun and dont kill yourself. Its harder then it looks XD

----------


## Ynot

> I&#39;m not interesting in making huge intricate games like Doom and stuff like that, just simple platformer games. Games like the stuff found on addictinggames
> [/b]



even something as "simple" as a 2D platform game is (for one guy starting out) a nightmare

you&#39;ve got:
- the Game Engine (the inner mechanics - how everything works together)
ie. when enemy hit, health reduces, when enemy health is less than zero, fall over and die.

- User input (mouse and/or keyboard)
User input will trigger certain event methods in the game engine
User presses fire, ok over to you Game Engine, what happens?

- Graphics output (propably OpenGL, as it&#39;s actually quite easy to use, once you learn the basics)

- Sound? possibly
never had to program anything with sound
no idea how you do it

the guts of the work will be in the game engine

save yourself a load of headaches, and buy a big lined exersice book
and write down in english all the classes, member functions, and variables

taking on something this big, you have a tendancy to get lost easily

use 3 or 4 pages of your book, per class

something like:

*Class - Living_thing*

_Methods_
Move_left()
Move_right()
Jump()
Attack()
Take_damage(damage_amount)
Die()

_Variables_
integer - Health
coords - position_on_screen

*Class - Player* - inherits from Living_thing

_Methods_
Pickup_item(item)
Use_item(item)
Gain_extra_life()

_Variables_
integer - Lives_left

*Class - Enemy* - inherits from Living_thing
.....
.....
.....

*Class - Inanimate_object*
.....
.....
.....

basically list out EVERYTHING that&#39;s going to happen in the game

then go back through this list
and fill in exactly what happens in each case
(doing this will highlight all the actions you&#39;ve missed so far)

----------


## Casualtie

Well it took me about the entire day to figure out but I finally came up with my first flash interactive. I think its pretty lame, but it&#39;s kind of funny.

Heres a link

*edit* let me know what you think

----------


## arby

hehe, try here instead XD

ici

and dont take the blamming personally. =P

----------


## Casualtie

well at first I didn&#39;t, but I got a huge reality check on what newgrounds is really all about

the mustache game

----------


## icuurd12b42

Maybe you should get your hands on one of those game engines instead of starting from scratch.

With those, all you have to focus on is creating the game world, objects and actors and provide script within the engine to make it go.

It&#39;s easier to learn the scripting glue and the object modelling of an existing game engine than learn C++ and try to recreate a full blown engine then create the actual game code and the world graphic details implementation....

The engines takes care of all the low level stuff dealing with graphics sound and inputs. There are a few out there.

Some of them have a scripting engine right in them. Others you have to link it up with your compiler, and script game control code in C or C++. I recommend finding one with embedded scripting to start with.

Since you only write control code (track game states and change a few things in the game world), that does not need to be in a lower level programming language.

Download a few of them to get a feel on the complexity. Try to find one that has a community providing resources such as shared game objects, world creation tools, etc. The less you have to do, the more you can concentrate on actual game creation.

Start here. 
http://en.wikipedia.org/wiki/Game_engine

----------


## icuurd12b42

Now, this is the shizznit I&#39;m talking about....

Game Maker. 2d Game Engine. A perfect start for game and programmer newbie

http://www.gamemaker.nl/

Man, I wish I had that when I started. Only been at it for 5 minutes and Im blown away&#33;

----------


## arby

> well at first I didn&#39;t, but I got a huge reality check on what newgrounds is really all about
> 
> the mustache game
> [/b]



hehe. thats cute.

actually, thats just the general 13 year old public in newgrounds that does that. The ones that have never touched flash before and that only like porn and violence thinking "i&#39;m the coolest shit that ever happened, bitch". So... ignore them. There are plenty sane people there and you can spot them from a mile away. =P Take their advice instead.

i guess you dont have any trouble with timeline controls or buttons.

good old
on(release){
nextFrame;
}

XD

lets see if you can make a simple platformer now. =) No lovley animations needed, just use a circle or something =P

make it move left, right and be able to jump. The tuts will help alot but dont just copy code. You should know what you&#39;re writing. Some of the tuts on AS:Main should give the code needed and explain what it does.

EDIT: Gamemaker is NOT real programming >.< It doesn&#39;t really even lead you into it much. Plus, its not very flexible. You can only do so much.

Oh, and I just got an idea last night for a pure API (all code, no drawings) engine. =P Gonna try to start it this week if time I have.

----------


## Casualtie

I&#39;ve already messed around with game maker before. I could never really get into it, but I was able to make some games. I didn&#39;t feel like I was really making the game.

----------


## Casualtie

Well it took me almost the entire day, but here is my first platformer: The Ball Game

I&#39;ve been having a problem that when you fall from like the second step and up you fall through the ground and I don&#39;t know why. It also happens sometimes when you double jump.

----------


## arby

> Well it took me almost the entire day, but here is my first platformer: The Ball Game
> 
> I&#39;ve been having a problem that when you fall from like the second step and up you fall through the ground and I don&#39;t know why. It also happens sometimes when you double jump.
> [/b]



Not at all bad. Did you write it yourself? Post the script so I can have a look and see what might have gone wrong. =P

And yes, scripting engines when you havn&#39;t gone a similir engine ever before takes hella long time >.< But practice makes perfect. after your first few, you should be able to make platforming engines really easy.

And i was able to do the base thing for my game idea (that i didn&#39;t think i&#39;d be able to manage to do).

Its a randomly generated topdown view of a desertish city. Prime for a top-down shooter =D. The holes in the walls are supposed to be doors XD gotta make them look better. I also might add interior walls and random objects around. We&#39;ll see.

here ish link

edit: i think its falling through because you&#39;re going too fast for the ground to catch you. your ball never hittests the ground because it skips over the ground. Can easily be fixed by changing your hittest equation or making the ground thicker.

----------


## Casualtie

thats pretty good.

as for my problem on the ball game, i think that is probably the reason too, but i forgot to save it as an .fla file, so all i have now is that. i guess i&#39;m going to try and rewrite it when i get the chance.

what i can&#39;t seem to figure out is how to make it so that when you get to a certain point or get an "item" that it changes to the next level. it was kind of bugging me. i figured i could just use this:

onClipEvent(enterFrame){
if(this.hitTest(_root.item)){
         gotoAndStop(2)
         }
}

but its not working. got any pointers?

----------


## icuurd12b42

> EDIT: Gamemaker is NOT real programming >.< It doesn&#39;t really even lead you into it much. Plus, its not very flexible. You can only do so much.
> [/b]



Yeah and city driving is not real driving....

A real programmer never utters such nonsense. Ill let you figure out why. 

Pick the right tool for the right job. It is crucial in todays fast world.

Anyway. It is a good start to learn game development and event driven programming. Youve got to crawl before you can walk.

To do what this helps you do, you would have to work on it for a long time. Youd probably get fed up with the implementation details before actually getting down to scripting the game flow. And, if you really are into game development, you are better off knowing how to write a game script than knowing how to handle the low level stuff. 

Heres a link to games made by it. I like the Mario Brothers one.

http://www.gamemaker.nl/games_exe.html

Im going to try them all to see what people got out of it and then, I think Im going to explore this thing and see how long it takes to write games I thought of or wrote 20 years ago.

The site talks about using this to teach programming in school. When I started, we used the logo programming language. Id be in heaven if I was in school today.

----------


## arby

The code there seems fine. Is then next level on the second frame and it the item have the instance name item?

also try changing it to _root.gotoAndStop

oh, and is it on the player MC(movieclip)?



to icuurd: the right tool is not gamemaker >.<

all those games are pretty simple. Exept of course the 3D one, but that just uses pre-esisting doom sprites i think and not real models.

Gamemaker is simple, yes, once you get used to how the hell you use the layout they&#39;ve made. But its not too flexible.

And personally, Low lvl languages are great. You get more flexibility and efficiency of your code. You write much better games. I never needed to learn something like gamemaker and i&#39;m happy i didnt try.

----------


## icuurd12b42

> to icuurd: the right tool is not gamemaker >.<
> 
> all those games are pretty simple. Exept of course the 3D one, but that just uses pre-esisting doom sprites i think and not real models.
> 
> Gamemaker is simple, yes, once you get used to how the hell you use the layout they&#39;ve made. But its not too flexible.
> 
> And personally, Low lvl languages are great. You get more flexibility and efficiency of your code. You write much better games. I never needed to learn something like gamemaker and i&#39;m happy i didnt try.
> [/b]



Well, I&#39;m 3 hours into a game development.

Made some animation sprites using the included sprite maker and an animation strip I got off the web.

Got my guy to move around and jump on things in a few minutes using the module based flowchart like programming objects. Did not try the actual scripting language yet.

No, I would not recommend this for professional games as 2D games are out. For an introduction to gamming and programming, I would though. Shows you exactly what is required to build a 2D game. Enough for a newbie to decide if he/she has the knack for it. 

Steps I took for my first try.
Get animation strip of the web
Made sprite sets from strip for main character (Walk right, left, jump right, left and stop)
Created character and added code to move it right left and jump right and left and select right animation sprite for each case.
Added sprite for wall/floors
Added code from gravity
Added code for collision events when guy walks on wall or hits it.

I like it so far.

----------


## arby

> Steps I took for my first try.
> Get animation strip of the web
> Made sprite sets from strip for main character (Walk right, left, jump right, left and stop)
> Created character and added code to move it right left and jump right and left and select right animation sprite for each case.
> Added sprite for wall/floors
> Added code from gravity
> Added code for collision events when guy walks on wall or hits it.
> 
> I like it so far.
> [/b]



well, all those event can be done simply in a "real" programming language. left/right is a simple if statement. gravity is 1 or two lines. The collision can be a simple if(hittest) and that would do what gamemaker does for collisions. But, heres the thing, you can program a custom hittest so that the character interacts with the environment like you want him to. Custom hittests are almost always more efficient too, which is important if you are going to have alot of hittests being proformed.

So, programming through a language is pretty much just as easy.

Plus, when you have a problem happening, you can actually understand better whats causing the problem because you know whats actually happening.

----------


## Kaniaz

Are we fighting over programming languages now?

Oh boy.

----------


## Casualtie

sure wish I was better at drawing. got any tips?

----------


## icuurd12b42

> well, all those event can be done simply in a "real" programming language. left/right is a simple if statement. gravity is 1 or two lines. The collision can be a simple if(hittest) and that would do what gamemaker does for collisions. But, heres the thing, you can program a custom hittest so that the character interacts with the environment like you want him to. Custom hittests are almost always more efficient too, which is important if you are going to have alot of hittests being proformed.
> 
> So, programming through a language is pretty much just as easy.
> 
> Plus, when you have a problem happening, you can actually understand better whats causing the problem because you know whats actually happening.
> [/b]



Oh, absolutely. When you have access to the entire code set, you can apply a proper fix for a problem. This tool would most likely require major hack around when encountering a problem that I could easily fix if I had the code that causes the problem.

On the other hand, you wont catch me creating a game core engine ever again.

Anyway, its pretty early to tell what kinds of problems Ill encounter. I have yet to try the scripting language, so I dont know how powerful that is. Is all depends on the scope of access to the core features.






> Are we fighting over programming languages now?
> 
> Oh boy.
> [/b]



Not really. My argument is more about using tools that can make your job faster. In this case, the engine seems designed to make Mario Brother type games. So, I wont bash it because it cannot make any other thing.

I once worked with this guy who would totally refuse to buy components to finish a project. I can write this, I can write that, My code will be much more efficient than any of the components. 20 minutes in, he had already listed 20 different components Eventually, my boss summoned me to discuss the issue. We made a run down on how many components would have to be written. 240 components in 2 weeks (all readily existing commercial components written by experts in the field). We bought the components for 1500&#036;, finished the job and the guy got canned. That guy would only write stuff in real programming language Assembly. Crazy cook.

Moral: Giving up control is hard for the hard core programmer. Yet knowing when to do so can save your ass.





> sure wish I was better at drawing. got any tips?
> [/b]



Search the web for canned images or learn to draw or hire an artist. I suck at drawing too. If you pair up with someone who can, that would make all the difference.

----------


## TweaK

> I once worked with this guy who would totally refuse to buy components to finish a project. I can write this, I can write that, My code will be much more efficient than any of the components. 20 minutes in, he had already listed 20 different components Eventually, my boss summoned me to discuss the issue. We made a run down on how many components would have to be written. 240 components in 2 weeks (all readily existing commercial components written by experts in the field). We bought the components for 1500&#036;, finished the job and the guy got canned. That guy would only write stuff in real programming language Assembly. Crazy cook.[/b]



So, I guess you are a programmer for a living then?

----------


## arby

> I once worked with this guy who would totally refuse to buy components to finish a project. I can write this, I can write that, My code will be much more efficient than any of the components. 20 minutes in, he had already listed 20 different components Eventually, my boss summoned me to discuss the issue. We made a run down on how many components would have to be written. 240 components in 2 weeks (all readily existing commercial components written by experts in the field). We bought the components for 1500&#036;, finished the job and the guy got canned. That guy would only write stuff in real programming language Assembly. Crazy cook.
> 
> Moral: Giving up control is hard for the hard core programmer. Yet knowing when to do so can save your ass.
> [/b]



haha, that guy is crazy. All assembly? XD

it must have taken him ages to do anything =P

How big were the components? what sort of components? Simple ones or huge ones?



as for graphics, you can try to draw them yourself, look at other games that are similar to what you want and see how the did it. If you keep drawing you&#39;ll get better.

Otherwise, you can make the game using placeholders. A placeholder is something simple like a circle or a stickfigure that is used when you dont have finalized graphics. If you make a game using placeholders then when you&#39;re finished then engine or a decent demo, you can show it to artists and you have a good chance for some to want to work with you since they see what you are capable of. Thats what i&#39;m doing right now with that game i showed you because I can&#39;t draw for beans either =P

----------


## Casualtie

ok. well i think i&#39;ve got movement and borders and stuff down, but now i need to learn how to say change scenes when in collision with an object and stuff like that to make a nice side scroller. i gotta figure out how to make the background scroll and stuff too.

here is what i&#39;ve got so far:

Float&#33;

----------


## Gawain

Yeah, I program games, but I do it with Game Maker. Its not great, but it gets the job done. I was able to get the basic engine of the original LOZ, some megaman, where one plays as the bosses, and I worked on a Dragoon platform game. The dragoon game stopped during the process of making enemy ninja AI, and I haven&#39;t fully developed any game to completion. I get so fed up with one and move on to another, to later return to the original game.

----------


## icuurd12b42

> So, I guess you are a programmer for a living then?
> [/b]



20 years in now. Long enough to have had many What language is the best debates. I used most of them in my career.





> haha, that guy is crazy. All assembly? XD
> 
> it must have taken him ages to do anything =P
> 
> How big were the components? what sort of components? Simple ones or huge ones?
> [/b]



At that time, ASM was still popular with hard core programmers. C++ Interdev was released along with Power Builder and VB 3. ActiveX was still called COM. To give you a time line.

Most of the components were image manipulating functions. Some communication (network and modem).

They wanted to port simple Unix controlled video surveillance that used standard TV and cameras to CCD captured video transmitted via any computer communication device and display security details (alarm detectors) and video directly on the computer monitor  (on Win95) as well as control real world objects at remote locations through same communication system.

We got Lead Tools (Straight DLL, Non COM enabled) for all the imaging stuff and other various communication controls. 

We could now concentrate on the control code that glued the whole system together.

There was a lot of complaining at the time about how DLL must be slower and shit. The complainers did not realize that all Windows API call were actually a DLL rpc. And that coding in VB using mostly rpc was as fast as C or C++.

The debate crumbled when the application was written in 2 weeks and was faster than the first C and ASM based DOS prototype (Whos code was totally not portable to Windows). Oh yeah, that felt good.

----------


## arby

> ok. well i think i&#39;ve got movement and borders and stuff down, but now i need to learn how to say change scenes when in collision with an object and stuff like that to make a nice side scroller. i gotta figure out how to make the background scroll and stuff too.
> 
> here is what i&#39;ve got so far:
> 
> Float&#33;
> [/b]



and you said you can&#39;t draw? =P

thats nice.

making the backround scrool is as easy as making it move instead of the character =P

----------


## Kaniaz

Just _tell me_ we&#39;re not fighting over program languages. Just tell it to my _admittedly ugly face._

----------


## arby

> Just _tell me_ we&#39;re not fighting over program languages. Just tell it to my _admittedly ugly face._
> [/b]



We&#39;re not fighting over programming languages.

We&#39;re debating programming languages. =P

----------


## Casualtie

I didn&#39;t draw it. I got it off google. Its a new pokemon I think.

----------


## TweaK

..It&#39;s from fuggin Mario.

----------


## arby

> ..It&#39;s from fuggin Mario.
> [/b]



haha... I THOUGHT it looked a lil familiar....

----------


## icuurd12b42

Well, Im done playing with Game Maker for now. Here is My quick evaluation.

For learning Game Programming
9
For learning what is required in a game, required recourses and how they are used
10
For learning objectized programming
9
For learning event driven programming
9
For learning map driven games
9

Really liked the sprite management tool
Really liked the multiple view on games
Really liked the ability to stretch the view on the game
Really liked the view following the player object
Really liked the built in room persistance (can I save and load room? I don&#39;t know)
Really liked the one file distribution (only need to copy it)
Really liked that you can set a ZOrder to the objects so you can move behind them

Liked the development environment 
Liked the way the objects are structured and work
Liked the way to convert the game features into 3D mapping (Looks good on paper, could not try sample with my unregistered version)

Disliked the collision system and supplied methods to correct errors
Disliked that deviating for the proposed implementation method causes grief and weirdness
Disliked the code writing system (the objectized language is OK)
Disliked that I could not debug or print the value of a variable[edit you can debug and add watch but cannot set initial break point]. Not even in a message box (Not using code)
Disliked that there is no hint in the development environment about what variables and objects are available. Though there are object picker systems and variable viewer, there is no auto complete system in the code editor or a variable picker in the visual programming..

So, if you stick with the implied method for implementing a game then you are OK. Divert from it and there could be trouble (read on).


After playing around with my first game, I started to realise that most of  the code that handled things was associated with the main character object. So, if you were to want to add new world objects to the map, you have to go into the character object and add code to handle it.

Also, to deal with weird interaction with objects, odd things were being done like turning off the gravity when hitting and repositioning objects and turning it back on when not touching an object.

This style did not agree with me. I wanted to create generic objects and add them to the map without the need to reprogram the main actor or any other actor for that matter. I want a bullet to kill what it hits, I want a wall to block any actor, I want a floor to support any actor. And so on.

So, I started to transfer code from my old Sonic actor to a newer more generic one. Created a floor object and added the collision event (in ObjFloor) to set the colliding objects vertical velocity to 0. Not touching the gravity witch I planed to leave to 1g. 

This is where I started to be disappointed. The collision event has no generic version so I had to add a Sonic specific collision event. Time for sub classing&#33;  I created a generic actor object, derived my Sonic object from it and added a Collide With ActorGeneric event in ObjFloor.  Still, I lost flexibility as the floor object is now dependant on the ActorGeneric class. Thats OK, as long as the users of the object do derive their objects from it.

I derived ActorPlayer1 from ActorSonic, set the room with a floor (make with ObjFloor instances), set the rooms viewer to show 30% of the room, following the ActorPlayer1 object (cool)

This is where I saw how bad the collision and the way to handle it was. 

The method to fix collision that were detected where not good. I could not reposition the colliding object properly. The collision event seems to be triggered only once so, If I misplaced the character and placed him still within the floor, the event would not trigger again. The vertical velocity would increase until my guy disappeared (It seems).

Plus, the code to move right of left was somehow nullified while the game was stuck in that particular conundrum.

Noticed that the world is drawn before you handle collision events, making my guy bouncy when collision was working as written. If I moved the guy one pixel to high, the gravity would bring him down, the world would be drawn and the collision code would trigger. If I moved the guy one pixel less high (in collision) the code would freak and my guy would freeze for a few seconds (not moving left or right or jump) and would disappear. No, I could not set the guy at the right place, there was no right place, either bouncy guy or code freeze.

I got fed up trying many kinds of way to fix this bug. 

Ill probably get back to it soon. Ill keep you posted.

----------


## Ynot

let&#39;s ramp this arguement up a notch.....

Cobol Vs. Fortran

ready....Go&#33;

----------


## arby

> let&#39;s ramp this arguement up a notch.....
> 
> Cobol Vs. Fortran
> 
> ready....Go&#33;
> [/b]



Cobol obviously wins because if you take the b out, you&#39;re left with cool.

That pwns Fortran.

And what you&#39;re describing there is exactly why I dislike gamemaker =P

I like my flexibility =P

But ya... as a very basic learning tool it may prove semi-useful. But otherwise I reccomend to stay away.

Wanna try Actionscript? I&#39;m interested in your opinion on it =P

----------


## icuurd12b42

> let&#39;s ramp this arguement up a notch.....
> 
> Cobol Vs. Fortran
> 
> ready....Go&#33;
> [/b]



A long time ago, in a galaxy far far away, Cobol was invented for huge business management software.

Meanwhile, the more academic mathematicians needed a language tailored to their skills. Fortran was the gift form the Programming Language gods.

Cobol will never go away. It is implanted in the business psyche. Still today, billions of lines of Cobol code written in the 70 and 80 are executed everyday by banks and governments. To add features and make changes, your are condemned to do it in this language.

Fortran code is probably still used by scientific purists, running scientific experiments..

Fortran has a compiler, I cant remember if Cobol is compiled.

But, today, linking to DLLs and COM is supported by most languages so, really, programming becomes a multi language endeavour.

Usually, you select a language that does most of what you want well and tack on the rest with DLLs and COM.

The code you write now is likely to be 5% of the entire code executed by your application. That 5% (if written in interpreted code compiled to byte code) runs at 95% of the speed of a fully compiled code. So, using this information, a mixed language code, whos glue code is byte code, will run at  97.5% the speed it would if fully compiled.

[edit the 97.5 calc may not have been calculate right. will come back to confirm]

Of course, if your code consists mainly of embedded language specific calls then the code runs at 95% of the speed it could run if fully compiled. That, of course (the 95%), is if the compiled code mirrors exactly the original byte code. Im not taking into account that you can delete a huge amount of useless (but still executed) code from your application when you have full control over the code to fully optimize things.

----------


## Pyrofan1

I program game, in C++ i don&#39;t use microsoft visual C++ i use Dev-cpp, i think it&#39;s great, I&#39;ve made this game It uses Allegro, it&#39;s a very good graphics library, it also has support for the mouse, keyboard, timing functions and MIDI support.  So i would recommend it for game programming. I not exactly sure what you&#39;re asking, but start with the basics ie. pong. You don&#39;t even have to make the game use two human players the A.I. in pong is really simple
example: (C++)
if(ball_y>computer_y) computer_y++;
else
if(ball_y>computer_y) computer_y--;

p.s. sorry if this post seems to jump to different subjects.

----------


## Kaniaz

I remember using Allegro with C++. Fun times, I had never compiled anything before and was following tutorials to the letter. Happy days.

I made a game in it called "revenge of the blue dot", in which a blue pixel would chase you directly and there was absolutely no gameplay strategy except &#39;keep your lead&#39;, but, well, shut up.

----------


## Stalker

Another graphics engine for game programming is the Irrlicht engine. You&#39;ll need to add network support and sound yourself though. Strategist and Dawn of Daria both use a modified version of this engine. (Now who said 2D-games are dead?)

----------


## dsr

CasualTie, game programming might sound interesting, but it is very complex and _not_ a good introduction to programming. To be a good game programmer you will have to be a good programmer, and the latter itself takes a good five years. I don&#39;t want to discourage you if you are really serious about it, but you&#39;ll have to determine if game development is really worth the time and effort needed to put into it. Do you see this as a temporary hobby or as a lifelong pursuit?

Now that all that is out of the way, let me give you my advise. First, learn a high-level language that doesn&#39;t lock you into a specific platform (i.e. don&#39;t start with .NET languages). Python is an excellent choice for many reasons. While Eric Raymond lays out myriad reasons why Python is a great first programming language, I will list just the highlights:Compact - easy to learn, remember, and use; fewer bugsConcise - thanks to dynamic typing and builtin high-level data types, Python code is about 7x shorter than Java and 10x shorter than C++Productive - shorter development cycle because it&#39;s interpreted and conciseClear syntax - fewer bugs in large projectsCross-platform - runs on post architectures and OSes; wxPython for cross-platform GUIsHuge problem domain - useful for: quick scripts, command-line apps, GUI apps, web apps, CGI scripts, etc.Python also has a great tutorial to get beginners up to speed. Once you learn the basics (expect 2 weeks to a month), stick with it for at least a year and study other people&#39;s code. Then learn the PyGame API. Once you&#39;re comfortable with that, then you might consider learning a lower-level language like C++ (still higher-level than C or assembly). C++ will give you even more power than Python and certainly higher performance, but you have to be willing to spend years to become a good programming, especially with a language like C++. Don&#39;t think programming, game programming no less, is a simple task&#33;

----------


## M-Cat

> I program game, in C++ i don&#39;t use microsoft visual C++ i use Dev-cpp, i think it&#39;s great, I&#39;ve made this game It uses Allegro, it&#39;s a very good graphics library, it also has support for the mouse, keyboard, timing functions and MIDI support.  So i would recommend it for game programming. I not exactly sure what you&#39;re asking, but start with the basics ie. pong. You don&#39;t even have to make the game use two human players the A.I. in pong is really simple
> example: (C++)
> if(ball_y>computer_y) computer_y++;
> else
> if(ball_y>computer_y) computer_y--;
> 
> p.s. sorry if this post seems to jump to different subjects.
> [/b]



Dev-C++ is what I use. I thought you criticized my compiler   ::roll::  

Anyway, for the absolute beginner to game programming, you can use something like game maker found at gamemaker.nl. It&#39;s an excellent introduction to sprite manipulation, variables, conditionals, etc. without any coding at all, as its all drag-and-drop. If you have a TI graphing calculator, you can make programs in the built-in BASIC language, which is very easy to use. You can make a good snake game in an hour with it. You also can program in the TI calculator&#39;s assembly language, though I wouldn&#39;t recommend that   ::|:  

That should give you experience and knowledge of what it takes to make a game; after that, learning the actual code for a language like C++ (which is actually incredibly easy) is the last step before you can make your own games.

Anyway those are just suggestions. I find making games more fun that playing them. Have fun&#33;

----------


## Kaniaz

Dev-C++ is an IDE, dearest, not a compiler.

----------


## M-Cat

Yes I know, but it has G++ built into it so I call it a compiler.

----------


## Demerzel

no it doesnt it just installs it

----------


## M-Cat

First of all, yes it does.  :smiley:  

Second of all it doesn&#39;t matter what you call it. If I were as literal as you I&#39;d say your sentence is invalid because it doesn&#39;t end with a period. You don&#39;t see me correcting everything you say, right?

I&#39;m done talking about Dev-C++ because you deliberately bring up errors to humiliate me despite the fact that, hey, your posts are more inaccurate than mine.  :smiley: 

And I still call it a compiler.  :tongue2:

----------


## MSG

> I&#39;m done talking about Dev-C++ because you deliberately bring up errors to humiliate me despite the fact that, hey, your posts are more inaccurate than mine.
> [/b]



If you&#39;re such a victim, then why did you delete your posts?

----------


## M-Cat

Um, I didn&#39;t... lol xD

----------


## Replicon

Well, I didn&#39;t read the entire thread, so maybe this will be redundant (plus I don&#39;t know if you still need help hehe), but... 

1) What interests you most about game programming?
2) What level are you at? (as in, have you done ANY programming? what languages, etc.?)

I can probably nudge you in a good enough direction and recommend some books, or free online resources (you can get set up for learning for 3 easy installments of &#036;0.00 if you know where to look).

----------

