PDA

View Full Version : Student Seeking Mentor


Leper
10-03-2005, 04:51 AM
Will pay $100.00 (IN US DOLLARS) a month via paypal or personal check to anyone who will teach me the ways of BlitzMax. Someone that will answer my questions about how the best way to go about things, and will give me lessons and what-not.

PM if interested? Or share your comments...

BinaryMoon
10-03-2005, 04:58 AM
I'd save your money and work it our yourself. Just go to the official blitz website and download everything you can get your hands on. There are a number of tutorials in thr forum that will teach you more than the basics and if you get stuck just post on the forums. Provided you're sensible (none of this 'please write my entire game idea so I can sell it... and not pay you' rubbish :) ) you will get a response on there... and it's free.

Leper
10-03-2005, 05:00 AM
My biggest issue is finding the right way to code things..

Say I was going to move a character to the right by 32 pixels (as its 32x32)

I naturally think of something like


For Movement = 1 to 32
PlayerX:+1
Next Movement


I'd love to share my ideas on HOW to code things with others so they can say "Hey you know you should do it THIS way" etc..

Leper
10-03-2005, 05:12 AM
One thing with Code whichI have major probs understanding is Physics and Vectors. Its just stuff I cant seem to comprehend. If I could comprehend Physics and Vectors I'd make the best games ever.

Another problem I have with Coding is A.I.


So you see.. If I cant code Good vectors and Physics, nor can I code good AI. I cant make a good shooter!!

BinaryMoon
10-03-2005, 05:36 AM
I was under the impression you had done some programming before so just needed to know the fundamentals - the differences between BlitzMax and whatever you used previously.

I must admit I bought Blitz Max recently and have had problems converting from my blitz3d mindset.

FWIW
For Movement = 1 to 32
PlayerX:+1
Next Movement
would be
playerX = playerX + 32
Although I believe blitzMax supports the ++ type operators (blitz3d doesn't), so maybe something like
playerX += 32
This is the sort of thing I need to learn myself. I still think the forum would be the best way to go about learning things. You mention a shooter, and I know there is a shooter tutorial on bb.com

Leper
10-03-2005, 05:44 AM
actually its playerX:+1 (this substitutes playerX=PlayerX+1, per the beginners guide)

Although I do have a general concept of Basic Programming, I do not know how to code things correctly. I also do not how to do certain things.. I feel almost powerless and incapable.

mahlzeit
10-03-2005, 05:50 AM
1) Keep in mind that it takes time to learn this stuff. The neurons in your brain have to make a lot of new connections and that takes time and frustration.

2) Learn by studying what other people have done. Read code, modify code, see what works and what doesn't. There usually is more than one correct way to do things (and plenty of wrong ways :)).

3) On the old Dexterity forums for a while there was this voluntary group of mentors and students. I wonder what happened to that...

Nexic
10-03-2005, 06:59 AM
If someone tells you how to do most things then it will be a hell of a lot harder for you when you have no option but to work out how to do something yourself. I say teach yourself and try to figure out your own answers, in the long run you will be a much better programmer.

Leper
10-03-2005, 07:01 AM
If someone tells you how to do most things then it will be a hell of a lot harder for you when you have no option but to work out how to do something yourself. I say teach yourself and try to figure out your own answers, in the long run you will be a much better programmer.

My biggest problem is I dont know WHAT to learn first, I dotn know the sequence and order I must take to learn quickly and efficiently..

If I just had a lesson plan.. like

1) Make a simple maze game like pacman

2) Add stuff to it like X and Y

3) Make a physics demo

ETC ETC

Adrian Cummings
10-03-2005, 07:43 AM
Mmmmm the force is strong in this one :)

Seriously tho you have just kind of answered your own question heh, I have no idea how much you do or dont know, but perhaps you should start at the begining and write a simple 2d game first before jumping in the deep end and drowning eh?.

Why not learn thing like sprites, collision, scoring, display and writing in C++... Pacman for example would teach you many new things whereas wandering around in the dark trying to write the next hit game may albeit teach you something, will most likely lead to dissapointment for a newbie perhaps.

baegsi
10-03-2005, 07:46 AM
Have you tried a game programming for beginners book? There should be plenty available and would give you a list to work on.

Also, I'd suggest starting with the smallest game you can think of. It's so much more rewarding finishing a small game than failing at a too complex project.

I don't know your background, but before programming games you should learn programming at all. I wouldn't take basic for that, better use a high level OOP language like Java. A much safer environment for beginners, way better learning material available.

If possible, I'd look for partner you can learn with. I learned a lot from others and it's much more motivating. Having a mentor is a good idea, but I think you should find someone you can meet in person. What about working voluntarily somewhere?

Whatever you do, keep in mind that learning programming takes time, in fact, becoming a good software developer is a lifelong learning process.

Good luck :)

Leper
10-03-2005, 07:46 AM
Mmmmm the force is strong in this one :)

Seriously tho you have just kind of answered your own question heh, I have no idea how much you do or dont know, but perhaps you should start at the begining and write a simple 2d game first before jumping in the deep end and drowning eh?.

Why not learn thing like sprites, collision, scoring, display and writing in C++... Pacman for example would teach you many new things whereas wandering around in the dark trying to write the next hit game may albeit teach you something, will most likely lead to dissapointment for a newbie perhaps.


Yes, yes.. that is what I should do.. Just make something simple, so I can learn slowly..

I request and would like for other devs to share how they learned, what did YOU (the developer) do?

Leper
10-03-2005, 08:28 AM
If possible, I'd look for partner you can learn with. I learned a lot from others and it's much more motivating. Having a mentor is a good idea, but I think you should find someone you can meet in person. What about working voluntarily somewhere?


How do I do this? sounds like a great idea!

Leper
10-03-2005, 08:32 AM
Well, I made an asteroids game.. but did it using a tutorial.

But after the tutorial, I made the asteroids blow up into smaller rocks, and I added particle effects to show for explosions, and I added engine trail to the ship. Added music (that I made) etc.

So then I suppose I will make a pacman like game.

yeah.. thats what I'll make next!

Leper
10-03-2005, 09:04 AM
Well, I made an asteroids game.. but did it using a tutorial.

But after the tutorial, I made the asteroids blow up into smaller rocks, and I added particle effects to show for explosions, and I added engine trail to the ship. Added music (that I made) etc.

So then I suppose I will make a pacman like game.

yeah.. thats what I'll make next!

The thing I like alot about BlitzMAX is the OOP. AFter doing that tutorial, i found OOP to be very understandable and exciting.

I guess my biggest problem is seeing just how I should go about doing things.

Like if I make a pacman game.

First I'll have the game loop that controls the monsters and the pacman and the collisions.

What abuot the loop that creates the map itself? How is that done? And when I ask "how is that done?" I dont want to see the code for it. I just want to see the actual logic behind it.

I would guess that it would read an ARRAY that stores the data of the map itself. And it would have to read it by one variable at a time and then draw the map out. But that is only my guess. THe walls would be objects so that the main loop would recognize them as objects and respond accordingly through collisions.

Should I get a notepad out and write all this down? like "ok this is the logic behind the monster behavior, this is how you control the player, and this is what the main loop will do.. this is how it'll read the map, this is what the map should look like" etc?

Indiepath.T
10-03-2005, 09:59 AM
Although I believe blitzMax supports the ++ type operators (blitz3d doesn't), so maybe something like
playerX += 32
Actually it's :
playerx :+32

Nexic
10-03-2005, 10:05 AM
But after the tutorial, I made the asteroids blow up into smaller rocks, and I added particle effects to show for explosions, and I added engine trail to the ship. Added music (that I made) etc.

Well it seems like you are on the right track. Either keep following simply tutorials like this and then adding to them, or do some very simple projects of your own. But small is the key.

When I first started programming (my age was still in single figures) I kept trying to make really big and complicated stuff and failing, and when I failed it put me off. I think I would have learnt much faster if I had found myself on a rewarding path of actually finishing projects.

Leper
10-03-2005, 11:13 AM
Alright I've written a plan to make this pacman game lol.

Gotta exercise my ability to handle "types" (classes in c++) and methods and functions.. and all that jazz

mahlzeit
10-03-2005, 12:32 PM
If pacman picks up a power pill, give him a missile instead, and you'll have your shooter. :)

Leper
10-04-2005, 04:08 AM
The game is called "Matt McFarland's HUNTER" - It will be distributed as Freeware (because it doesnt hold a candle to shareware and wont haha)

So far you are this guy who walks around a 25x19 grid and you shoot the baddies and collect the gems. The object of the game is to kill all the baddies and collect all the gems. Very simple, Well, I like the KISS perspective on life (Keep It Simple STupid) - And, designing this game so far has been a wonderful learning experience.

The fact that I'm making this game from scratch and using what I learned from the asteroids tutorial is great. And as I create this game I'm learning some cool stuff about bmax along the way.

What I know how to do in Bmax so far

Creating Types, functions, and methods. (not all ways are known however)
Applying graphic images to types (sprites) (animation unknown)
Keyboard functions (multiple key functions unknwon)
Loops
Moving sprites by X and Y (free 360 movement unknown)
Finding the direction of a sprite and changing the direction (free rotation unknown)
Shooting bullets (current bullet movement code not comprehended, i dont get cos and sin, i just know it works)
Retrieving Mouse Coordinates (although getting something like a gun or player or anything to turn its direction towards the mouse coordinates is unknown)



Progress SO far:
I've designed most of the map editor. I really enjoy bmax much. I love the OOP with a passion. The fact that you can call and declare functions really reminds me of the nwn (C++) scripting engine. Including types aka "classes"


What I need to figure out today:
1) Turn ints to strings (looked all over blitzwiki couldnt find any info) abnd strings to ints.
That way I can load a map named "level"+int(level)

2) Save a 2D Array into a file and then be able to open it as well.
Both I knew how to do in DarkBASIC but BlitzMax is different. If anyone here knows blitzmax and wants to shed a little light my way please do so. Just send me a PM. I havent bought BlitzMax yet (still have 2 weeks in trial left) so I cant post on their forums :(

3) Collisions - What methods to learn.. so many I suppose

4) Counters - Counting how many types exist, the best way to do so.

5) Animation - Figure out the best way to make things animated.

Indiepath.T
10-04-2005, 05:28 AM
1) Turn ints to strings (looked all over blitzwiki couldnt find any info) abnd strings to ints.
myInt = String.ToInt(myString$)
2) Save a 2D Array into a file and then be able to open it as well.

' Saving a 1 Dimension IntegerArray
Local myFile:TStream = CreateStream(myFile$)
For Local a = 0 to myArray.Length-1
WriteInt(myFile,myArray[a])
Next
CloseStream(myFile)

'Loading it.
Local Count:Int = 0
Local myFile:TStream = CreateStream(myFile$)
While Not EOF(myFile)
myArray[count] = ReadInt(myFile)
count:+1
Wend
CloseStream(myFile)

3) Collisions - What methods to learn.. so many I suppose
Never used them.

4) Counters - Counting how many types exist, the best way to do so.

Count = myTList.Count
5) Animation - Figure out the best way to make things animated.

Use animated images but use the code I posted on the blitzwebsite as it uses single surfaces as oppose to the BMAX system of using a new surface for every animation frame. (you'll need a registered copy to download that).

Leper
10-04-2005, 02:35 PM
the fact that I have about 400 objects on one screen.. Is that why the program is running slow? If it is, I'm going to have to completely reprogram the map editor..

Indiepath.T
10-05-2005, 04:26 AM
Your map program is probably crawling because of the image/surface issue.

Try this, I get a speed increase of about 30% and a VideoMemory Saving of about 40%. It works with OpenGL as well as DirectX.
Type TAnimImage

Field Image :TImage
Field width :Int
Field height :Int
Field u0 :Float[]
Field v0 :Float[]
Field u1 :Float[]
Field v1 :Float[]

Function Load:TAnimImage(url:Object,cell_width,cell_height, start:Int,frames:Int,flags=-1)
Local t:TAnimImage = New TAnimImage
Local tx:Int
Local ty:Int
Local x_Cells:Int
t.u0 = New Float[frames]
t.v0 = New Float[frames]
t.u1 = New Float[frames]
t.v1 = New Float[frames]
t.Image = LoadImage(url,flags)
x_cells = t.Image.Width / cell_width
For Local f = start To frames - 1
tx = f Mod x_cells * cell_width
ty = (f / x_cells * cell_Height)
t.u0[f] = Float(tx) / Float(t.Image.Width)
t.v0[f] = Float(ty) / Float(t.Image.Height)
t.u1[f] = Float(tx + cell_width) / Float(t.Image.Width)
t.v1[f] = Float(ty + cell_Height) / Float(t.Image.Height)
Next
Return t
End Function

Function Free(t:TAnimImage)
t.Image = Null
t = Null
FlushMem()
End Function

Method Draw(x:Float,y:Float,width:Float,height:Float,fram e:Int=0)
Local DXFrame:TDX7ImageFrame = TDX7ImageFrame (image.frame(0))
If DXFrame
DXFrame.setUV(u0[frame],v0[frame],u1[frame],v1[frame])
Else
Local GLFrame:TGLImageFrame = TGLImageFrame(image.frame(0))
GLFrame.u0 = u0[frame]
GLFrame.u1 = u1[frame]
GLFrame.v0 = v0[frame]
GLFrame.v1 = v1[frame]
EndIf
DrawImageRect(Self.Image,x,y,width,height)
End Method
End Type
Example:

Graphics 640,480,0,NOSYNC
Print "Start Memory " + MemAlloced()
Local now:Int = MilliSecs()
Local blob:TAnimImage = TAnimImage.Load("gfx/stoneset0.png",32,64,0,32,FILTEREDIMAGE)
For Local a = 1 To 100
Cls
For Local b = 1 To 10000
blob.Draw(Rand(0,640),Rand(0,480),20,40,Rand(0,31) )
Next
Flip
Next
Print "End Memory " + MemAlloced()
Local time:Int = MilliSecs()-now
Print "Time Taken " + time
WaitKey()

PS. Show me the green!

Gary Preston
10-05-2005, 04:57 AM
Start really simple and make a nice pong game. That will get you using sprites/collisions/sound effects/scoring/input/menu system etc

Next you could try something like tetris, where you can then think about multiple levels (eg faster block spawn time), how you'll detect winning lines, removing those same lines etc Or create a space invaders clone. Basically anything that requires more complex game logic and multiple levels but doesn't really require a custom map maker.

After those you can start getting more complex with games that require a map maker (many many ways to do this, some simple some flexible and complex, its up to you) for example a breakout style game or pacman.

Most people will have created one of more of those game styles whilst learning, so you should be able to find lots of resources on the net to do with them. Whether you'll find blitz code or not, I don't know as I've never used it, but I'm sure someone somewhere has posted their code.

Final peice of advice. Don't get too hung up on finding "the best way" to do something. Any method that works is good enough for now. As you become more experienced you'll start to recognise areas of your code that are perhaps not as good as they could be, you'll also find it easier to see why someone else did something a different way to you. At which time you can start finding out better ways to do things without wasting time struggling to work out the best way when you don't yet know any ways.

Leper
10-05-2005, 05:15 AM
First I want to say thanks to you guys and your kind help. I feel blessed that I have found this bulletin board.


Progress:I found the problem that caused it to crawl. I was "looking for the zebra" as my dad always says. The expression means, I was using over-complex logic to do a very simple task. Once I found the problem, I was able to make the map maker really fast. However, as time passes and you delete / add objects more and more, the CPU load increases steadily and the map maker begins to crawl. I'm not sure what it is but I'll figure it out soon.

I'm almost done with the map maker, all I have to do is add the "open / save" section and I'm done.Then I'll have to make the game (the game only has the player in it right now)


Here's a Proposal worth your consideration:Would anyone who is familiar with BlitzMax and OOP with Types willing to grade my map maker program for say, 25 bucks via paypal? I'll even send you the money before you grade it! As long as you promise to grade it within 12 hours of payment. If I find your "grading" to be very useful, I will pay you to grade my future projects!

I'd really like an expert to atleast grade my "homework!"

:)