GP2X I Cant Program But Hear Me Out


rei_yano

Still Fresh
Joined
Sep 3, 2006
Messages
72
nothing has inspired me to want to code then hearing about the gp2x and reading about it since its release. its been months of reading about it and its capabilities. it really is a solid machine. I dontk now anything about coding but this thing makes me want to. I have yet to buy one and I will be buying one in a few months however I feel that since I know near to nothing about coding I dont realy need the gp2x to get started. all of you coders for the gp2x had to have difficult and frustrating introductions to coding. almost everyone does Im sure. long nights. lots of caffiene. I know that story I have a freind that is a decent coder. where do I begin to start coding on the gp2x? I dont want to learn anything other than what I need to for gp2x. strictly coding that can help me dev for the gp2x. I dont plan on making a carrier out of this. so just throw me in the muck of it. also if you could... maybe share your experiances with coding when you started out? how did you get into this? are you enjoying your experiance with the gp2x? tell me all you can. elaborate. thank you guys. I know Im just a n00b. help me out of my n00bness. :)
 
Rei Yano posted on Sep 4 2006 at 02:21 AM said:
nothing has inspired me to want to code then hearing about the gp2x and reading about it since its release. its been months of reading about it and its capabilities. it really is a solid machine. I dontk now anything about coding but this thing makes me want to. I have yet to buy one and I will be buying one in a few months however I feel that since I know near to nothing about coding I dont realy need the gp2x to get started. all of you coders for the gp2x had to have difficult and frustrating introductions to coding. almost everyone does Im sure. long nights. lots of caffiene. I know that story I have a freind that is a decent coder. where do I begin to start coding on the gp2x? I dont want to learn anything other than what I need to for gp2x. strictly coding that can help me dev for the gp2x. I dont plan on making a carrier out of this. so just throw me in the muck of it. also if you could... maybe share your experiances with coding when you started out? how did you get into this? are you enjoying your experiance with the gp2x? tell me all you can. elaborate. thank you guys. I know Im just a n00b. help me out of my n00bness. :)
Well there are things you need to learn no matter WHAT you want to code one. Such as the concept of how a computer program must run. How you will achieve the tasks required etc. One of the easiests routers would be something like Fenix. Assuming you are intending to make makes that is. It's very simple to use, well, compared to other lower level languages.
 
Last edited by a moderator:
I would like somewhere to start. I suppose just general programming to begin with. lead me to where I should start for gp2x game dev. what should be my first step. and please be specific. "learn c++" isnt needed or helpful. Im sure others helped you guys along the way. pass down some info. :D


and links please. links to good info is what I need.
 
Hell, i'm barely into learning C :D I know Fenix to an extent. Also you need to 'Learn C++' well not cessiarily C++. But you get the point. You could look for a book, or some online tutorials for beginning programming. There are some SDL and C++ tutorials somewhere that were recently posted. I'm going to be now but I am sure that someone will drag the link up once they wake up.
 
sam fisher posted on Sep 4 2006 at 02:53 AM said:
Hell, i'm barely into learning C :D I know Fenix to an extent. Also you need to 'Learn C++' well not cessiarily C++. But you get the point. You could look for a book, or some online tutorials for beginning programming. There are some SDL and C++ tutorials somewhere that were recently posted. I'm going to be now but I am sure that someone will drag the link up once they wake up.

yeah I suppose. I have been reading gamedev.net and found a couple of good guides on general direction. gonna make me a tetris clone. what compiler is recomended?
 
Last edited by a moderator:
Did you take a look at the wiki yet? It has tutorials on setting everything up and a lot of information. Gives a guide on setting up SDL and such. A very useful sight to get started with GP2X deving.
 
reaper79 posted on Sep 4 2006 at 03:19 AM said:
Did you take a look at the wiki yet? It has tutorials on setting everything up and a lot of information. Gives a guide on setting up SDL and such. A very useful sight to get started with GP2X deving.
thanx!
 
Last edited by a moderator:
You can also download a setup of devcpp or codeblocks to get you starting. I would recommend c++ and SDL for ya. It`s not too complicated to learn and does ALL(!) the stuff you will ever need on a gp2x. If you get to a point where you are able to write your own graphics library for the gp2x instead of SDL, you will be an expert but until then SDL takes a lot of work from you that you`d have to do yourself otherwise. Also take a look on these forums for nice tutorials.
 
xnopasaranx posted on Sep 4 2006 at 10:24 AM said:
You can also download a setup of devcpp or codeblocks to get you starting. I would recommend c++ and SDL for ya. It`s not too complicated to learn and does ALL(!) the stuff you will ever need on a gp2x. If you get to a point where you are able to write your own graphics library for the gp2x instead of SDL, you will be an expert but until then SDL takes a lot of work from you that you`d have to do yourself otherwise. Also take a look on these forums for nice tutorials.
But beware, SDL isn't as easy as it sounds :ph34r:
 
Last edited by a moderator:
aapje89 posted on Sep 4 2006 at 09:44 AM said:
xnopasaranx posted on Sep 4 2006 at 10:24 AM said:
You can also download a setup of devcpp or codeblocks to get you starting. I would recommend c++ and SDL for ya. It`s not too complicated to learn and does ALL(!) the stuff you will ever need on a gp2x. If you get to a point where you are able to write your own graphics library for the gp2x instead of SDL, you will be an expert but until then SDL takes a lot of work from you that you`d have to do yourself otherwise. Also take a look on these forums for nice tutorials.
But beware, SDL isn't as easy as it sounds :ph34r:
yeah I have heard that sdl can be a little difficult. Im just gonna try to pull off a tetris clone. thats my goal. a tetris clone in two months.
 
Last edited by a moderator:
aapje89 posted on Sep 4 2006 at 04:44 AM said:
But beware, SDL isn't as easy as it sounds :ph34r:
It's certainly not difficult, either. It isn't like using Game Maker or something, but as far as media libraries go, it's the simplest I've come across. It took barely any getting used to to use effectively and anyone with a half-decent grasp of C or C++ should be able to use it effectively, if they know the principles of game programming.
 
Last edited by a moderator:
anyone with a half-decent grasp of C or C++ should be able to use it effectively, if they know the principles of game programming
I think therein lies the problem though - the OP has no grasp of C or C++ at all, not even a half-decent one, and doesn't know the principles of game programming.

I still think that python+pygame is a better way to get newcomers to programming understanding basic concepts while making interesting test programs.
 
My advice is, try the BASIC language, for some months, just to get the basics of programming, if, then, next, while, for (blabla) and all that stuff that is common in most programming languages.
C seems, at the beginning, quite the same (with different function names) but has more tools, like pointers, libraries, etc...
C++ introduce object-oriented programming, but I don't know much about it

Anyway, I started coding on a TI82 calculator, and since it has all the functions sorted in menues, you won't have to search the internet: just wander around menues, and open the manual if you wonder what a fonction does....
 
reiboul posted on Sep 4 2006 at 07:16 AM said:
Anyway, I started coding on a TI82 calculator, and since it has all the functions sorted in menues, you won't have to search the internet: just wander around menues, and open the manual if you wonder what a fonction does....
I started coding on a TI-89 :) Good old handheld BASIC!
  • Messed with BASIC on a TI89 for about one year
  • Read about the basics of C and played with it for two months or so
  • Found Fenix, and started experimenting with it. Fenix solidified certain concepts for me, mainly the structure of a game loop. I played with it for about three months.
  • Re-read the basics of C, and started to experiment with it more and more. I managed to program in C every single thing I could do with Fenix, but at much greater speeds on a much lower processor (GP32 vs. TI-89) :)
  • One year later: started learning SDL, made a simple game with no gameplay to get the feel of the library, and then started some serious WIP's.
The result is a couple of dozen broken binaries, unfinished ideas, and nearly failed courses. The more you play with it, the more comfortable you get with the language and the overall concept. Good luck :)

- Alex
 
Last edited by a moderator:
Alex. posted on Sep 4 2006 at 03:53 PM said:
reiboul posted on Sep 4 2006 at 07:16 AM said:
Anyway, I started coding on a TI82 calculator, and since it has all the functions sorted in menues, you won't have to search the internet: just wander around menues, and open the manual if you wonder what a fonction does....
I started coding on a TI-89 :) Good old handheld BASIC!
  • Messed with BASIC on a TI89 for about one year
  • Read about the basics of C and played with it for two months or so
  • Found Fenix, and started experimenting with it. Fenix solidified certain concepts for me, mainly the structure of a game loop. I played with it for about three months.
  • Re-read the basics of C, and started to experiment with it more and more. I managed to program in C every single thing I could do with Fenix, but at much greater speeds on a much lower processor (GP32 vs. TI-89) :)
  • One year later: started learning SDL, made a simple game with no gameplay to get the feel of the library, and then started some serious WIP's.
The result is a couple of dozen broken binaries, unfinished ideas, and nearly failed courses. The more you play with it, the more comfortable you get with the language and the overall concept. Good luck :)

- Alex

I never liked TI89 :p too complicated
 
Last edited by a moderator:
My Standard response to new programmers. Replace PSP with GP2X.
Beginning
If you are just starting out with C++, then completely forget about programming for the PSP for the moment. It will only add an extra layer of complexity that will stop you from learning the language and the main concepts of programming.

Learn the fundamentals first, these include:
- Variables
- Conditional Statements
- Loops
- Functions
- Return values
- Parameter passing

Gamedev have a C++ workshop that has been going for a while now that you still might be able to catch up. 'Thinking like a Computer scientist' is also considered a good free ebook but nothing will substitute a good 'real' book on paper. At this point, you be mostly working with text in a 'console' (ie command prompt).

Targets: simple applications such as a Line based text editor that reads and writes to a file, Tic Tac Toe, a Text Adventure (with a command parser), Hangman, etc.

Workshop: http://www.gamedev.net/community/for...sp?forum_id=76
Thinking like a computer Scientist (C++ version): http://www.andamooka.org/reader.pl?section=thinkcpp
C Plus Plus Site: http://www.cplusplus.com/doc/tutorial/
Beginning C++ Game Programming: http://www.amazon.co.uk/gp/product/1592002...39&v=glance

Middle
After this you can move onto more language specific areas such as the macros, pointers, references, const, header/source organisation. Also you can start looking at graphical libraries such as SDL and OpenGL, both of which are cross platform and work on the PSP. This means that you can work on the PC and with some minor changes to the code, recompile and it should work on the PSP as well.

Targets: Graphical games such as Tetris, Breakout, snake, Mario clone, a small FPS level.

Thinking In C++ Vol 1: http://www.mindview.net/Books/TICPP/...ngInCPP2e.html
SDL tutorials: http://lazyfooproductions.com/SDL_tutorials/index.php
OpenGL tutorials: http://nehe.gamedev.net/

Advanced
Finally, you can jump into Object Orientation programming and the finer areas of the language (although you can do this at any point really). Thinking in C++ Vol 2 is probably the best free ebook in this area. There are also a selection of PDFs on the five principles of OOP.

Targets: Anything you want, think big and go for it.

Thinking in C++ Vol 2: http://www.mindview.net/Books/TICPP/...ngInCPP2e.html
Five Principles in OOP:
http://www.objectmentor.com/resources/articles/srp
http://www.objectmentor.com/resources/articles/lsp.pdf
http://www.objectmentor.com/resources/articles/isp.pdf
http://www.objectmentor.com/resources/articles/dip.pdf
http://www.objectmentor.com/resources/articles/ocp.pdf

Working on games? At the bottom line, there is little difference in approach to designing a Word Processor and a Game. They both require careful thought and preparation before starting otherwise you end up with very hacky and messy code base which will hinder your project's progress. At present, some of the Lua projects going on here (no offence to anyone, I know you guys are still learning) are falling in that trap, I myself have done so several times in the past as well. However, there several areas that will help you greatly in designing and building a game. One of them is Finite State Machines (FSM). This has been used for the game's structure, AI, item behaviour etc. The other skill is Abstraction which you will pick up with experience. It is basically taking an object and form it in code, from 'base' componments. Eg:

What is a bullet? It has an position in space (X, Y ,Z value), graphical representation and a velocity.

Some other bits and pieces of information
Keep up your math skills at a good level, especially areas such as Trigonometry, Algebra and Vector math. They are invaluable in programming especially game programmming. Later on, you will need to have some knowledge of matrix math when dealing with 3D scenes.

Here are some FAQs for the C++ language, Matrix math and vectors although you wont need them for a while yet:

C++ FAQ lite: http://www.parashift.com/c++-faq-lite/
Matrix Math FAQ: http://www.gamedev.net/reference/art...rticle1691.asp
Vector Math FAQ: http://www.j3d.org/matrix_faq/vectfaq_latest.html

This link is especially important for learning how to organize your files correctly in C/C++
http://www.gamedev.net/reference/articles/article1798.asp

Wiki for Games Development in general
http://gpwiki.org/

Doing a platform/jump and run game? Take a look at jnrdev
http://jnrdev.72dpiarmy.com/

Want to write a Game Engine? I recommend at least reading through these articles first and if you can, the book Game Coding Complete
http://www.gamedev.net/reference/programmi...res/enginuity1/
http://www.gamedev.net/reference/programmi...res/enginuity2/
http://www.gamedev.net/reference/programmi...res/enginuity3/
http://www.gamedev.net/reference/programmi...res/enginuity4/
http://www.gamedev.net/reference/programmi...res/enginuity5/

Learn the Standard Template Library (STL) or/and Boost. They have a number of template classes that are extremely useful such as vectors, lists and smart pointers. Abuse them.

Books
Here are a list of good books to read although they will be at an advance level so keep the list as future reference:
- Code Complete: http://www.amazon.co.uk/gp/product/0735619...ay&v=glance
- Rapid Development: http://www.amazon.co.uk/gp/product/0072850...ay&v=glance
- Pragmatic Programmer: http://www.amazon.co.uk/gp/product/0201616...ay&v=glance
- Game Coding Complete (Fantastic book, MUST READ): http://www.amazon.co.uk/gp/product/1932111...ks&v=glance
- Effective C++: http://www.amazon.co.uk/gp/product/0321334...ks&v=glance
- Design Patterns: Elements Of Reusable Object Orientated Software: http://www.amazon.co.uk/gp/product/0201633...ks&v=glance

There is a ton more information that I can pass on but I think this should keep you going for a while and you will pick up the rest as you go along.
 
yaustar posted on Sep 4 2006 at 02:13 PM said:
My Standard response to new programmers. Replace PSP with GP2X.
Beginning
If you are just starting out with C++, then completely forget about programming for the PSP for the moment. It will only add an extra layer of complexity that will stop you from learning the language and the main concepts of programming.

Learn the fundamentals first, these include:
- Variables
- Conditional Statements
- Loops
- Functions
- Return values
- Parameter passing

Gamedev have a C++ workshop that has been going for a while now that you still might be able to catch up. 'Thinking like a Computer scientist' is also considered a good free ebook but nothing will substitute a good 'real' book on paper. At this point, you be mostly working with text in a 'console' (ie command prompt).

Targets: simple applications such as a Line based text editor that reads and writes to a file, Tic Tac Toe, a Text Adventure (with a command parser), Hangman, etc.

Workshop: http://www.gamedev.net/community/for...sp?forum_id=76
Thinking like a computer Scientist (C++ version): http://www.andamooka.org/reader.pl?section=thinkcpp
C Plus Plus Site: http://www.cplusplus.com/doc/tutorial/
Beginning C++ Game Programming: http://www.amazon.co.uk/gp/product/1592002...39&v=glance

Middle
After this you can move onto more language specific areas such as the macros, pointers, references, const, header/source organisation. Also you can start looking at graphical libraries such as SDL and OpenGL, both of which are cross platform and work on the PSP. This means that you can work on the PC and with some minor changes to the code, recompile and it should work on the PSP as well.

Targets: Graphical games such as Tetris, Breakout, snake, Mario clone, a small FPS level.

Thinking In C++ Vol 1: http://www.mindview.net/Books/TICPP/...ngInCPP2e.html
SDL tutorials: http://lazyfooproductions.com/SDL_tutorials/index.php
OpenGL tutorials: http://nehe.gamedev.net/

Advanced
Finally, you can jump into Object Orientation programming and the finer areas of the language (although you can do this at any point really). Thinking in C++ Vol 2 is probably the best free ebook in this area. There are also a selection of PDFs on the five principles of OOP.

Targets: Anything you want, think big and go for it.

Thinking in C++ Vol 2: http://www.mindview.net/Books/TICPP/...ngInCPP2e.html
Five Principles in OOP:
http://www.objectmentor.com/resources/articles/srp
http://www.objectmentor.com/resources/articles/lsp.pdf
http://www.objectmentor.com/resources/articles/isp.pdf
http://www.objectmentor.com/resources/articles/dip.pdf
http://www.objectmentor.com/resources/articles/ocp.pdf

Working on games? At the bottom line, there is little difference in approach to designing a Word Processor and a Game. They both require careful thought and preparation before starting otherwise you end up with very hacky and messy code base which will hinder your project's progress. At present, some of the Lua projects going on here (no offence to anyone, I know you guys are still learning) are falling in that trap, I myself have done so several times in the past as well. However, there several areas that will help you greatly in designing and building a game. One of them is Finite State Machines (FSM). This has been used for the game's structure, AI, item behaviour etc. The other skill is Abstraction which you will pick up with experience. It is basically taking an object and form it in code, from 'base' componments. Eg:

What is a bullet? It has an position in space (X, Y ,Z value), graphical representation and a velocity.

Some other bits and pieces of information
Keep up your math skills at a good level, especially areas such as Trigonometry, Algebra and Vector math. They are invaluable in programming especially game programmming. Later on, you will need to have some knowledge of matrix math when dealing with 3D scenes.

Here are some FAQs for the C++ language, Matrix math and vectors although you wont need them for a while yet:

C++ FAQ lite: http://www.parashift.com/c++-faq-lite/
Matrix Math FAQ: http://www.gamedev.net/reference/art...rticle1691.asp
Vector Math FAQ: http://www.j3d.org/matrix_faq/vectfaq_latest.html

This link is especially important for learning how to organize your files correctly in C/C++
http://www.gamedev.net/reference/articles/article1798.asp

Wiki for Games Development in general
http://gpwiki.org/

Doing a platform/jump and run game? Take a look at jnrdev
http://jnrdev.72dpiarmy.com/

Want to write a Game Engine? I recommend at least reading through these articles first and if you can, the book Game Coding Complete
http://www.gamedev.net/reference/programmi...res/enginuity1/
http://www.gamedev.net/reference/programmi...res/enginuity2/
http://www.gamedev.net/reference/programmi...res/enginuity3/
http://www.gamedev.net/reference/programmi...res/enginuity4/
http://www.gamedev.net/reference/programmi...res/enginuity5/

Learn the Standard Template Library (STL) or/and Boost. They have a number of template classes that are extremely useful such as vectors, lists and smart pointers. Abuse them.

Books
Here are a list of good books to read although they will be at an advance level so keep the list as future reference:
- Code Complete: http://www.amazon.co.uk/gp/product/0735619...ay&v=glance
- Rapid Development: http://www.amazon.co.uk/gp/product/0072850...ay&v=glance
- Pragmatic Programmer: http://www.amazon.co.uk/gp/product/0201616...ay&v=glance
- Game Coding Complete (Fantastic book, MUST READ): http://www.amazon.co.uk/gp/product/1932111...ks&v=glance
- Effective C++: http://www.amazon.co.uk/gp/product/0321334...ks&v=glance
- Design Patterns: Elements Of Reusable Object Orientated Software: http://www.amazon.co.uk/gp/product/0201633...ks&v=glance

There is a ton more information that I can pass on but I think this should keep you going for a while and you will pick up the rest as you go along.
:eek: wow thanks for that. Im really glad for all this info. need to copy paste it lol. ok ok. Ill shoot for a little lower a goal. in two months Ill finish a text adventure game. a simple one. maybe a few other text based ones. should I start with basic or c++? Ive already used C++ and with the help of a freind I made a checkers game (he helped alot... so much that I would say I didnt retain a lot of the info he threw at me :p ) what does basic help me with that c++ couldnt? why would one start with basic?

the thing is that I want to make my text based stuff work on the gp2x :)
when I get it in the coming months I want to throw my text stuff on it. see what gets me really excited is seeing my stuff on a handheld. the idea of seeing something I made on a handheld screen is just amazing. I really cant wait for my gp2x!!! this is gonna be freakin wicked!
 
Last edited by a moderator:
Basic is simpler than C++, and can help you learning the basics of programming, mainly variables, conditions and loops, with a 'human' language
for example :

Input X
For (Y = 1 to Y = X)
Do ( Disp 2*Y+2)

Which can be easily translated : Input a number which will be stored in X, and create a variable called Y which will count from 1 to X, and each time displays 2xY+2


With C or C++ yo will get introduced to functions, pointers, libraries, parameters and a lot of stuff you will need to make a complete program

You can start directly with C or C++ if you wan't to skip BASIC, because you can always train the basics with C++ without using complicated functions... It will just be less user-friendly

Do as you want : I started with TI82's Basic, but it is just as good if you start with C or C++

I don't think you can easily make text-based program with GP2X, as it is all graphics, and no terminal... either use a terminal in Linux or install one on the GP2X, or if you can afford it, buy yourself a TI or Casio calculator, as it is console-based
That said, I neve rprogrammes for the GP2X, but hope I will one day be able ;) maybe someone else can tell you if you can use text programs on the GP2X
 
reiboul posted on Sep 4 2006 at 06:44 PM said:
Basic is simpler than C++, and can help you learning the basics of programming, mainly variables, conditions and loops, with a 'human' language
for example :

Input X
For (Y = 1 to Y = X)
Do ( Disp 2*Y+2)

Which can be easily translated : Input a number which will be stored in X, and create a variable called Y which will count from 1 to X, and each time displays 2xY+2


With C or C++ yo will get introduced to functions, pointers, libraries, parameters and a lot of stuff you will need to make a complete program

You can start directly with C or C++ if you wan't to skip BASIC, because you can always train the basics with C++ without using complicated functions... It will just be less user-friendly

Do as you want : I started with TI82's Basic, but it is just as good if you start with C or C++

I don't think you can easily make text-based program with GP2X, as it is all graphics, and no terminal... either use a terminal in Linux or install one on the GP2X, or if you can afford it, buy yourself a TI or Casio calculator, as it is console-based
That said, I neve rprogrammes for the GP2X, but hope I will one day be able ;) maybe someone else can tell you if you can use text programs on the GP2X

hmmm sad is me =P well i gotta start somewhere... my goal is to make a program for the gp2x in half a year. no matter how simple it is. how is that for a realistic goal? would you guys say this is realistic?
 
Last edited by a moderator:
Back
Top