For some reason I can't get my head around game programming...

Started by OldNESJunkie, November 03, 2010, 03:44:34 PM

Previous topic - Next topic

OldNESJunkie

For some reason I can't get my head around game programming, but I can program applications without any major issues. Don't know what it is, anyone else have a similiar problem ? Types, Arrays give me the most problems for some reason.......annoying.

kevin

 I think everybody goes through such things at some point.  The "where do I start question ?" is a common one, but unfortunately the answer is not what most people want to hear.     Start super simple and evolve your ideas as you go. But at least get a focal point, a mission statement if you like.   I want to make such and such..  At least then you've a destination, then it's just matter of working out the steps to reach it and tackling the problems as they come up.

   

OldNESJunkie

The saddest part is that I've been programming off & on since the C64 days, mostly used packages that make it "easy" to program like, Garry Kitchen's GameMaker,  Click & Create, GameMaker, etc. I've actually currently got licenses for GameMaker 8, Blitz3D, BlitzMax, Cobra3D, PlayBasic, & PureBasic. Only one's I regularly use are GM, PlayBasic, & PureBasic (work). Trying to get away from GM. I know PureBasic can be used for games as well. But IMHO I believe PlayBasic has the best overall feature set for the type of games I want to program. Been using PlayBasic more & more recently, unfortunately for me I used B3D first so I sometimes find myself typing in commands from that (hehehe) and then getting PO'd at myself. I know the saying goes "You can't teach an old dog new tricks", but I think it's possible, just takes longer to "forget" the other languages I've used previously.

kevin


  You're not alone, one only has to browse around the various forums to see waves of people in much the same position.   It's natural for people to gravitate towards the next big thing.  The problem is, there will always be a next big thing.   In the long run, It's merely a distraction from actually getting a score on the board.   Otherwise you end up on the tool chain merry-go-around.   Who cares if you're missing feature XYZ, it's really not important.   At some point the onus falls upon the programmer to convert their game ideas into something tangible.   Which has very little to do with language.  

  So personally my advice to you or anyone, is form an idea for your game, pick a tool,  then work your way through it.  You'll learn much more in the long run.  As with everything though, the first version probably won't be all that you hoped, that's what sequels are for :)


LBFN

I try to get a basic understanding of what a language can do and how things are done with it and then move on to writing simple games and proceed to more difficult games as my learning increases.  It may be that you have tried to advance too quickly and did not have a grasp upon some basic info needed (a good understanding of arrays is essential IMO).  I had done something similar (not with PB) and became frustrated when things didn't work as they should.  I then went  back to the basics until I had a good understanding of how things really worked.  It was worth it.

One of the biggest helps to me is reading the code that someone that is proficient with the language has written.  There is a significant amount of source code available for PB that Kevin has written.  It would be advisable to look hard at that to see how he does things.  At some point, it will click and you'll get it.

OldNESJunkie

Quote from: LBFN on November 04, 2010, 10:58:17 AM
One of the biggest helps to me is reading the code that someone that is proficient with the language has written.  There is a significant amount of source code available for PB that Kevin has written.  It would be advisable to look hard at that to see how he does things.  At some point, it will click and you'll get it.

I fully agree there, have gotten quite a bit more understanding this week due to be on vacation & having more time to play around with others source to learn from, think I may finally have a full understanding of how arrays & types work (FINALLY). Now to write some small simple games to start with and build up from there.

Offtopic:

Kevin,
Does the latest retail installer from the bonus board not include the examples ? I d/l it to reinstall, but there's no examples I can find anywhere, checked in program files\playbasic\projects, also in users\dford\appdata\roaming\playbasic\projects, both folders are empty.

kevin


The projects (when included) are installed to the shared documents folder, so they're accessible to all users on the computer.

Versions of the projects package can be found on http://playbasic.com/downloads.php 

OldNESJunkie

Quote from: kevin on November 04, 2010, 07:52:21 PM

The projects (when included) are installed to the shared documents folder, so they're accessible to all users on the computer.

Versions of the projects package can be found on http://playbasic.com/downloads.php 


OK, I just d/l & installed those, thanks again Kevin.

stevmjon

i avoided learning functions & types for ages. they looked a little complicated, and i thought arrays & gosubs would suffice...how i was wrong. definately learn functions & types. they have a definate advantage. it is well worth it, because they can shorten your code, making editing a lot easier.

one great feature, is that you can call the same function, multiple times using different arrays() in each function call.
eg.  thisfunction(array1(),stuff)  :  thisfunction(array2(),stuff)  :  thisfunction(array3(),stuff)
here, the same function is accessed three times, using different arrays. this is so cool.

good luck with your progress.

stevmjon

It's easy to start a program, but harder to finish it...

I think that means i am getting old and get side tracked too easy.

kevin


@OldNESJunkie:

QuoteI fully agree there, have gotten quite a bit more understanding this week due to be on vacation & having more time to play around with others source to learn from, think I may finally have a full understanding of how arrays & types work (FINALLY). Now to write some small simple games to start with and build up from there.

   There's really two different discussions here wrapped up into one.  Understanding data structures such as Array()'s are very important yes, but they have little to do with core machenics of the writing a game.  They simply help us manage information, this information could be anything.   But the better the understanding we have of managing data, the more abstract ways you'll find of using them to solve programming problems.   

   Of course writing a game without some understanding data structures is virtually impossible, but people still try and do it.  It's usually this that forces them hand into learning more about it.   As learning something without seeing the need /  benefit or obvious usage, is generally useless.   It's just in one ear and our the other.


   Data Structures are part of the puzzle,  the other parts are the concepts behind how we can use such structures to manage the character within a game.   There's a bit of FAQ/ tutorial that runs over one way of doing it.   In reality though this can conceptualize probably a 100 different ways..
   
   Object Management (Character Life Cycles):




OldNESJunkie

Thanks for that tutorial Kevin, will read it tonight when I get off work.