Thoughts on writing games with FreeBasic
-
- Posts: 3917
- Joined: Jan 01, 2009 7:03
- Location: Australia
Thoughts on writing games with FreeBasic
For me I code for fun, a puzzle solving exercise and it is at an amateur level such as some amateurs might write stories or paint pictures for personal satisfaction without ever selling any of it.
One of the puzzles I thought should be easy to code would be simple old DOS level games and recently thought about how you might code something like Settlers 2 or some other RPG game. However it is rather a large task just working out how to do the mechanics of such games starting with something as "simple" as path finding. There is also a lot of detail which is more about writing a story than coding itself.
While surfing the internet for ideas I came across this project that was inspired by Settlers 2.
https://wl.widelands.org/
And it is a team project,
https://wl.widelands.org/developers/
Clearly writing some kinds of games like an RPG is a mammoth undertaking compared with something simple like tetris or the silly flappy bird which I played but once where the reason for its popularity was lost on me.
Although ok for trying out ideas for those with a background in BASIC the general purpose almost C++ like FreeBASIC is probably not the best language to tackle a specialist project like writing even a simple game particularly as the simpler games need to run on a small mobile phone if you want a wide audience. Even the more complex 3D games will probably be run on small mobile phones perhaps by slipping them into one of those 3D viewer things you place on your head that allows the user to be fully immersed in the scenery and able to "look around" just by moving their heads.
.
One of the puzzles I thought should be easy to code would be simple old DOS level games and recently thought about how you might code something like Settlers 2 or some other RPG game. However it is rather a large task just working out how to do the mechanics of such games starting with something as "simple" as path finding. There is also a lot of detail which is more about writing a story than coding itself.
While surfing the internet for ideas I came across this project that was inspired by Settlers 2.
https://wl.widelands.org/
And it is a team project,
https://wl.widelands.org/developers/
Clearly writing some kinds of games like an RPG is a mammoth undertaking compared with something simple like tetris or the silly flappy bird which I played but once where the reason for its popularity was lost on me.
Although ok for trying out ideas for those with a background in BASIC the general purpose almost C++ like FreeBASIC is probably not the best language to tackle a specialist project like writing even a simple game particularly as the simpler games need to run on a small mobile phone if you want a wide audience. Even the more complex 3D games will probably be run on small mobile phones perhaps by slipping them into one of those 3D viewer things you place on your head that allows the user to be fully immersed in the scenery and able to "look around" just by moving their heads.
.
Last edited by BasicCoder2 on Apr 28, 2016 12:53, edited 2 times in total.
Re: Thoughts on writing games with FreeBASIC
I disagree. I believe FB is just as good as any other language for making a game. Actually it is perhaps simpler since it has many built in graphics functions.
Just my opinion.
-Vince
Just my opinion.
-Vince
-
- Posts: 3917
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: Thoughts on writing games with FreeBASIC
But so do the game orientated languages which have built in graphics so that doesn't set FB apart from them. In fact they have advanced graphic features such as 3D graphics and sound and being able to load other formats such as output from graphic and sound editors and so on. Although you can implement those things with FreeBASIC using a library it is not built into the language itself and different people end up using different incompatible solutions that also require a steep learning curve with regards using a particular library. This is the point of view of an amateur not a professional who wouldn't have the same issues to contend with.
However my thoughts were not really about the limitations FB might have for amateur game programmers but how much harder it is to write a game than I initially thought.
.
However my thoughts were not really about the limitations FB might have for amateur game programmers but how much harder it is to write a game than I initially thought.
.
Last edited by BasicCoder2 on Apr 28, 2016 12:54, edited 1 time in total.
Re: Thoughts on writing games with FreeBASIC
Graphics and sound are libraries for C as well. Java I'm not sure of.
Minecraft was a pc based game to start with and no graphics budget. I'm not sure if it made to the phone but probably. Markus Perrson only made a billion dollars with that one.
I dislike phone games. Why would anyone want to play a game on a 3" screen?
But I do agree that even a simple game is a huge project. Like you say the story is a project in and of itself. There is also dialog, maps, quests, interactions like combat and the biggest headache for most, graphics.
I just read where Kirby, a video game franchise, started by using a small round image with eyes as a place holder for graphics to be added later. They liked it so much they just kept it.
Sometimes you get an idea and you start coding, and then the project seems to grow and grow until you're tired just thinking about how much there is to do. Maybe it takes planning out every detail first before coding anything. Maybe it just takes some serious perseverance.
Minecraft was a pc based game to start with and no graphics budget. I'm not sure if it made to the phone but probably. Markus Perrson only made a billion dollars with that one.
I dislike phone games. Why would anyone want to play a game on a 3" screen?
But I do agree that even a simple game is a huge project. Like you say the story is a project in and of itself. There is also dialog, maps, quests, interactions like combat and the biggest headache for most, graphics.
I just read where Kirby, a video game franchise, started by using a small round image with eyes as a place holder for graphics to be added later. They liked it so much they just kept it.
Sometimes you get an idea and you start coding, and then the project seems to grow and grow until you're tired just thinking about how much there is to do. Maybe it takes planning out every detail first before coding anything. Maybe it just takes some serious perseverance.
-
- Posts: 2958
- Joined: Jun 02, 2015 16:24
Re: Thoughts on writing games with FreeBASIC
The games that are a little complex from the programer point of view are best handled as team projects. The language can not really do anything for you more than fb does since it's very modular. What is seriously missing is an ide supporting oop, doing uml diagrams for instance. It's a little more painful otherwise to shape and communicate about the design of an object.sancho2 wrote:Maybe it just takes some serious perseverance.
Re: Thoughts on writing games with FreeBASIC
Well, IMO, you can easily take the "Maybe" out of the sentence.sancho2 wrote:Maybe it takes planning out every detail first before coding anything.
Since this is not really Game specific, rather Program Size and/or Complexity related.
BTW: this is where Project-Management comes into Play (quite useful)!
(Because that is, what planning is all about.)
Just to clarify: I'm NOT talking about Project-Management Functionality in a IDE.
-
- Posts: 3917
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: Thoughts on writing games with FreeBasic
sancho2:
"I dislike phone games. Why would anyone want to play a game on a 3" screen?"
My wife does all the time. Simple word, number or card games.
Tourist Trap:
"What is seriously missing is an ide supporting oop, doing uml diagrams for instance."
I guess you use the tools you have and know how to use. They will not however give you an imagination.
sancho2 wrote:
"Maybe it takes planning out every detail first before coding anything."
MrSwiss:
"Well, IMO, you can easily take the "Maybe" out of the sentence."
Some people just plan others just do it. When you start doing it you come across problems and solutions and even serendipity discoveries you didn't think of during the planning stage. Planning can be an excuse for never doing it. Just keep it at the level of one big talk fest.
.
"I dislike phone games. Why would anyone want to play a game on a 3" screen?"
My wife does all the time. Simple word, number or card games.
Tourist Trap:
"What is seriously missing is an ide supporting oop, doing uml diagrams for instance."
I guess you use the tools you have and know how to use. They will not however give you an imagination.
sancho2 wrote:
"Maybe it takes planning out every detail first before coding anything."
MrSwiss:
"Well, IMO, you can easily take the "Maybe" out of the sentence."
Some people just plan others just do it. When you start doing it you come across problems and solutions and even serendipity discoveries you didn't think of during the planning stage. Planning can be an excuse for never doing it. Just keep it at the level of one big talk fest.
.
Last edited by BasicCoder2 on Apr 28, 2016 21:40, edited 1 time in total.
Re: Thoughts on writing games with FreeBasic
1) Quoting the wrong People is bad News (Tourist Trap instead of sancho2).BasicCoder2 wrote:Some people just plan others just do it.
2) Quoting "out of Context" is simply crap ... (we've had it about complex programming tasks, not 5 Minute's Job's.)
3) All the problems you "solve" along the way, may never manifest themselves, with a bit of planning.
-
- Posts: 3917
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: Thoughts on writing games with FreeBasic
@MrSwiss,MrSwiss wrote:1) Quoting the wrong People is bad News (Tourist Trap instead of sancho2).BasicCoder2 wrote:Some people just plan others just do it.
2) Quoting "out of Context" is simply crap ... (we've had it about complex programming tasks, not 5 Minute's Job's.)
3) All the problems you "solve" along the way, may never manifest themselves, with a bit of planning.
Sorry about attaching a quote to the wrong person and thanks for pointing it out.
Quoting out of context was not my intention.
Planning is in a sense doing it in your head first but often the plan is vague and really you just can't think of everything. Indeed it is running the program that confirms if you have thought it out clearly in the first place. No way to build a bridge or a complex program to run on the computers controlling an aircraft but not a big deal for the experimental bits of code I play with.
It is just I know someone who plans and plans what they are going to do. They make big lists of what they need. Nothing ever comes from it.
I am not against planning. I just feel that there are some things you can't plan because you first have to discover how they work.
When someone talks about using OOP and a unified modeling language they are talking about using the collective wisdom of their profession.
Perhaps those who have actually done something rather than just talk about it like ecxjoe and his Toad On Fire do use OOP and UML. I don't know because they don't talk about it. As you can see my offerings in this section of the forum have just been a discovery process. Short simple incomplete bits of code.
.
Re: Thoughts on writing games with FreeBasic
I like to code for fun as well, so I know exactly how you feel.BasicCoder2 wrote:For me I code for fun, a puzzle solving exercise and it is at an amateur level such as some amateurs might write stories or paint pictures for personal satisfaction without ever selling any of it.
...There is also a lot of detail which is more about writing a story than coding itself...
I have found the same thing about writing. It is rather important. That is why I tend to write more of the background code. I like writing the engine for the game. Let someone else fill in the story, art, etc.
Re: Thoughts on writing games with FreeBasic
@BasicCoder2,
you see, I've got two hearts in my chest, when it comes to programming:
1) just trying out new stuff, to expand knowledge (e.g. for a long time, I've avoided any graphics stuff).
Sticking with the purely result oriented problem solving logic (Console In-/Output).
2) the professional part of programming, mainly in graphic programming Language, but with self coded
DLL's to expand the Language, if and when needed (special logic/math. Formulas and the like).
There planning is a must, however it is more drawing the Component Design (the Chip Shape, so to speak),
that has to be defined, e.g. number/functionality of Input/Output Pin's, this is the "Writing Pad and Pencil"
Job.
Once the "Design" is done, I can start coding the actual functionality (mostly just the "do it"), because I've
of course thought about it, during the "Design Phase", which then results in very few "Design Changes"
later on, since this is not the most favored Part of the Job (by me, at least).
In the "Coding Phase", the concentration is mostly on coding the fastest Solution possible, because that
stuff is time critical (I might have to re-code a few times, to find the fastest way). This then, is done by
running timing tests within the assembled SW etc. (I'm certain you're getting the idea).
Maybe it's easier to understand in this context, that I'm of the opinion, that good planning is "half the rent".
you see, I've got two hearts in my chest, when it comes to programming:
1) just trying out new stuff, to expand knowledge (e.g. for a long time, I've avoided any graphics stuff).
Sticking with the purely result oriented problem solving logic (Console In-/Output).
2) the professional part of programming, mainly in graphic programming Language, but with self coded
DLL's to expand the Language, if and when needed (special logic/math. Formulas and the like).
There planning is a must, however it is more drawing the Component Design (the Chip Shape, so to speak),
that has to be defined, e.g. number/functionality of Input/Output Pin's, this is the "Writing Pad and Pencil"
Job.
Once the "Design" is done, I can start coding the actual functionality (mostly just the "do it"), because I've
of course thought about it, during the "Design Phase", which then results in very few "Design Changes"
later on, since this is not the most favored Part of the Job (by me, at least).
In the "Coding Phase", the concentration is mostly on coding the fastest Solution possible, because that
stuff is time critical (I might have to re-code a few times, to find the fastest way). This then, is done by
running timing tests within the assembled SW etc. (I'm certain you're getting the idea).
Maybe it's easier to understand in this context, that I'm of the opinion, that good planning is "half the rent".
Re: Thoughts on writing games with FreeBasic
The part of planning that I feel is important is to have a good outline of how you are going to accomplish something. For instance: I have been toying with a voxel-to-pixel 'engine' for some time now and one of the reasons that it is taking so long (besides not having had alot of time in a chunk to program) is because decisions made early on can greatly affect things later on. One of the decisions I have yet to make is how exactly to store the voxel information.. I have two ways (in a list format where each (and only) active voxels are stored with their x,y,z,and color, and a regular old 3D array with colors - like an pixel image format but 3D). Each method lends itself to various pros and cons... speed of rendering, flexibility to be modified, collision tests, etc. And the routines to perform these various things are basically completely different. So I find myself 'planning' ahead as much as possible so I can choose the 'best' way to continue that might avoid alot of wasted coding in the future. BUT, on the other hand, as BasicCoder has pointed out, the paralysis of planning can easily lead to not doing.... luckily, I really enjoy each attempt at making various routines, as well as seeing what other people come up with as to ways to accomplish a certain task... I think I learn alot more for interacting with other programmers, seeing their ideas and code, than I do from web research and 'planning'...
-
- Posts: 2958
- Joined: Jun 02, 2015 16:24
Re: Thoughts on writing games with FreeBasic
UML diagram are just the good old diagrams we all know with squares and arrows to sketch an algorithm. There are useful to communicate in the context of a teamwork, and the great news with OOP is that some IDE can sketch very useful diagrams to represent the objects and their relations. This is of great help for programming when each one has its own dedicated objects to build and when the work has to be gathered to make something working as a whole.BasicCoder2 wrote: Tourist Trap:
"What is seriously missing is an ide supporting oop, doing uml diagrams for instance."
I guess you use the tools you have and know how to use. They will not however give you an imagination.
Here is a dummy example from wikipedia:
-
- Posts: 3917
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: Thoughts on writing games with FreeBasic
My likes are broad enough to take in writing the story. Writing stories was my strong point in English classes at school, I just couldn't spell. My art is limited but I can tackle simple art some of which you can see in the game demo posts in this section of the forum. At primary school I used to draw comic strips but lost interest and never developed my artistic skills beyond that. Being able to draw like any talent requires practice, practice, practice if you want to be any good at it.Imortis wrote:BasicCoder2 wrote:I like writing the engine for the game. Let someone else fill in the story, art, etc.
.
Last edited by BasicCoder2 on Apr 29, 2016 21:17, edited 2 times in total.
-
- Posts: 3917
- Joined: Jan 01, 2009 7:03
- Location: Australia
Re: Thoughts on writing games with FreeBasic
The only time I have used a flow chart was to explain how a program works after I have written it.Tourist Trap wrote:UML diagram are just the good old diagrams we all know with squares and arrows to sketch an algorithm.
I did read about the UML stuff 8 or more years ago when trying to teach myself C++ and then I discovered FreeBASIC.
.