Author Topic: Community Project: Game  (Read 4379 times)

0 Members and 3 Guests are viewing this topic.

Offline Glen1992

  • Posts: 467
    • View Profile
Community Project: Game
« Reply #15 on: December 30, 2006, 09:21:21 AM »
I vote Launcher

Offline Spoofy

  • Posts: 3949
    • View Profile
    • http://
Community Project: Game
« Reply #16 on: December 30, 2006, 12:01:39 PM »
I vote Launcher.

Offline JayFoxRox

  • Posts: 2221
    • View Profile
    • Homepage
Community Project: Game
« Reply #17 on: December 30, 2006, 02:27:49 PM »
Ok Launcher By ShadowSniper made the race.
When possible everyone draw some simple concept of what you think about when you read ShadowSnipers idea

I will upload mine tomorrow.

Offline Glen1992

  • Posts: 467
    • View Profile
Community Project: Game
« Reply #18 on: December 30, 2006, 03:16:03 PM »
This is what i have drawn as a simple concept. I have used trampolions here as an example.

« Last Edit: December 30, 2006, 03:17:50 PM by Glen1992 »

Offline JayFoxRox

  • Posts: 2221
    • View Profile
    • Homepage
Community Project: Game
« Reply #19 on: December 31, 2006, 02:16:55 AM »
woah - mine looks tottally different. nice work though glen.

Thats what i thought about:

[a href=\"http://img66.imageshack.us/img66/1964/conceptlq9.jpg\" target=\"_blank\"] - and you have some buildings in a big city. on some houses you have these little landing zones you have to land on, just next to them you will find a launcher (eh tried to draw cannon in the pic - but a ramp would be cooler), when the player spawns you are on the street, starting at a park for example, launching onto the first roof (You can see which one by looking at the compass and/or the arrow waving about the zone (thats what i try to show you today: "Waving cube" (or arrow)). When you are in a sphere above the landing zone the camera will change and show one of a few possible landing scenes (easier for now), after you will see the player going into the next launcher, you can aim (from 1st person!) and then shoot to the next roof. Sometimes you have to jump on some funny objects (we need ideas for these  - but later. to hard for now) where you get bounced again.
Gameplay could be Mario 64 Like, with Spiderman like City Graphics (i like that style), player should be a little guy, no real sizes i think.

Addition: ShadowSniper just told me about more objects you could collide with. So yes, Some Cepelines (?) or CASINO signs on roofs would be cool, it shouldnt be hard to add some Zones and when the player goes through you get some extra money/points/whatever (Jump through the CASINO - O Letter for example)
« Last Edit: December 31, 2006, 02:42:39 AM by Fox »

Offline Glen1992

  • Posts: 467
    • View Profile
Community Project: Game
« Reply #20 on: December 31, 2006, 02:37:32 AM »
Personally i like yours better fox mine was just quick and i could draw in 3d so i just did it inm 2d quickly.

Offline JayFoxRox

  • Posts: 2221
    • View Profile
    • Homepage
Community Project: Game
« Reply #21 on: December 31, 2006, 03:05:22 AM »
I just updated the first post with some things we need, maybe something is missing so keep your eyes opened

Lesson 1: Basics Of Programming

Ok before I start I recommend you to get the tools I will use while making this game.

- DarkBasic Pro (30 Day Trial)
- Zanoza Modeler 1.07 (Freeware)
- Photofiltre (Freeware)

When you have problems getting darkbasic to run or your trial runs out just call me on msn or pm me.
I m sure most of you know allready how a code looks like and how it works. Though i m going to explain it again.


This is a sample code:

Code: [Select]
CommandA Parameter1,Parameter2
ReturnValue = CommandB(Parameter1)
CommandC Parameter1

Ok, its easy.
Our compiler (The applicatoin generating the exe files for us) will just read the code like a book, starting from top going to the bottom.
So first CommandA gets executed with the Parameters 1 & 2
After we will use the Value of Parameter 1 in a "function" to get a Return Value
and after that another Command is executed without return values (or we dont need them so we dont store them in a variable)


Sample of Commands:

Code: [Select]
Blah = ResultAddition 1,8
Blah = SquareRoot(Blah)
Print str$(Blah)

Ok, First the Result of 1 + 8 is saved into the integer variable Blah (Integer is default in DarkBasic),
Then the square root of the value from Blah (8 + 1 = 9  >> Square Root of 9 = 3) is saved.
After that our programm will show us a 3 on the screen.
Now you might ask: Whats the str$ standing for? Well, easy. Our variable is from the type Integer - its a number. But we want to output text
so its must be converted to a text string before (using str$())
These commands doesn't exist in DarkBasic btw.


But here is another sample of the same code with working commands:

Code: [Select]
Blah = 1 + 8
Blah = sqrt(Blah)
Print str$(Blah)

sqrt is the shortform for SquareRoot. This is probably hard to remember but we wont need it often anyways.
Ofcourse you can mix commands into eachother too. Here is an little example:

Code: [Select]
rem Blah = ResultAddition 1,8
Blah = SquareRoot( ResultAddition(1,8) )
Print str$(Blah)


Ok, this is probably a bit harder. The first line has an "rem" infront of it, "rem" stands for Remark. So this line will be ignored by the compiler
you can put comments there for example. The second line is a bit tricky.
First your application will get the returnvalue from the function/command ResultAddition 1,8 . The parameters are in brackets so the compiler knows that these
parameters are members of the function ResultAddition.
So our "ResultAddition(1,8)" returns 9. This will be instantly used in SquareRoot. The result of our Square Root is 3 once more and will be saved in the variable Blah.
Then the pc outputs the content of the variable Blah > 3
So basicly our programm will do the following

Code: [Select]
Blah = SquareRoot( ResultAddition(1,8) )
will become

Code: [Select]
Blah = SquareRoot( 9 )
which becomes

Code: [Select]
Blah = 3
and after that the result is given out. First we have had 3 Lines of code. But know you know: we could have done in 1 Line!
Here it comes:

Code: [Select]
print str$(SquareRoot( ResultAddition(1,8) ))

Ok, these are the basics. Now about String manipulation and conditions

First we will have a variable, i will call it OurText for now:
The $ at the end will mean string value!

Code: [Select]
OurText$ = "GTAStunting.com Sucks"
the quotion marks will identify a string value.
ok now we let our programm check the code:

Code: [Select]
if OurText$ = "GTAStunting.com Sucks" then OurText$ = OurText$ + " not!"
print OurText$

Pretty easy eh? First it checks if OurText stores the text: "GTAStunting.com Sucks" (CASE SENSITIVE!) and if so it adds a simple " not!" at the end
Our new text will be "GTAStunting.com Sucks not!".

But now imagine: You detected a collision between your player object and a wall for example. Now you want to rotate your player AND reposition your player.
But the "if [condition] then" only takes one command in the end. The solution is simple:

Code: [Select]
if [condition]
remstart
Tons of comments here
remend
[Tons of commands here]
else
rem This happens when the condition is not true!
[Tons of commands here]
endif

So first it will check the condition and if it is true then it will execute the code until "endif". Please remember that there is no "then" !
("remstart" starts a remark block and "remend" ends it)

One last thing about conditions:
There are other operators than =
a < b means a is smaller than b
a > b means a is greater than b
a <= b means a is smaller or equals b
a => b means a is greater or equals b
a <> b means a does not equal b




I think now you know about 75% of all stuff needed for a game. Only thing missing are datatypes, arrays.

What you know right now about datatypes is basicly nothing.
You should know there is the integer type and the string type.
Here are all we need:

integer
float
string

there are others which we wont use due heavy bugs in DarkBasic when doing comparsions with the variables of that type.

integer could be a value like this: 4646 or 1337
float could be a value like this: 4646.46 or 1337.0
and
string could be a value like this: "4646.46" or "1337.0" or "Hello World!"

the problem is: you cant compare them against each other

1337.0 <> "1337.0"

Though, i saw newer darkbasic compilers which fix this. Mine doesnt at all!
so we have a little problem here:

Code: [Select]
rem PlayerPosition on Height Axis (Y)
PlayerPositionY as float
PlayerPositionY = 0.45
rem Check if player is above water level which is at 0.0
if PlayerPositionY > 0 then print "Heya! Player is above water level"

this should give us NO text output  (Integer Versus Float)
IT will try to convert our float to an integer which is 0 => And 0 > 0 is false!
So when programming always look out for this kind of comparsions.

There is no real solution for this. What i do is either multiplying the float value by 10000* or something to get an integer (results in overflow/underflow sometimes) or i define an zero variable as float on top
btw: Instead of declaring it as float you can just add an # at the end of the variable (but it wont work either )

tricky eh?



Ok now for arrays

When having a game you have no ways arround arrays i think. Here is an example:

Code: [Select]
ObjectA = 1
ObjectB = 2
ObjectC = 4
ObjectD = 8
print ObjectA
print ObjectB
print ObjectC
print ObjectD

now almost the same code using arrays:

Code: [Select]
dim Object(3)
Object(0) = 1
Object(1) = 2
Object(2) = 4
Object(3) = 8
for i = 0 to array count(Object(0))
print Object(i)
next i

Explaination: first we will fill Slot 0,1,2 and 3 of the arry Object (Which as 4 Slots: 0 to 3. In array count use Object Slot 0 always) with values.
After that we setup an for to loop.
a for to loop is simple. first you set a start value (0 in this case) and a variable which should be changed and finally the value you want to reach.
at the end of the loop you place an next [variablename]
so this code will execute:

Code: [Select]
rem [Setting variables]
rem First Run (i = 0)
print Object(0)
rem Second Run (i = 1)
print Object(1)
rem Third Run (i = 2)
print Object(2)
rem Last Run with 4 (i = 3)
print Object(3)

Thats it!


The last thing you have to know about are the custom datatypes.
Sample:

Code: [Select]
rem Create Position Variables for 6 soldiers - X,Y,Z for each
dim SoldierPositionX(5) as float
dim SoldierPositionY(5) as float
dim SoldierPositionZ(5) as float
rem Setup first Soldier (Slot 0)
SoldierPositionX(0) =  0.0
SoldierPositionY(0) =  5.0
SoldierPositionZ(0) = 10.0
rem [...]

Ok now imagine you have other things like Health, Rotation (XYZ), Spin (XYZ), Velocity (XYZ), Position (XYZ), Animation ID, ...
for this we have some handy thing called Usertypes:


Code: [Select]
type matrix
   x as float
   y as float
   z as float
endtype
type PlayerClass
   position as matrix
   rotation as matrix
   health as float
endtype
dim Soldier(5) as PlayerClass
Soldier(0).health=100.0
Soldier(0).position.x =  0.0
Soldier(0).position.y =  5.0
Soldier(0).position.z = 10.0
Soldier(0).rotation.x =  0.0
Soldier(0).rotation.y =  0.0
Soldier(0).rotation.z =  0.0


Thats it! simply define your own datatype with given variables in it.

Owner.Member = Value

Thats all for now. When you have any question just call me on msn or pm me
(Or even bettere ask in the thread)

PS: One last thing! I can say for sure that none of these sample is working. The reason for this is simple: There are no more commands so the execution of our programm stops. To avoid this just add a "Sleep 5000" at the very end of your code to make your programm stop for 5 seconds (5000 milliseconds).
For Compiling your code use either F5 or "Compile > Make EXE/RUN" from the menu






[SPACE FOR LESSON 2: Sin and Cos]
« Last Edit: December 31, 2006, 05:09:11 AM by Fox »

Offline VaNilla

  • next week m9
  • Veteran Member
  • Posts: 3809
    • View Profile
    • YouTube
Community Project: Game
« Reply #22 on: December 31, 2006, 03:07:54 AM »
I agree with your addition Fox . Well I didnt want to confuse anyone, so here is a simple, not very detailed concept first level.

The numbers are the order you should go in, what could happen etc, hopefully you can fully understand basiclally with this drawing.

Offline JayFoxRox

  • Posts: 2221
    • View Profile
    • Homepage
Community Project: Game
« Reply #23 on: December 31, 2006, 06:46:24 PM »
ok i made a little menu screen. i hope ya like it

[a href=\"http://img220.imageshack.us/img220/2826/menugt2.png\" target=\"_blank\"] - is for our player. We will make some special animations which are played in there.


btw: Please give feedback on lesson 1 please so i can improve it.
« Last Edit: December 31, 2006, 06:46:59 PM by Fox »

Offline KillaMarci

  • <3
  • Veteran Member
  • Posts: 8700
  • Don't you remember the monsters?
    • View Profile
Community Project: Game
« Reply #24 on: December 31, 2006, 06:50:54 PM »
Nice one Fox

Offline Maxwell

  • Veteran Member
  • Posts: 1493
    • View Profile
    • http://www.maxdoiron.com
Community Project: Game
« Reply #25 on: December 31, 2006, 07:18:57 PM »
I AM SOOO IN!

i don't have time to read everything right now but i am an experienced mapper and i can understand the programing i just don't know much of it. but i am a mapper!!!!

Offline rekees

  • Posts: 1463
    • View Profile
    • http://www.airisus.com
Community Project: Game
« Reply #26 on: December 31, 2006, 10:11:57 PM »
ill do the menu graphics

Offline stuntman

  • Veteran Member
  • Posts: 2138
    • View Profile
    • http://http:www.myspace.com/djobscureuk
Community Project: Game
« Reply #27 on: December 31, 2006, 10:40:43 PM »
nice mate, good luck with it, id join in, but im busy with impure  

Offline JayFoxRox

  • Posts: 2221
    • View Profile
    • Homepage
Community Project: Game
« Reply #28 on: January 08, 2007, 10:15:10 AM »
Sorry for delaying this that much. You can expect that i m going to make another tutorial/lesson on irc or msn soon. This will be pasted over here after. We should be atleast 5 ppl (including me). Otherwise it would be useless to spend hours on irc/msn
« Last Edit: January 08, 2007, 10:15:34 AM by Fox »

Offline VaNilla

  • next week m9
  • Veteran Member
  • Posts: 3809
    • View Profile
    • YouTube
Community Project: Game
« Reply #29 on: January 08, 2007, 10:40:59 AM »
All sounding very well Fox .

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal