Game Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesGame Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old July 3rd, 2006, 09:27 AM
xlordt's Avatar
xlordt xlordt is offline
Only the strong survives!!.
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Feb 2003
Location: A World of wonder.
Posts: 5,516 xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Weeks 1 Day 14 h 51 m 14 sec
Reputation Power: 378
Send a message via ICQ to xlordt Send a message via AIM to xlordt Send a message via MSN to xlordt Send a message via Yahoo to xlordt Send a message via Google Talk to xlordt Send a message via Skype to xlordt
Facebook
Game level Objects

If you was to create a game that requires alot of objects specially on a certain level.. how would you create the objects? Would you define them in a class ( i.e level_ 1 = "objects1, objects2... etc ) or would you randomly select them? See the thing is that im coding an arkanoid clone.. a very basic one for now, untill I can advance knowledge wise in creating games.

Reply With Quote
  #2  
Old July 3rd, 2006, 11:49 AM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,739 Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 4 Weeks 6 h 25 m 16 sec
Reputation Power: 384
I think it'd depend on the game, if the game always has to look the same then you always have them the same, if it can be random then select them random each time.

Reply With Quote
  #3  
Old July 3rd, 2006, 11:51 AM
para45's Avatar
para45 para45 is offline
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 261 para45 User rank is Sergeant Major (2000 - 5000 Reputation Level)para45 User rank is Sergeant Major (2000 - 5000 Reputation Level)para45 User rank is Sergeant Major (2000 - 5000 Reputation Level)para45 User rank is Sergeant Major (2000 - 5000 Reputation Level)para45 User rank is Sergeant Major (2000 - 5000 Reputation Level)para45 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 6 Days 1 h 23 m 59 sec
Reputation Power: 43
What do you mean by objects?

In that particular game you would probably consider each block to be some sort of entity, which when broken may release some sort of power-up randomly. For that I would make the blocks a class, and have a member function called "destroy()" which chooses whether or not to spawn a power-up entity which could then be added to some sort of global entity list for tracking.

On the other hand, games like first person shooters or RPG's may require specific objects to be at specific locations all the time. In that case normally the map data will include a list of such entities, specifying what type they are, the location, and any applied attributes. This could also be used for the construction of the blocks in your game.

On a completely different topic, there is a similar game called "Jarindains!" that's pretty fun.

Reply With Quote
  #4  
Old July 3rd, 2006, 02:50 PM
DevCoach DevCoach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Feb 2004
Location: London, England
Posts: 1,174 DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level)DevCoach User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 6 h 3 m 45 sec
Reputation Power: 207
The usual solution is to have a datafile that contains information about the objects in the level. Your code reads in the datafile and creates the objects.

For an arkanoyd type game the format could be very simple - a text file with one line per block, containing color, x-pos, y-pos, powerup (if any). More complex games could need a structured format such as XML.

Making the level data a text file means you can get up and running quickly by hand editing it. Later you can write a level editor that lets you design the level visually and saves out the level data into a file ready to be read in by the game code.

Dave

Reply With Quote
  #5  
Old July 3rd, 2006, 05:17 PM
xlordt's Avatar
xlordt xlordt is offline
Only the strong survives!!.
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Feb 2003
Location: A World of wonder.
Posts: 5,516 xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Weeks 1 Day 14 h 51 m 14 sec
Reputation Power: 378
Send a message via ICQ to xlordt Send a message via AIM to xlordt Send a message via MSN to xlordt Send a message via Yahoo to xlordt Send a message via Google Talk to xlordt Send a message via Skype to xlordt
Facebook
Ya.. so far I have the objects done.. and all right along with posX, and posY.. I was wondering.. since Im fairly new at this game creation... Anyone Im going to zip up what I have so far for my game.. maybe I can get some comments on it before I can continue... Also note that It will not have the bar on it yet.. it will just be the block objects.. and a red window on your right hand side.. but.. the ball is currently making all the actions . But I would actually love some comment on it though..

(brb in a few)

Reply With Quote
  #6  
Old July 3rd, 2006, 07:05 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,739 Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 4 Weeks 6 h 25 m 16 sec
Reputation Power: 384
hasn't it been a few?

Reply With Quote
  #7  
Old July 3rd, 2006, 08:03 PM
xlordt's Avatar
xlordt xlordt is offline
Only the strong survives!!.
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Feb 2003
Location: A World of wonder.
Posts: 5,516 xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Weeks 1 Day 14 h 51 m 14 sec
Reputation Power: 378
Send a message via ICQ to xlordt Send a message via AIM to xlordt Send a message via MSN to xlordt Send a message via Yahoo to xlordt Send a message via Google Talk to xlordt Send a message via Skype to xlordt
Facebook
Ya.. hehe Im actually getting an error on installing pythong distutils, Going over to post it at the python forum just hold on tight till I can get this working.. this way if you dont have pygame installed you wont need it.

Reply With Quote
  #8  
Old July 3rd, 2006, 08:11 PM
xlordt's Avatar
xlordt xlordt is offline
Only the strong survives!!.
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Feb 2003
Location: A World of wonder.
Posts: 5,516 xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Weeks 1 Day 14 h 51 m 14 sec
Reputation Power: 378
Send a message via ICQ to xlordt Send a message via AIM to xlordt Send a message via MSN to xlordt Send a message via Yahoo to xlordt Send a message via Google Talk to xlordt Send a message via Skype to xlordt
Facebook
haha!!!!! I said "pythong!!!" hehehe, sorry :P
Comments on this post
para45 agrees: Been drinking? heh

Reply With Quote
  #9  
Old July 3rd, 2006, 09:22 PM
xlordt's Avatar
xlordt xlordt is offline
Only the strong survives!!.
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Feb 2003
Location: A World of wonder.
Posts: 5,516 xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)xlordt User rank is Major (30000 - 40000 Reputation Level)  Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1Folding Points: 103339 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Weeks 1 Day 14 h 51 m 14 sec
Reputation Power: 378
Send a message via ICQ to xlordt Send a message via AIM to xlordt Send a message via MSN to xlordt Send a message via Yahoo to xlordt Send a message via Google Talk to xlordt Send a message via Skype to xlordt
Facebook
Well Ok what ever, Im going to have to read on how to use distutils.. Dont have time for that right now. but anways.. Remeber the game is not done yet... Im still missing some objects.. this is just for testing and comments

Requirements: SDL, Python, Pygame, SDL-Mixer, Usualy most of these are already installed in your system, Also sorry guys.. but this is a Linux only for now :S, but I think it should also be ran on windows.
Attached Files
File Type: zip arkanoide.zip (1.6 KB, 122 views)

Last edited by xlordt : July 3rd, 2006 at 09:26 PM.

Reply With Quote
  #10  
Old July 5th, 2006, 08:23 AM
kicken's Avatar
kicken kicken is offline
Wiser? Not exactly.
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: May 2001
Location: Ft Myers, FL
Posts: 4,003 kicken User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)kicken User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)kicken User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)kicken User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)kicken User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)kicken User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)kicken User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)kicken User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)kicken User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)kicken User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)kicken User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)  Folding Points: 115230 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115230 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115230 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115230 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115230 Folding Title: Super Ultimate Folder - Level 1Folding Points: 115230 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Month 2 Weeks 4 Days 16 h 44 m 28 sec
Reputation Power: 414
Send a message via ICQ to kicken Send a message via AIM to kicken Send a message via MSN to kicken
Well, I loaded it up on my box at home over vnc. Looked alright. The ball bounce isn't very natural. Looks like you just flip both the x/y direction when it hits a block. I don't know any pythong (or python either ) so looking at the source would be a bit pointless for me.

Good job though.
__________________
Spidermonkey Tutorial

http://wiser.aoeex.com/ - Long term project (offline due to evil crawlers and lack of content)
http://www.aoeex.com/gmap.php - Put yourself on the map

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesGame Development > Game level Objects


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump