Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (517)
Games in Android Showcase (123)
games submitted by our members
Games in WIP (577)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Thought process of making a game. Am I doing this right?  (Read 760 times)
0 Members and 1 Guest are viewing this topic.
Offline R3m3mb3rM3

Junior Newbie





« Posted 2012-12-03 21:04:05 »

Hello everybody! First post Wink

So I just started to study computer science which got me into programming. I´ve always had a thought in the back of my head to programm a small game on my own. Im not THAT unexperienced in game making, but I have always used various editors, for example the warcraft 3 map editor or GameMaker etc... Starting from scratch is completely new to me and I hoped for some advice about my thought process.

My game idea: Its a survival game. You are a wizard in a small labyrinth (not really, but it has walls) and enemies are coming to get you. You have 4 spells, but start with only one, the others are gonna be placed on the map in form of items. The first, and key spell is creating a wall. However you can only have 1 wall up at a time. The idea is surviving by placing the wall in strategic positions to survive longer and pick up more and more spells with which you can kill the enemies.

What I think I need:
1. A map, basically tiles with x,y coordinates. A tile can be ground or a wall, so basically 2 states. ( basically my biggest problem)
2. The player, has hp and mana, is represented by a wizard which also centers the camera. Spells are casted by clicking while the spell symbol is tapped.
  2.1 The wizard can only be positioned on ground tiles.
  2.2 Spellclass need to be picked up, and have mana cost. They also need a getmousclickpos method to know where they affect.
3. Enemies who have hp and attacks and pathfinding and spawntimings + positions.

My doubts:
I feel like not knowing where to start. I mean if there wasn't for the graphic representation im planning on, I could propably program this effortless. But just the creation of the map/board brings my brain to desperation.

My hopes:
Even though it seems so difficult, Ive seen tons of cool minigames on this site which always sets me in a great mood. And the more I look into others code I feel I can master the art of programming. I hope you can tell me what Im missing in my thought process, and what simple hints could make my life a lot easier. Finally heres some concept art in case you didn't understand yet what I am planning.







Offline RobinB

JGO Ninja


Medals: 44
Projects: 1
Exp: 3 years


Spacegame in progress


« Reply #1 - Posted 2012-12-03 21:43:25 »

Nice project as first game, it has some obstacles, but it will teach you a lot.
The problem is, you cant dive in programming somewhere at te middle Sad.
So we would need to know where you are with your knowledge, how much experience do you have with any programming languane, and how much with java?
For an start this info would be nice.

Are you starting with java, then you should try some tutorials and get familiar with oop first i guess.
Offline R3m3mb3rM3

Junior Newbie





« Reply #2 - Posted 2012-12-03 21:50:55 »

Mhh yeah I get what you are saying. Its tough for me to say since I kind of know what to do, I just don't know how to type it. Basically the syntax is my problem and I guess it just takes time to learn that. What Im hoping for is just some feedback on the thought process. Did I forget something/where could the problems occur.
I guess what Im gonna do is search for top down 2d games and look for the parts which are similar.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline RobinB

JGO Ninja


Medals: 44
Projects: 1
Exp: 3 years


Spacegame in progress


« Reply #3 - Posted 2012-12-03 22:11:40 »

Mhh yeah I get what you are saying. Its tough for me to say since I kind of know what to do, I just don't know how to type it. Basically the syntax is my problem and I guess it just takes time to learn that. What Im hoping for is just some feedback on the thought process. Did I forget something/where could the problems occur.
I guess what Im gonna do is search for top down 2d games and look for the parts which are similar.


Well your saying you want to build an house, you know the color, and how many rooms you would like to have, and ask did i forget something?
Yeah you forgot a lot, programming is not just about syntax, i wish it was that easy, code of diffrent solutions cant just work together.
You cant just take any window from some house and put it into your house, you would need to know if it fits, and where to put it excactly and how it works, maybe you expect an full glass window to open at some spot or something, it would never work and you would be better of building your own window.
The problem with programming is, there is no main solution, each problem you are going to have would have multiple solutions (also depending on choices you made for other problems).


To give an example:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
    private void Init(){
        vbo = new VBO_Terrain((2*SIZE + 1)*SIZE, parent.getShader().getAttribLoc("terrain"));
       
        depth = new float[SIZE+4][SIZE+4];
        SimplexNoiseGenerator gen = new SimplexNoiseGenerator(parent.getSeed());
       
        for(int x = 0; x <= SIZE+1; x++){
            for(int z = 0; z <= SIZE+1; z++){
                depth[x][z] = (gen.noise((this.x+x-1)/100f, (this.z+z-1)/100f, 0, 5, 3, 0.2f) * 20);
            }
        }
         
        water = new WaterChunk(x, z, depth);
       
        int x = 0;
        for(int zpos = 0; zpos < SIZE-1; zpos++){
            for(int xpos = 0; xpos < SIZE; xpos++){
                x = zpos % 2 == 0 ? xpos : SIZE - (xpos+1);
               
                addvertex(x, zpos);
                addvertex(x, zpos+1);
            }
        }
    }


This basicly creates some random 3d terrain and sends it to an VBO.
Its an solution for my try to create 3d terrain.
best solution?
no, far from it.
Could anyone else use it?
Nope, it would take hours before anyone understands the mess i made.
But for me it works to test some rendering, when im going to expand anything, i can throw this code away.


I really recomment taking some introduction tutorials, just so you wont get overwhelmed by any code.
Then you should find some open source game / engine you can mess around with to see what you could do.
Offline chrisethompson

Senior Newbie


Medals: 1
Exp: 5 years



« Reply #4 - Posted 2012-12-05 16:34:05 »

Start with something simple, but which progresses you towards the finished game.  I would start with the game board.  See if you can render the board on the screen.

Don't start with an image of the board, you need to store the positions of the walls in a data structure and then render each wall in the right location.  You will need that if the walls can be removed and added by spells. You also need to know where the walls are so that later, the player and monsters are prevented from passing through walls. 

It looks like a 2D tile game, which is a great place to start, so use a 2D array.  Something like

byte[][] maze = new byte[32][32]

would create an empty array.

Write a game loop that does nothing other than draw the screen.  The screen can be a single quad for the "grass" in the background and then small quads where ever you have data in your array.  I suggest using a byte in the data structure, rather than a Boolean, because you could have different wall types in the future.

You will need to fill the array with data of course.  For a test like this you might just put it into the code by hand.  Maybe start with an 8x8 grid.

Once you have a maze, add a Character.  It can be a simple sprite that hops from tile to tile as you press the keys.  Then you can make it move smoothly with more changes to the code. Stop is hitting walls.  Add other entities and so on.

You will not end up with an award winning game this way and the code will be far from optimal.  But you will learn a lot.  And your next game will be better.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (34 views)
2014-10-27 03:28:38

TehJavaDev (27 views)
2014-10-27 03:27:51

DarkCart (41 views)
2014-10-26 19:37:11

Luminem (22 views)
2014-10-26 10:17:50

Luminem (27 views)
2014-10-26 10:14:04

theagentd (33 views)
2014-10-25 15:46:29

Longarmx (61 views)
2014-10-17 03:59:02

Norakomi (59 views)
2014-10-16 15:22:06

Norakomi (48 views)
2014-10-16 15:20:20

lcass (43 views)
2014-10-15 16:18:58
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!