Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: about game development....  (Read 2522 times)

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: about game development....
« Reply #15 on: March 17, 2014, 01:00:48 pm »

Even if you don't know C++, you should be able to figure out the concepts in GCC: they only make use of classes and little else. A lot of it is actually about how you shouldn't be using OOP and subclassing :) I honestly skipped a lot of the code and just focused on the ideas and concepts they were describing.

And honestly, don't bite off more than you can chew. I think we all tend to do that, and then end up with a stack of unfinished "games". Why not go for Unity, which has all the 3d you'll ever need, and make a game instead of making an engine?

freeformschooler

  • Bay Watcher
    • View Profile
Re: about game development....
« Reply #16 on: March 17, 2014, 01:27:27 pm »

that is the main issue i find when looking for tutorials and documentation, entry lvl documentations gives you a source code instead of teaching you how to do it, that book you suggested uses C++ so its out of the equation for me, i want to learn to make a 3D java program from scratch, but all the stuff i find is tutorials about hello world, and about librariers, but i dont find a single effing tutorial or book in how to implement those librariers and how to start the loop and that stuff......

From scratch? Look up lwjgl and read the GL Red Book. That should be enough to get you started on simple 3d stuff "from scratch." The GL red book has source code but explains EVERYTHING.
Logged

Moghjubar

  • Bay Watcher
  • Science gets you to space.
    • View Profile
Re: about game development....
« Reply #17 on: March 17, 2014, 10:00:21 pm »

tutorial or book in how to implement those librariers and how to start the loop and that stuff......

The loop itself is a simple thing composed of complex steps: from http://en.wikipedia.org/wiki/Game_programming#Game_structure
while( user doesn't exit )
  check for user input
  run AI
  move enemies
  resolve collisions
  draw graphics
  play sounds
end while

Look for individual resolutions for all these things, then put them all together.  If you are doing Java, I'm sure someone can point you to individual things for everything (or a library and specific instructions for each part).  Figure out solutions for each part, get a basic something working, then refine it. Quick, ugly example:

Code: [Select]
int playerxpos = 10;
int playerypos = 10;
int enemyxpos = 15;
int enemyypos = 15;

struct inputmanager {...} maininput;   //holds the keyboard/mouse status from inputs
void refreshinput(inputmanager input); //clears and grabs new input from events
bool handleinput(inputmanager input)  //remember, I said it was ugly
{
    if (input.RIGHTARROW)
        {playerxpos++; return true;}
    if (input.LEFTARROW)
        {playerxpos--; return true;}
    if (input.DOWNARROW)
        {playerypos--; return true;}
    if (input.UPARROW)
        {playerypos++; return true;}
    return false; //no input

}
bool checkcollision(int obj1x, int obj1y, int obj2x, int obj2y); //assume its done here: if x == x and y == y, simple
void moveenemy(); //AI for enemy, assume it does this: moves x - 1 at a time till it reaches 0, then turns around and goes x++ till it reaches 20
void drawpixel(int locx, int locy, unsigned int color); //color corresponds to a premade type, however you handle it with your library
void playsound(unsigned int soundtype);
void delay(unsigned int delaytime);

enum GAMESTATE {GAME_RUNNING, GAME_OVER};
enum COLORTYPES {COLOR_RED, COLOR_BLUE};
enum SOUNDTYPES {SOUND_MOVE, SOUND_DIE};
unsigned int gamestate = GAME_RUNNING;

//loop:
bool playermoved = false;
while (gamestate == GAME_RUNNING)
{
    refreshinput(maininput); //resets input and grabs fresh input events
    playermoved = handleinput(maininput); //moves player
    if (playermoved)
           moveenemy(); //moves the enemy only when player moves
    if (checkcollision(playerxpos, playerypos, enemyxpos, enemyypos)) //handle collisions
           gamestate = GAME_OVER;   // touch it and you lose
    drawpixel(playerxpos, playerypos, COLOR_BLUE);
    drawpixel(enemyxpos, enemyypos, COLOR_RED);
    if (playermoved)
         playsound(SOUND_MOVE);
    if (gamestate == GAME_OVER)
         playsound(SOUND_DIE);
    delay(1000);  // delay 1000 milliseconds
}
///game over, do outro code, kill everything used, etc

Using just something like this and console printing and clearing you could make something, like:
Code: [Select]
printgamescreen()
{
clearscreen(); //clear your console however you do it
for (int i = 0; i < 20; i++)
{
for (int j = 0; j < 20; j++)
{
if (i == playerposx && j == playerposy)
    printout('@');
else if (i == enemyposx && j == enemposy)
    printout('E');
else
    printout(' ');
}
printout('\n'); //newline character, end the block
}
}
and get this:
______________________
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
         @         
                   
                   
                   
                   
              E     
                   
                   
                   
                   
                   
___________________

Anyway, there are good resources out there whatever you try, just remember its all a bunch of individual steps.
Logged
Steam ID
Making things in Unity
Current Project: Demon Legend
Made This too (publisher abandoned ) Farworld Pioneers
Mastodon

xaritscin

  • Bay Watcher
    • View Profile
Re: about game development....
« Reply #18 on: March 17, 2014, 10:25:06 pm »

i found a channel in youtube with a step by step tutorial hand from the first 4 episodes i have made an small app which shows a random colored set of pixels on screen, this looks promising....
Logged

Knight of Fools

  • Bay Watcher
  • From Start to Beginning
    • View Profile
    • Knight of Fools
Re: about game development....
« Reply #19 on: March 18, 2014, 01:05:43 am »

Link for the curious?
Logged
Proud Member of the Zombie Horse Executioner Squad. "This Horse ain't quite dead yet."

I don't have a British accent, but I still did a YouTube.

Svampapa

  • Bay Watcher
    • View Profile
Re: about game development....
« Reply #21 on: March 18, 2014, 05:21:21 pm »

Yep, Cherno is pretty good. Bright guy, easy to listen to and keeps it relatively short.

Word of warning though, his code is pretty much only magic numbers. Following along won't teach you best practice and when you go back to something he showed a few months later you'll be all  :o ??? ::)

I'd still say its worth going through his videos though.

Id also recommend The Bennybox, and maybe Dustin Riley as a primer on LibGDX. Which I still recommend. It's really, really easy to work with compared to having to do everything from the ground up.
Logged

kytuzian

  • Bay Watcher
    • View Profile
    • Kytuzian - Youtube
Re: about game development....
« Reply #22 on: March 18, 2014, 06:39:36 pm »

Doing literally everything from the ground-up is something you probably just won't do. Not that I want to crush your dreams or anything but it would be very difficult. There is a lot of math involved in getting 3d to function properly, even more in getting it to be optimized, and achieving a production level would be nearly impossible. That said, using other 3d engines is definitely possible but as your first game perhaps you should try 2d/text-based and then move onto 3d later.

Knight of Fools

  • Bay Watcher
  • From Start to Beginning
    • View Profile
    • Knight of Fools
Re: about game development....
« Reply #23 on: March 18, 2014, 08:49:26 pm »

In the least, it'd be educational.

 But yeah, in a world of free engines all over the Internets, there's almost no reason not to get one that works for you.
Logged
Proud Member of the Zombie Horse Executioner Squad. "This Horse ain't quite dead yet."

I don't have a British accent, but I still did a YouTube.

HopFlash

  • Bay Watcher
    • View Profile
Re: about game development....
« Reply #24 on: March 19, 2014, 04:41:56 am »

If you want to go 3D perhaps you can look into Blender3D (http://www.blender.org/) and it's tutorials. It's not direct game programming but it's one part of it if you need 3D items and a touch with a physic engine I think.

I for myself hadn't time for now to try it but all I had heard about it it's worth a look.
Logged
GENERATION 11: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Inactive Therian Saga Char: Stormhead
Dominions: 4.03 Berytos; 4.06 Pangaea; 4.08 Arcoscephale; 4.11 Shinuyama
Inactive Wurm Online Char: Stormhead

xaritscin

  • Bay Watcher
    • View Profile
Re: about game development....
« Reply #25 on: March 19, 2014, 03:58:55 pm »

If you want to go 3D perhaps you can look into Blender3D (http://www.blender.org/) and it's tutorials. It's not direct game programming but it's one part of it if you need 3D items and a touch with a physic engine I think.

I for myself hadn't time for now to try it but all I had heard about it it's worth a look.

i'll get to blender soon, will use it for modelling mostly, but the scope of the game i want to make requires me to make the engine from cero or i see it that way, it has too many stuff that needs to be defined, specially in terms of procedurals, i not i would be practicing in JMonkey or something.....for now i want to make some prototypes with Netbeans and see what i can get to do, then i'll later decide if keep improving those prototypes or make the game in an already built engine.....but im more interested in the former.....

Logged
Pages: 1 [2]