Game Development: Square One

Game development specific discussions.
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Postby notthecheatr » Oct 22, 2007 20:04

Everyone has different coding styles and practices. Even though I see great engines or libraries for various things coded in FB, I still want to write my own - both for the experience, and also because the result will be more comfortable for *me*
Josh
Posts: 79
Joined: Nov 05, 2007 20:14

Postby Josh » Nov 09, 2007 21:02

Everyone has different coding styles and practices. Even though I see great engines or libraries for various things coded in FB, I still want to write my own - both for the experience, and also because the result will be more comfortable for *me*


i agree completley with yah, the way i do things are most likley unorthodox to a vet and new to a beginner.

sounds like this guy would benefit from my source code, while its not complete and maybe not as neat as a polished game would be it will eventually be well documented and its kinda like doing a tile rpg the hard way. simply cause its the only way you've ever gotten it to work :P

i mean im literally getting and puttin every tile, the maps portion of my bas file is huge just for 29 maps, ideally id like to move em to a seperate file and then have FB simply load the file... just dont know how to do it yet.

i find my code very long, i think i hardcode way to much versus what most people would hard code but i dunno... maybe thats just a typical amount of hardcoding.

takes about 15 minutes to make a new map, another 5 minutes to link it and yet another 15-20 to add collision.

even still i think he should see it, he may even tho hes way more advanced in freebasic then me. :P

hit me up @ jaydeemc@hotmail.com if i have your email i will send you the source as is, unfinished and all but you can do your thing with it
elsairon
Posts: 207
Joined: Jul 02, 2005 14:51

Postby elsairon » Nov 10, 2007 5:32

I'm interested to see how you are coding this engine. Adding collision to the individual maps after building them sounds like a unique strategy.
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Postby notthecheatr » Nov 11, 2007 0:41

I hardcode as I create, but then modify things as I go. Eventually, nothing will be hard-coded except the name of the file that contains the names of all the other files (the first map to load, etc.) This may be overkill for a newbie, but I recommend hard-coding as little as possible. In beginners games, which tend to be small (i.e., you aren't really writing an engine, just a game) you may hardcode more, but if you start writing bigger games it's best if you put stuff in a file. And btw, if you don't know file I/O don't try to write a big game!

I try to stick to a general format or structure, using OOP and many modules. I don't think OOP is strictly necessary for n00bs but I highly recommend modularizing your code (that is, putting it in many different files instead of all in one) - it's quite difficult to manage a project of any significant size if it's all in one file.
RockTheSchock
Posts: 228
Joined: Mar 12, 2006 16:25

Postby RockTheSchock » Nov 13, 2007 14:43

I've never Programmed an RPG because there are so many of them. But I've a guideline for you. Perhaps you know this stuff yet

1. Seperate game logic and data from output and design.
2. Make thinks as easy and short as possible AND easy to extend
3. If you have never done something make a plan. If you can't plan write first a prototype with basic parts and then plan.

For many of my Applications, I prototyped over and over again until I found the best logic and datastorage. Then i've done a rewrite from scratch, where I could reuse some of the basic engine functions. Real planning wasn't neccesary for small projects.

I've written a chess game with VB. First i have used some very simple piece moving procedures and made a complete GUI with pieces where i' could pick pieces and see what moves where valid. The data storage(position of pieces) of the engine is competly seperated from that of the GUI. Later i produced with the simple and slow engine, bitboards which I used for my second engine.
With the simple engine i debugged my complicated bitboard engine. After a week I realised that it was too hard for me to write an efficient chess engine. I decided to let the GUI implement a standard interface for chess engines like GnuChess, Comet .... You can now choose to play against an engine or you could let play engines against each other. The simple engine is in use to prevent unallowed moves.

Just an example on separting logic and output/input

Return to “Game Dev”

Who is online

Users browsing this forum: No registered users and 2 guests