My Summer Game Programming Project - Due: 9.22.09

  • (14 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • Last »

200 Replies - 17570 Views - Last Post: 29 July 2009 - 11:57 AM

#16 chuckb  Icon User is offline

  • D.I.C Head

Reputation: 13
  • View blog
  • Posts: 211
  • Joined: 29-May 09

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 06 June 2009 - 10:11 AM

Hi Dan,

Voice acting? That'll take a bit of effort since the Battle of Kursk would require German and Russian voices. :D I've had a semester of Russian and four semesters of German so I could probably make a few voices. Of course there is the internet with lots of volunteers.

If you get a second, try downloading the "Golden Spike" game from my site. You can unzip and navigate down into the assets\sound folder. Listen to foreman.mp3. That's the voice of myself with a couple of sound bites from a neighbor kid. He says "Beans! Beans! Beans!" :D My son, his friend, and I created our own ambient track. That's ambient1.mp3 in the same foler. We spent a few hours on that and had a lot of fun. We combined the tracks with Audacity.

I used WASD and arrows last time to move the tank and the turret. The 'biggest' complaint was the lack of mouse utilization. So, I agree about using the mouse for a turret. Since the user may be working some UI we could experiment with allowing the player to click on the ground and having the tank 'automatically' move the turret. Firing can be automatic or a 'targetting circle' could change color along with a sound cue. We can think about that.

I'm thinking that in level 1 the player meets poorly operated and maintained tanks...so 1 will take it out. Then subsequent levels the tanks may be faster, have more armor, etc. This can be tied to a 'health' rating.

In terms of difficulty, here is what I'm confident I can do with another tank game (2D top down with a slight shadow....no isometrics).
* Move tanks, turrets, fire rounds, hit targets, manage all sprites and sounds.
* Adding a machine gun to the tank.
* Build an in game editor. (see "Cindy and the Cookie Stealin' Ogre" on my site). Prior to this my editors were external apps.
* Use data files to make it easy to experiment with sounds, sprites, and game levels.

I thought of having NPC squad members moving around...doing there own thing. They wouldn't be controlled by the tank commander. Rather they would naturally take position near the rear of the tank for cover...and of course they could be shot...hence the need for the machine gun. The AI would be simple but could make game play more realistic.

I'm currently using 1024x1024 sprite sheets saved as PNG with transparency. I use a CSV dat file to manage the artwork. Here's the file from my last game. I define textures and sprites. The game loads the information at startup. During the game I reference sprite ID's. I can use them like this...

gi = con.GetSprite(38);
gi.alpha = 188;
gi.angle = .78;
con.RenderSprite(gi, x, y, R, G, B)



Here's a sample assets.dat file. The artist creates this file.

texture, texture ID, filename, description
sprite, sprite ID, texture ID, left, top, width, height, scale, angle, alpha, total frames, frame count, time interval, description

This sprite definition handles animation, zoom, transparency, etc. Interestingly, the sprite IDs can be used in the level file very easily.

texture, 0, landscape.png, landscape textures
texture, 1, water1.png, water 1
texture, 2, parchment.png, parchment map
texture, 3, news2.png, notice
texture, 4, clouds.png, clouds
texture, 5, hills.png, hills
texture, 7, profiles.png, profiles
texture, 8, interfacenew.png, GUI
texture, 9, tracks.png, tracks - straight pieces
texture, 11, tracks2.png, tracks - curves
texture, 12, water2.png, water 2
texture, 14, menu.png, menu choices
texture, 15, menu2.png, background
texture, 16, help1.png, help1
texture, 17, help3.png, help3
texture, 18, help4.png, help4
texture, 19, help5.png, help5


//terrain
//sprite, 0, 1, 0, 0, 1024, 1024, 1, 0, 255, 1, 1, 0, green field 1024x1024
sprite, 1, 0, 0, 0, 256, 256, 1, 0, 255, 1, 1, 0, dirt256x256
sprite, 2, 0, 256, 0, 256, 256, 1, 0, 255, 1, 1, 0, grass256x256

//clouds
sprite, 3, 4, 7, 7, 210, 259, 1, 0, 255, 1, 1,  0, cloud
sprite, 4, 4, 281, 3, 289, 337, 1, 0, 255, 1, 1,  0, cloud
sprite, 5, 4, 617, 35, 329, 241, 1, 0, 255, 1, 1,  0, cloud
sprite, 6, 4, 13, 368, 450, 349, 1, 0, 255, 1, 1,  0, cloud


//hills, trees
sprite, 30, 5, 0, 0, 496, 496, 1, 0, 255, 1, 1, 0, hill
sprite, 31, 5, 499, 0, 496, 496, 1, 0, 255, 1, 1, 0, hill
sprite, 32, 5, 0, 499, 496, 496, 1, 0, 255, 1, 1, 0, hill
sprite, 33, 5, 499, 499, 496, 496, 1, 0, 255, 1, 1, 0, hill

//misc
//sprite, 10, 3, 0, 0, 1024, 768, 1, 0, 255, 1, 1, 0, effects
//sprite, 11, 10, 341, 81, 376, 376, 1, 0, 255, 1, 1, 0, effects sm circle

//game play gui

sprite, 36, 8, 7, 670, 498, 92, 1, 0, 255, 1, 1, 0, 6 profile icons
sprite, 37, 8, 470, 550, 100, 50, 1, 0, 255, 1, 1, 0, map off
sprite, 38, 8, 470, 603, 100, 50, 1, 0, 255, 1, 1, 0, map on
sprite, 39, 8, 5, 185, 457, 258, 1, 0, 255, 1, 1, 0, large map
sprite, 40, 8, 6, 130, 665, 52, 1, 0, 255, 1, 1, 0, gray texture
sprite, 7, 8, 468, 328, 63, 72, 1, 0, 255, 1, 1, 0, save icon
sprite, 8, 8, 537, 328, 63, 71, 1, 0, 255, 1, 1, 0, undo icon 
sprite, 9, 8, 674, 362, 7, 7, 1, 0, 255, 1, 1, 0, map red dot
sprite, 12, 8, 682, 362, 7, 7, 1, 0, 255, 1, 1, 0, map green dot
sprite, 13, 8, 469, 420, 297, 111, 1, 0, 255, 1, 1, 0, paused


sprite, 42, 8, 235, 98, 84, 59, 1, 0, 255, 1, 1, 0, small map
sprite, 43, 8, 466, 186, 190, 136, 1, 0, 255, 1, 1, 0, calendar
sprite, 44, 8, 9, 447, 113, 156, 1, 0, 255, 1, 1, 0, watch
sprite, 45, 8, 131, 452, 62, 62, 1, 0, 255, 1, 1, 0, watch dial
sprite, 46, 8, 666, 362, 7, 7, 1, 0, 255, 1, 1, 0, map dot blue
sprite, 47, 8, 144, 520, 35, 63, 1, 0, 255, 1, 1, 0, lantern off
sprite, 48, 8, 179, 520, 35, 63, 1, 0, 255, 1, 1, 0, lantern on
sprite, 49, 8, 613, 329, 21, 16, 1, 0, 255, 1, 1, 0, calendar mark

//profiles and tracks
sprite, 17, 7, 6, 7, 249, 249, 1, 0, 255, 1, 1, 0, top left curve
sprite, 18, 7, 262, 7, 249, 249, 1, 0, 255, 1, 1, 0, top right curve
sprite, 19, 7, 6, 264, 249, 249, 1, 0, 255, 1, 1, 0, bottom left curve
sprite, 20, 7, 262, 264, 249, 249, 1, 0, 255, 1, 1, 0, bottom right curve
sprite, 21, 7, 518, 7, 63, 63, 1, 0, 255, 1, 1, 0, small grid profile hor
sprite, 22, 7, 516, 130, 63, 63, 1, 0, 255, 1, 1, 0, small grid profile vert
sprite, 23, 7, 589, 7, 263, 263, 1, 0, 255, 1, 1, 0, blue large highlight
sprite, 24, 7, 860, 7, 76, 76, 1, 0, 255, 1, 1, 0, blue small highlight

//horizontal pieces of track
sprite, 50, 9, 0, 0, 63, 63, 1, 0, 255, 1, 1, 0, hor ballast
sprite, 51, 9, 63, 0, 63, 63, 1, 0, 255, 1, 1, 0, hor ballast + ties
sprite, 52, 9, 127, 0, 63, 63, 1, 0, 255, 1, 1, 0, hor ballast + ties + rails

//vertical pieces of track
sprite, 53, 9, 190, 0, 63, 63, 1, 0, 255, 1, 1, 0, vert ballast
sprite, 54, 9, 253, 0, 63, 63, 1, 0, 255, 1, 1, 0, vert ballast + ties
sprite, 55, 9, 316, 1, 63, 63, 1, 0, 255, 1, 1, 0, vert ballast + ties + rails

//curve top-right of quadrant I of circle
sprite, 56, 11, 2, 0,  246, 246, 1, 0, 255, 1, 1, 0, ballast
sprite, 57, 11, 250, 0, 246, 246, 1, 0, 255, 1, 1, 0, ballast + ties
sprite, 58, 11, 496, 0, 246, 246, 1, 0, 255, 1, 1, 0, ballast + ties + rails

//curve bottom-right of quadrant IV of circle
sprite, 59, 11, 4, 250, 246, 246, 1, 0, 255, 1, 1, 0, ballast
sprite, 60, 11, 254, 252, 246, 246, 1, 0, 255, 1, 1, 0, ballast + ties
sprite, 61, 11, 500, 253, 246, 246, 1, 0, 255, 1, 1, 0, ballast + ties

//curve top-left of quadrant II of circle
sprite, 62, 11, 0, 500, 246, 246, 1, 0, 255, 1, 1, 0, ballast 
sprite, 63, 11, 250, 499, 246, 246, 1, 0, 255, 1, 1, 0, ballast + ties
sprite, 64, 11, 495, 496, 246, 246, 1, 0, 255, 1, 1, 0, ballast + ties + rails

//curve bottom-left of quadrant III of circle
sprite, 65, 11, 0, 753, 246, 246, 1, 0, 255, 1, 1, 0, ballast
sprite, 66, 11, 248, 756, 246, 246, 1, 0, 255, 1, 1, 0, ballast + ties
sprite, 67, 11, 495, 755, 246, 246, 1, 0, 255, 1, 1, 0, ballast + ties + rails

//start and end sprites
sprite, 68, 9, 0, 73, 441, 57, 1, 0, 255, 1, 1, 0, starting sprite
sprite, 69, 9, 0, 142, 441, 57, 1, 0, 255, 1, 1, 0, ending sprite

//zoom icons
sprite, 70, 8, 252, 446, 202, 51, 1, 0, 255, 1, 1, 0, zoom 1
sprite, 71, 8, 252, 501, 202, 51, 1, 0, 255, 1, 1, 0, zoom 2
sprite, 72, 8, 252, 556, 202, 51, 1, 0, 255, 1, 1, 0, zoom 3
sprite, 73, 8, 252, 611, 202, 51, 1, 0, 255, 1, 1, 0, zoom 4

//water
sprite, 80, 1, 0, 0, 248, 248, 1, 0, 255, 1, 1, 0, vert 1
sprite, 81, 1, 252, 0, 248, 248, 1, 0, 255, 1, 1, 0, vert 2
sprite, 82, 1, 5, 751, 248, 248, 1, 0, 255, 1, 1, 0, hor 1
sprite, 83, 1, 256, 751, 248, 248, 1, 0, 255, 1, 1, 0, hor 2
sprite, 84, 12, 500, -3, 248, 248, 1, 0, 255, 1, 1, 0, elbow top-left
sprite, 85, 12, 228, 0, 248, 248, 1, 0, 255, 1, 1, 0, elbow top-right
sprite, 86, 1, 503, 0, 248, 248, 1, 0, 255, 1, 1, 0, elbow bottom-left
sprite, 87, 1, 509, 750, 248, 248, 1, 0, 255, 1, 1, 0, elbow bottom-right
sprite, 88, 12, 9, 251, 744, 496, 1, 0, 255, 1, 1, 0, pond1
sprite, 89, 1, 0, 248, 744, 496, 1, 0, 255, 1, 1, 0, pond2


//sprite, 92, 8, 0, 22, 13, 12, 1, 0, 255, 1, 1, 0, calendar mark
sprite, 93, 9, 387, 0, 63, 63, 1, 0, 255, 1, 1, 0, intersection rails
sprite, 94, 9, 450, 0, 63, 63, 1, 0, 255, 1, 1, 0, intersection ballast
sprite, 95, 9, 516,0, 63, 63, 1, 0, 255, 1, 1, 0, intersection ties

sprite, 96, 0, 0, 257, 65, 65, 1,0, 255, 1, 1, 0, tree
sprite, 100, 0, 102, 264, 167, 167, 1, 0, 255, 1, 1, 0, train engine
sprite, 101, 0, 268, 264, 167, 167, 1, 0, 255, 1, 1, 0, train engine shadow
sprite, 102, 8, 670, 373, 19, 19, 1, 0, 255, 1, 1, 0, waypoint

sprite, 103, 8, 11, 612, 23, 22, 1, 0, 255, 1, 1, 0, x1
sprite, 104, 8, 36, 612, 23, 22, 1, 0, 255, 1, 1, 0, x2
sprite, 105, 8, 63, 612, 23, 22, 1, 0, 255, 1, 1, 0, x4
sprite, 106, 8, 90, 612, 23, 22, 1, 0, 255, 1, 1, 0, x8
sprite, 107, 8, 118, 612, 28, 22, 1, 0, 255, 1, 1, 0, x16

sprite, 108, 8, 670, 326, 14, 14, 1, 0, 255, 1, 1, 0, mouse cursor
sprite, 110, 7, 516, 201, 64, 64, 1, 0, 255, 1, 1, 0, red square mouse
sprite, 111, 8, 593, 550, 100, 51, 1, 0, 255, 1, 1, 0, exit


sprite, 112, 0, 516, 2, 240, 240, 1, 0, 255, 1, 1, 0, building 1
sprite, 113, 0, 756, 2, 120, 120, 1, 0, 255, 1, 1, 0, building 2
sprite, 114, 0, 878, 2, 120, 120, 1, 0, 255, 1, 1, 0, building 3

sprite, 115, 2, 0, 0, 1024, 768, 1, 0, 255, 1, 1, 0, map parchment

//building shadows
sprite, 116, 0, 516, 263, 240, 240, 1, 0, 255, 1, 1, 0, building 1
sprite, 117, 0, 756, 263, 120, 120, 1, 0, 255, 1, 1, 0, building 2
sprite, 118, 0, 878, 263, 120, 120, 1, 0, 255, 1, 1, 0, building 3

sprite, 119, 8, 173, 596, 63, 72, 1, 0, 255, 1, 1, 0, check mark

//gloves
sprite, 120, 0, 2, 493, 75, 75, 1, 0, 255, 1, 1, 0, red glove
sprite, 121, 0, 77, 493, 75, 75, 1, 0, 255, 1, 1, 0, blue glove
sprite, 122, 0, 152, 493, 75, 75, 1, 0, 255, 1, 1, 0, white glove
sprite, 123, 0, 227, 493, 75, 75, 1, 0, 255, 1, 1, 0, black glove

//mouse pointing gloves
sprite, 124, 0, 0, 588, 75, 75, 1, 0, 255, 1, 1, 0, glove left
sprite, 125, 0, 75, 588, 75, 75, 1, 0, 255, 1, 1, 0, glove right
sprite, 126, 0, 150, 588, 75, 75, 1, 0, 255, 1, 1, 0, glove up
sprite, 127, 0, 225, 588, 75, 75, 1, 0, 255, 1, 1, 0, glove down

//help
sprite, 130, 16, 3, 702, 100, 48, 1, 0, 255, 1, 1, 0, previous
sprite, 131, 16, 108, 702, 100, 48, 1, 0, 255, 1, 1, 0, next
sprite, 132, 16, 5, 755, 100, 48, 1, 0, 255, 1, 1, 0, previous gray
sprite, 133, 16, 109, 757, 100, 48, 1, 0, 255, 1, 1, 0, next gray
sprite, 134, 16, 218, 701, 200, 50, 1, 0, 255, 1, 1, 0, main menu

//help 1
sprite, 135, 17, 8, 253, 485, 70, 1, 0, 255, 1, 1, 0, title
sprite, 136, 17, 3, 620, 807, 401, 1, 0, 255, 1, 1, 0, opennarrative1

//help 2
sprite, 137, 16, 0, 0, 714, 693, 1, 0, 255, 1, 1, 0, map
sprite, 138, 16, 720, 4, 177, 119, 1, 0, 255, 1, 1, 0, Pleasant valley
sprite, 139, 16, 721, 137, 177, 126, 1, 0, 255, 1, 1, 0, Johnson City
sprite, 140, 16, 921, 22, 73, 75, 1, 0, 255, 1, 1, 0, Red circle
sprite, 141, 16, 918, 163, 81, 75, 1, 0, 255, 1, 1, 0, Blue circle
sprite, 142, 16, 732, 401, 102, 102, 1, 0, 255, 1, 1, 0, red arrow
sprite, 143, 16, 721, 281, 219, 48, 1, 0, 255, 1 ,1, 0, begin sample
sprite, 144, 16, 722, 339, 227, 45, 1, 0, 255, 1, 1, 0, end sample
sprite, 145, 17, 7, 336, 437, 165, 1, 0, 255, 1, 1, 0, lay track narr
sprite, 146, 19, 6, 4, 353, 268, 1, 0, 255, 1, 1, 0, lay 1
sprite, 147, 19, 673, 458, 203, 140, 1, 0, 255, 1, 1, 0, lay 2
sprite, 148, 18, 418, 8, 389, 75, 1, 0, 255, 1, 1, 0, lanterns
sprite, 149, 17, 558, 8, 440, 325, 1, 0, 255, 1, 1, 0, lantern narr
sprite, 150, 19, 537, 10, 472, 385, 1, 0, 255, 1, 1, 0, track
sprite, 151, 19, 10, 289, 476, 224, 1, 0, 255, 1, 1, 0, 4 sections
sprite, 152, 17, 535, 378, 352, 163, 1, 0, 255, 1, 1, 0, 44 sections narr
sprite, 153, 17, 0, 0, 309, 135, 1, 0, 255, 1, 1, 0, terrain types
sprite, 154, 18, 10, 239, 309, 237, 1, 0, 255, 1, 1, 0, terrain
sprite, 155, 19, 7, 540, 642, 417, 1, 0, 255, 1, 1, 0, pause
sprite, 156, 19, 684, 821, 118, 153, 1, 0, 255, 1, 1, 0, watch

sprite, 157, 18, 443, 130, 467, 636, 1, 0, 255, 1, 1, 0, mult controls
sprite, 158, 18, 32, 93, 81, 84, 1, 0, 255, 1, 1, 0, check mark
sprite, 159, 9, 7, 216, 495, 231, 1, 0, 255, 1, 1, 0, waypoints
sprite, 160, 18, 11, 518, 422, 258, 1, 0, 255, 1, 1, 0, waypoint narr
sprite, 161, 17, 318, 7, 237, 227, 1, 0, 255, 1, 1, 0, narr terrain times

sprite, 162, 8, 592, 608, 46, 51, 1, 0, 255, 1, 1, 0, sound on
sprite, 163, 8, 637, 608, 46, 51, 1, 0, 255, 1, 1, 0, music on
sprite, 164, 8, 683, 608, 46, 51, 1, 0, 255, 1, 1, 0, sound off
sprite, 165, 8, 728, 608, 46, 51, 1, 0, 255, 1, 1, 0, musicon

sprite, 166, 18, 11, 805, 497, 82, 1, 0, 255, 1, 1, 0, music directions
sprite, 167, 9, 70, 496, 828, 160, 1, 0, 255, 1, 1, 0, congrats
sprite, 168, 9, 30, 686, 837, 152, 1, 0, 255, 1, 1, 0, game over

sprite, 169, 3, 32, 42, 871, 455, 1, 0, 255, 1, 1, 0, notice



That's enough rambling for now. :)

I'll work on a game design spec!

Regards,
Chuck
Was This Post Helpful? 0
  • +
  • -

#17 chuckb  Icon User is offline

  • D.I.C Head

Reputation: 13
  • View blog
  • Posts: 211
  • Joined: 29-May 09

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 06 June 2009 - 10:16 AM

Dan,
I just saw your art. Fantastic!! So, let's do a Tank game. I'm psyched!! I'll work on the design spec this weekend.

Incidentally, for animation, here is how I do it. My above drawing is an older technique. I draw the frames in the sprite sheet in a horizontal row now.

So, let's say we're using 1024x1024 sprite sheet and 48x48 animated sprite. We can put together up to 21 frames (1024/48. In the assets file it would be defined like this.

sprite, 15, 6,............., 21, 1, 0.15, explosion


That means there are 21 frames with a 0.15 second delay between them.

Excellent art!

Regards,
Chuck
Was This Post Helpful? 0
  • +
  • -

#18 danm36  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 32
  • Joined: 06-June 09

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 06 June 2009 - 11:24 AM

Chuck

I have learnt a bit of German and, if I had a script, could possably read a bit of acting, maybe for the NPC's and such. Just wait and see if my mic gets fixed/get a new one. Your voices sounded good, just a few were a bit too quiet to hear properly. We could always speak in english with an accent. I know many people on the internets who can and this would save us from angry e-mails saying 'Your google translated phrases made no sense'.

Ask when you need something and I'll get right on it

Dan

EDIT:

Something I forgot to mention. I am good at making videos of both real and animated quality so if you need any cutscenes, an intro etc just ask. You may need a BINK! library to play them though (I find bink a good format)

This post has been edited by danm36: 06 June 2009 - 11:28 AM

Was This Post Helpful? 0
  • +
  • -

#19 chuckb  Icon User is offline

  • D.I.C Head

Reputation: 13
  • View blog
  • Posts: 211
  • Joined: 29-May 09

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 06 June 2009 - 01:53 PM

Dan,
Good that you can do some German. I'll work out a script later on.

I do have some experimental code in which I added an AVI file to my screen. Perhaps a vintage B&W youtube video from the Battle of Kursk could be used between levels. I'll add that to my wish list of things to 'learn'.

Here's something you can consider. I'm posting an image of your grass terrain. You can see that the edges of the tiles are seamless...which is good. However, the pattern inside repeats. Perhaps you could produce a dozen different grass tiles that are seamless...with variation inside.

Also, I took your dark rocky tile and 'erased' bits. I used this as 'splatter' to go on top of the terrain. I also rotated those sprites to increase the variation. As you can see, this has the potential of making for more realistic terrain. Feel free to use sprites of different sizes. Make sure to put on 1024x1024 .png file. I can handle transparency.

One more thing, I'm putting together a basic compiled framework for you. You can add .png files, define sprites on the data file, and then place them in a level file. This way you can test it all combined with the actual framework.

This will give you two tools: The FMOD Demo you already have for playing with sound. The above app will allow for sprite experimentation. I would ask that you experiment and apply your skill to those assets: sound and art.

I'll then jump into the game spec. Your art and sound effects will no doubt impact the 'feel' of the game. Anyhow, I'm off to visit someone for a few hours...but I'll have time tonight and tomorrow after church.

Posted Image

Regards,
Chuck
Was This Post Helpful? 0
  • +
  • -

#20 chuckb  Icon User is offline

  • D.I.C Head

Reputation: 13
  • View blog
  • Posts: 211
  • Joined: 29-May 09

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 06 June 2009 - 09:20 PM

@Dan,
Here's the basic program. You can use it along with data files to experiment with visual effects. I've 'bypassed' several game states..so the program goes from the Intro screen right to game play (can't do anything).

VisualTestProgram

You can use the sprite sheet in the assets\graphic folder. There's only 1 texture. You are free to add more
.png files (texture) and as many sprites as you wish. I explained this asset format somewhere above this posting.

assets.dat
texture, 0, test1.png, various sprites

sprite, 0, 0, 0, 0, 64, 64, 1, 0, 255, 1, 1, 0, grass64x64
sprite, 1, 0, 0, 519, 64, 64, 1, 0, 255, 1, 1, 0, darksplatter
sprite, 2, 0, 64, 519, 64, 64, 1, 0, 255, 1, 1, 0, whitesplatter
sprite, 3, 0, 0, 595, 255, 255, 1, 0, 255, 1, 1, 0, dirt256x256
sprite, 4, 0, 256, 595, 255, 255, 1, 0, 255, 1, 1, 0, grass256x256
sprite, 5, 0, 539, 12, 61, 61, 1, 0, 255, 4, 1, .2, fire
sprite, 6, 0, 538, 99, 61, 61, 1, 0, 255, 6, 1, .1, explosion
sprite, 7, 0, 261, 453, 52, 52, 1, 0, 255, 1, 1, 0, mouse reticle
sprite, 8, 0, 265, 78, 50, 50, 1, 0, 255, 1, 1, 0, german tank
sprite, 9, 0, 259, 0, 62, 62, 1, 0, 255, 1, 1, 0, german turret



This is the cool part. You can use sprites listed above at any X,Y position. The important thing is the layer. The program renders layer 0..then works its way up to 9. (it's Z-order) Try rendering a turret on top of the tank at an angle. When the level is finished we'll have a "tank" keyword for the level files.

level1.dat
//sprite, sprite ID, left(x), top(y), angle (radians), layer (0 - 9)
sprite, 0, 0, 0, 0, 0
sprite, 0, 0, 64, 0, 0
sprite, 0, 0, 128, 0, 0
sprite, 0, 0, 192, 0, 0
sprite, 0, 0, 256, 0, 0
sprite, 5, 500, 400, 0, 9
sprite, 6, 700, 200, 0, 9
sprite, 8, 400, 300, 0, 4
sprite, 8, 200, 600, .78, 4
sprite, 8, 700, 400, 2.2, 4



Here's the C++ code rendering the level.
  //render all game objects...starting with layer 0
  //***********************************************************************************
  for(int layer = 0; layer < 10;++layer){			 //layer number 0 - 9
	for(int i = 0; i < data.m_object.size(); ++i){	//iterate through all objects	
	  if(data.m_object[i].layer == layer){			//render correct layer
		gi = con.GetSprite(data.m_object[i].spriteID);//load graphic image
		gi.angle = data.m_object[i].angle;			//adjust angle
		gi.frameCount = data.m_object[i].frameNumber; //load current frame for animations
		con.RenderGraphicModulate(gi, data.m_object[i].x, data.m_object[i].y, 255, 255, 255);
	  }
	}
  }



One thing you'll notice, for this test program is that there are 192 lines in the level1.dat file. That's way TOO many to write by hand. If you have Excel and can get to the VB editor you can write this code. Just change the Print #1 line to experiment with a different sprite.


Public Sub CreateLevelFile()
  Dim i As Integer
  Dim j As Integer
  
  Open ThisWorkbook.Path & "\level.txt" For Output As #1
	For i = 0 To 16
	  For j = 0 To 12
		Print #1, "sprite, 0, " & CStr(i * 64) & ", " & CStr(j * 64) & ", 0, 0"
	  Next j
	Next i
  Close #1

End Sub



At this point, if you made it to this line, you should have TWO tools...the FMOD demo app and this one. Let me know what you think.

I'll work on the design spec. Then I'll add capability to move around the game level. Then I can focus on an editor for you.

Regards,
Chuck
Was This Post Helpful? 0
  • +
  • -

#21 danm36  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 32
  • Joined: 06-June 09

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 07 June 2009 - 04:09 AM

@Chuck

Thank you for the tools, now I can properly test the anims and see if the transparency works. I see the fire sprite and the explosions look a bit dodgy so I'll sort them out. To get the turrets working you have to place the X 5 less than the tanks and the Y 10 less, so I'll probably adjust the image at as later date.

Does FMod allow the same sound to be played again shortly after the first one? (just for the machinegun's sake)

Dan

Another EDIT:

I just thought of something. I am creating quite a few different types of grass for the landscape and these include various ammounts of dirt etc. I was thinking that if you could set up some sort of randomizer that, if on the level editor someone has pasted a load of generic grass tile (Id 1 for example) then on the map load, the game picks a random number then assigns each tile with id 1 a random grass sprite via the number, meaning the map looks new and different every time. Of course none of these random tiles would be obdstructive looking to confuse the player. This would make it easier to create a new feel than spending years making each tile different. Just a thought.

This post has been edited by danm36: 07 June 2009 - 05:18 AM

Was This Post Helpful? 0
  • +
  • -

#22 chuckb  Icon User is offline

  • D.I.C Head

Reputation: 13
  • View blog
  • Posts: 211
  • Joined: 29-May 09

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 07 June 2009 - 05:46 AM

Dan,
I hear you on the editor. Here's what I might be able to do.

Let's say you have 20 different types of 64x64 terrain tiles. Realistically, you would find some sort of transition between tiles. E.g. Rich green grass -> just green grass -> green and brown grass -> grass with dirt patches -> dirt patches with bits of grass, etc.

For the randomizer, it would be interesting to assign a transition value to each tile. So, instead of

for(int i = 0; i < 16; ++i){
  for(int j = 0; i < 12; ++j){
   //add a randomized tile sprite ID 0 to 19
  }
}



we could have


for(int i = 0; i < 16; ++i){
  for(int j = 0; i < 12; ++j){
   //look at tile above and to the left to decide the next possibility
  }
}



This of course would allow for very nice level layouts without the typical 'tiled' look.

Good catch on the turret. Remember, you are not limited to 64x64 tiles. Perhaps you could do this:
* landscape.png //all terrain tiles including splatter
* vehicles.png //tanks, vehicles, damages
* effects.png //fire and explosion animations
* manmade.png //buildings, walls (healthy and damaged)
* natural.png //trees, boulders, river

I'm planning a top down game. Tanks, vehicles, trees, effects...all top down. However for buildings, it's permissible to add a slight tilt to see bits of two sides. I would suggest 'southern' and 'eastern' edges be tilted if you want to do that.

In the past, I would put the sun to the southwest and cast a slight shadow toward the north east. This enhances the visual effect. I use various size black circles and rectangles...then change opacity so one see bits of the ground. I can set this up in the level file...something like... "shadow, 5, 3". This would be 5 pixels to the right and 3 pixels up. This will allow you to experiment with various looks in the editor.

In fact, since I envision multiple levels, we can position the sun at different locations...even have dawn/dust engagements.

For sprite angles, I'm certain I'm rotating them in the center. It does work better to assign equal width and height values. I'm not sure how I rotate non-square tiles.

I'll start the spec next.

Regards,
Chuck
Was This Post Helpful? 1
  • +
  • -

#23 dom96  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 256
  • Joined: 29-December 08

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 07 June 2009 - 06:05 AM

Wow, this looks awesome, i would help but i don't know how to make anything with C++ <_<
When do you's think this will be finished i would love to try it out, if you need any beta testers.
Was This Post Helpful? 0
  • +
  • -

#24 danm36  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 32
  • Joined: 06-June 09

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 07 June 2009 - 06:23 AM

View Postdom96, on 7 Jun, 2009 - 12:05 PM, said:

Wow, this looks awesome, i would help but i don't know how to make anything with C++ <_<
When do you's think this will be finished i would love to try it out, if you need any beta testers.


The game needs to be complete on the 22nd of September. IF you know anything about graphic design, audio work or could be a voice, (German/Russian) then ChuckB may take you aboard. And thanks for your interest.
Was This Post Helpful? 0
  • +
  • -

#25 dom96  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 256
  • Joined: 29-December 08

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 07 June 2009 - 06:28 AM

Well i can speak Polish close enough ? but remember i'm 13(well almost 14)
Was This Post Helpful? 0
  • +
  • -

#26 danm36  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 32
  • Joined: 06-June 09

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 07 June 2009 - 06:44 AM

@Chuck

Posted Image

Theres a landscape sheet with transparency. It's half empty because I can't think of anthing else to make at the moment. The grid is again 64x64 for ease of use. Now to work on the vehicles sheet. Say if you need anything else.

Dan
Was This Post Helpful? 0
  • +
  • -

#27 chuckb  Icon User is offline

  • D.I.C Head

Reputation: 13
  • View blog
  • Posts: 211
  • Joined: 29-May 09

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 07 June 2009 - 10:57 AM

@Dom96,
Thanks! I'm writing the game spec at the moment. There may be some opportunities for people to work on smaller bits in the development process. I'll keep you in mind...and your age doesn't matter to me. :)

@Dan,
I've emailed you a link to a musician I'm trying to recruit. He indicated recently at once site that he's looking for a project. Tell me what you think.

Great art! Is this a screenshot using the assets.dat and level1.dat files?

Here's a thought about shadows. It's possible to create a crater with minimal shadows...and then shadow sprites that may be drawn and rotated on top to correspond with time of day. It's an easy way to manage without creating numerous graphics of the same crater with varies shadows.

I see you added variation to the grass. Oh yeah! The splatter is looking very good.

I'm off to church and I'll try to keep mind on the 'higher purpose' for that hour (I don't mean this game. :D). Then I hope to rush back and continue. I'm on page 4 of the "Battle for Kursk".

Regards,
Chuck

This post has been edited by chuckb: 07 June 2009 - 10:58 AM

Was This Post Helpful? 0
  • +
  • -

#28 danm36  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 32
  • Joined: 06-June 09

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 07 June 2009 - 11:01 AM

@Chuck

The musician sounds very good. I hope he accepts. The screenshot isn't one in-'game' but the image with all the current landscape sprites :D. Also note, the crater in the above image is just a coloured version of a crater on the moon that I took a picture of last night :D so I appollogise for the slight shadow.

Got the vehicle sheet set up. Again the grid is 64x64 (Both easy and a number the computer likes). There is tonnes of free space so maybe we should fill it up with buildings (The only things other than effects that won't be 64x64 probably)?

Posted Image

It has a proper transparency layer. Here is a zip with both this and the above graphic (With fixed transparency). http://files.filefro...;/fileinfo.html

assets.dat

texture, 0, test1.png, various sprites
texture, 1, vehicles.png, vehicles
texture, 2, landscape.png, landscape //Not used yet

sprite, 0, 0, 0, 0, 64, 64, 1, 0, 255, 1, 1, 0, grass64x64
sprite, 1, 0, 0, 519, 64, 64, 1, 0, 255, 1, 1, 0, darksplatter
sprite, 2, 0, 64, 519, 64, 64, 1, 0, 255, 1, 1, 0, whitesplatter
sprite, 3, 0, 0, 595, 255, 255, 1, 0, 255, 1, 1, 0, dirt256x256
sprite, 4, 0, 256, 595, 255, 255, 1, 0, 255, 1, 1, 0, grass256x256
sprite, 5, 0, 539, 12, 61, 61, 1, 0, 255, 4, 1, .2, fire
sprite, 6, 0, 538, 99, 61, 61, 1, 0, 255, 6, 1, .1, explosion
sprite, 7, 0, 261, 453, 52, 52, 1, 0, 255, 1, 1, 0, mouse reticle
sprite, 8, 1, 128, 64, 50, 50, 1, 0, 255, 1, 1, 0, german tank
sprite, 9, 1, 128, 0, 62, 62, 1, 0, 255, 1, 1, 0, german turret
sprite, 10, 1, 384, 0, 64, 64, 1, 0, 255, 3, 1, .2, ammofire
sprite, 11, 1, 384, 64, 64, 64, 1, 0, 255, 3, 1, .2, repairfire
sprite, 12, 1, 0, 448, 64, 64, 1, 0, 255, 3, 1, .2, tankfire
sprite, 13, 1, 0, 384, 64, 64, 1, 0, 255, 3, 1, .2, tankfireturret
sprite, 14, 1, 576, 0, 64, 64, 1, 0, 255, 2, 1, .1, Russian Plane
sprite, 15, 1, 704, 0, 64, 64, 1, 0, 255, 2, 1, .1, Russian Plane (Damaged)
sprite, 16, 1, 832, 0, 64, 64, 1, 0, 255, 3, 1, .2, Russian Plane (Death)
sprite, 17, 1, 128, 128, 50, 50, 1, 0, 255, 1, 1, 0, german tank (Damaged)
sprite, 18, 1, 128, 192, 62, 62, 1, 0, 255, 1, 1, 0, german turret (Damaged)
sprite, 19, 1, 128, 256, 50, 50, 1, 0, 255, 1, 1, 0, german tank (V-Damaged)
sprite, 20, 1, 128, 320, 62, 62, 1, 0, 255, 1, 1, 0, german turret (V-Damaged)


level1.dat (Excluding the start)

sprite, 5, 500, 400, 0, 9
sprite, 6, 700, 200, 0, 9
sprite, 8, 400, 300, 0, 4
sprite, 8, 200, 600, .78, 4
sprite, 17, 700, 400, 2.2, 4
sprite, 19, 100, 100, 0, 4
sprite, 9, 400, 300, .23, 4
sprite, 9, 200, 600, 1.4, 4
sprite, 18, 700, 400, 2.4, 3
sprite, 20, 100, 100, 0, 3
sprite, 10, 200, 500, 0, 4
sprite, 11, 600, 200, 0, 4
sprite, 12, 600, 600, 0, 4
sprite, 13, 600, 600, 0, 4
sprite, 14, 200, 200, 0, 4
sprite, 15, 200, 300, 0, 4
sprite, 16, 200, 400, 0, 4

This post has been edited by danm36: 07 June 2009 - 11:09 AM

Was This Post Helpful? 0
  • +
  • -

#29 dom96  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 256
  • Joined: 29-December 08

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 07 June 2009 - 11:44 AM

Ok thanks Chuck
Was This Post Helpful? 0
  • +
  • -

#30 chuckb  Icon User is offline

  • D.I.C Head

Reputation: 13
  • View blog
  • Posts: 211
  • Joined: 29-May 09

Re: My Summer Game Programming Project - Due: 9.22.09

Posted 07 June 2009 - 12:06 PM

@Dan,
Excellent! I like the charred vehicles.

How is the system working for you? assets.dat and level1.dat?

Regarding scaling, there are two things we can do. One is keep them at 64x64 and then we can zoom in the assets.dat file. Or, and this is my preference, make original art to scale compared to one another...this allows for more detail in larger objects...and more reliable scaling.

I'm researching tanks and aircraft used in the BFK (Battle for Kursk). There are a variety. Are you okay spending time in creating some tanks and aircraft based upon what was used at Kursk? I'm guessing 4 different tanks in total. Regarding aircraft there are about 3 types.

We can define 64x64 pixels as equivalent to 16x16 feet. I'm putting all of this into the design spec.

I know you're creating art assets and it's got me really motivated. But until we agree on the design spec I would encourage you to slow down a bit. I've taken a quick break from researching the battle and will get back to writing. I'll have a draft spec this afternoon. You can take a read and feed back to me.

Let me know if you're okay with this?

Thanks for the files. I'll include that in my working version.

Thanks,
Chuck
Was This Post Helpful? 0
  • +
  • -

  • (14 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • Last »