What do you guys recommend as a good PureBasic source to learn from.
I want to get some fresh ideas on approaches.
I am particularly interested in how people handle things like detecting the mouse is over a sprite where the sprite is a clickable object (eg unit or building) and may be moving. I am assuming collision detection but there may be a smarter way.
Also how people deal with windowed screens and balance the requirements of the event loop and the game loop - and not hogging CPU.
And interesting maths, from simple things like distance between to points to more complex things (for me) like elasticity and acceleration.
I would love to hear your recommendations for good sources that teach good habits and/or good techniques.
Thanks!
Recommended 2D PB games to learn from
Recommended 2D PB games to learn from
Dare2 cut down to size
-
Brice Manuel
Paul's Lady's Garden is a very good example, especially the windowed version. If you search on the forums, there is an example of it with menus/about box implemented which is especially helpful.
There is a LOT of great example code in the CodeArchives at PureArea that has several games and examples for most anything you would need to do in a game.
There is a LOT of great example code in the CodeArchives at PureArea that has several games and examples for most anything you would need to do in a game.
Hi Brice,
Thanks. Yes, I have collected all the games I can find anywhere (and have downloaded the code archive).
Some are really good in gameplay and presentation and (I assume) methodology. Some are not so good.
And some look good but may have bad coding practice.
I am chasing opinions, recommendations and suggestions basically because I have more faith in the corporate brain on this forum than I have in my own.
Thanks again.
Actually, if this ended up as a discussion on gaming techniques then that would be great! Everyone would benefit.
Thanks. Yes, I have collected all the games I can find anywhere (and have downloaded the code archive).
Some are really good in gameplay and presentation and (I assume) methodology. Some are not so good.
I am chasing opinions, recommendations and suggestions basically because I have more faith in the corporate brain on this forum than I have in my own.
Thanks again.
Actually, if this ended up as a discussion on gaming techniques then that would be great! Everyone would benefit.
Dare2 cut down to size
You said you have more faith in people in this forum than your own. I would like to recommend you to change that and think yourself as part of this forum already to approach things as you would approach it with "us".
I am not long-term writer here but I am long-term reader. It's just recently I made the decision to try things with PB instead of MFC.
Best source to learn from is your own practice. Expressing own ideas here will open discussion of people marvelling your brilliant ideas or good suggestions of how to improve what youre doing.
Few days ago I made small game application to test how PB works and to see how my idea of user interaction in arcade game would "feel like". Search for it and look at the code... I used some time browsing trough examples and working applications to put up together that.
I am not long-term writer here but I am long-term reader. It's just recently I made the decision to try things with PB instead of MFC.
Best source to learn from is your own practice. Expressing own ideas here will open discussion of people marvelling your brilliant ideas or good suggestions of how to improve what youre doing.
Few days ago I made small game application to test how PB works and to see how my idea of user interaction in arcade game would "feel like". Search for it and look at the code... I used some time browsing trough examples and working applications to put up together that.
-
Brice Manuel
Dare: Main thing I can say is if you have questions ask. Also look at third-party game programming sites.
Unfortunately, PB is an all-purpose language. In such communities, gaming is often frowned on and discussions on the subject don't get a lot of attention as most folks are app developers. Game development requires an artistic creativity that just isn't a part of application development, so there isn't a lot of "cross-over" posts.
Game Development isn't too pupular here and game developers only have one forum to cover all types of gaming whether it be 2D, 3D, gaming tools, gaming methods, etc. Pretty much why you rarely see any discussion on the topics.
Like most all-purpose languages, PB itself treats gaming as an afterthought which contributes to the community animosity towards gaming. The gaming side of PB has been ignored for years while the app side has been improved. One can hardly fault PB if that is where their $$ is and what the customers want.
Myself and others here would love to have a dedicated PB gaming community. Even if somebody set one up, I doubt there would be a lot of interest. You might want to find and join a gaming site for indie developers regardless of the language they use.
You might also want to browse around Planet Source Code. In particular their VB section. There is some good gaming stuff buried in there amongst the fluff
Unfortunately, PB is an all-purpose language. In such communities, gaming is often frowned on and discussions on the subject don't get a lot of attention as most folks are app developers. Game development requires an artistic creativity that just isn't a part of application development, so there isn't a lot of "cross-over" posts.
Game Development isn't too pupular here and game developers only have one forum to cover all types of gaming whether it be 2D, 3D, gaming tools, gaming methods, etc. Pretty much why you rarely see any discussion on the topics.
Like most all-purpose languages, PB itself treats gaming as an afterthought which contributes to the community animosity towards gaming. The gaming side of PB has been ignored for years while the app side has been improved. One can hardly fault PB if that is where their $$ is and what the customers want.
Myself and others here would love to have a dedicated PB gaming community. Even if somebody set one up, I doubt there would be a lot of interest. You might want to find and join a gaming site for indie developers regardless of the language they use.
You might also want to browse around Planet Source Code. In particular their VB section. There is some good gaming stuff buried in there amongst the fluff
- Kaeru Gaman
- Addict

- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
@Dare
I would also recommend "Dune 2077" by Stargate.
http://www.purebasic.fr/german/viewtopic.php?t=6379
it for PB 3.3, but worth having a look at it.
if the source wasn't included, drop him a PM.
> I am assuming collision detection but there may be a smarter way.
I generelly recommend coordinate-checks like here:
http://www.purebasic.fr/german/viewtopic.php?t=9093
> simple things like distance between to points
using three multiplications is much faster than using Pow() and Sqr()...
there are a lot of code snippets all over the forums, not only complete games carry a lot of information...
I would also recommend "Dune 2077" by Stargate.
http://www.purebasic.fr/german/viewtopic.php?t=6379
it for PB 3.3, but worth having a look at it.
if the source wasn't included, drop him a PM.
> I am assuming collision detection but there may be a smarter way.
I generelly recommend coordinate-checks like here:
http://www.purebasic.fr/german/viewtopic.php?t=9093
> simple things like distance between to points
using three multiplications is much faster than using Pow() and Sqr()...
there are a lot of code snippets all over the forums, not only complete games carry a lot of information...
oh... and have a nice day.
Agreed, if more effort was levied upon the 3D engine, PB would be a kick arse dev environment for games, and people would move from DBPRo/Blitz in droves!Brice Manuel wrote:Like most all-purpose languages, PB itself treats gaming as an afterthought which contributes to the community animosity towards gaming. The gaming side of PB has been ignored for years while the app side has been improved.
Hi guys
Thanks for all the feedback.
I don't know about you but what I find is that after a while I get into a rut and just follow the same old tried and true (but not necessarily optimum) paths. In everything I code.
So I am looking for games that are considered good. Excellent overall design, good techniques, clever algos, etc.Things that will give me an "aha!" experience.
And opinions from people about why a game (or parts thereof) are good.
Kaeru Gaman, I have followed the link and will make some attempt to translate those posts to English.
The screenshots look good. Before I contact him, does STARGÅTE speak/write English, do you know?
Thanks!
Thanks for all the feedback.
I don't know about you but what I find is that after a while I get into a rut and just follow the same old tried and true (but not necessarily optimum) paths. In everything I code.
So I am looking for games that are considered good. Excellent overall design, good techniques, clever algos, etc.Things that will give me an "aha!" experience.
And opinions from people about why a game (or parts thereof) are good.
Kaeru Gaman, I have followed the link and will make some attempt to translate those posts to English.
Thanks!
Dare2 cut down to size


