PSC,example,friends,spine,asking,could,make,s
Quick Search for:  in language:    
PSC,example,friends,spine,asking,could,make,s
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
C/ C++ Stats

 Code: 451,578 lines
 Jobs: 605 postings

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for C/ C++.
Visual Pi Hex
By jo122321323 on 8/25


Click here to see a screenshot of this code!ShortCutSample
By Massimiliano Tomassetti on 8/25

(Screen Shot)

AnPMoneyManager beta
By Anthony Tristan on 8/24


A calculator (english/polish )
By Tom Dziedzic on 8/24


MMC (Mouse Move Counter)
By Laszlo Hegedüs on 8/24


Text-DB
By Jerome A. Simon on 8/24


JDos
By Jerome A. Simon on 8/23


Game 1945X
By Ozgun Harmanci on 8/23


Find hidden "back streamed" files on NTFS partitions. This code is a must for sec consultants.
By Israel B. Bentch on 8/22


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

Ratman, simple collision detection, tile map, and map editor

Print
Email
 

Submitted on: 3/24/2001 6:06:53 PM
By: Jared Bruni  
Level: Intermediate
User Rating: By 7 Users
Compatibility:Microsoft Visual C++

Users have accessed this article 4622 times.
 

(About the author)
 
     This is an example for one of my friends ( spine). He was asking how you could make a map in a seperate program and then have the game read the map and load it. I added in my wonderful art (in mspaint lol) as well as the ability for my ugly rat to move around. It was to large to upload to PSC, since it freezes whenever I try to upload more then a meg or two. So the download is within this article.


 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
Note: this is in no way a attempt at me trying to write a video game. This is an example and its features were designed to specificly implement the concept in question

to download just the program click Here

to download the source for ratman click Here

to download the source for the map editor click Here



Screen Shots





hope this helps you spine!

- Jared


Other 273 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this article(in the Intermediate category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
3/24/2001 6:13:32 PM:Jared
Haha I dont know is my rat a rat or a cat? Ethier way it looks like it was born half retarted.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/25/2001 1:27:08 AM:nick
wow, for a demo, for someone who apparently isnt an expert programmer; u sure complexified the $hit outta that would-be simple demo. no offense.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/25/2001 1:29:29 AM:nick
and, u should try using some api instead of going hog-wild, class-crazy. it'll probably imporve speed and readability.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/25/2001 3:35:04 AM:Jared
For starters, lets break down your statement. You confuse opinions, with facts. Is it that classes are complex, and are hard to read, or is it that they are hard to read for you? Classes are just as easy to use as functions to me, and possibly your fear of overhead is what brought you to this statement. "no offense", it is obvious your comments are geared towards the negative, you are hypocritical in what you say. The speed of the application is timed, and the routines are proven. If you wish to speed it up, change the speed variable within the rat class, and lower the TimeChange. Possibly before you speak your wisdom, you should read a little deeper into what that is, and why it is that way. Possibly see the other 15 examples using those same 'hard classes', that are so complex.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/25/2001 3:46:58 AM:Jared Bruni
Second issue, speed. Curently the applications at a fine frame rate, that I intended. This is a simple app, and speed is not really even an issue. (hmm thats were those opinions come in) Second if for some strange reason I did need to worry about speed, I can always multithread, and optimize the program loop however for this it is not even a issue.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/26/2001 7:54:44 AM:wazerface
preety good!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/27/2001 3:29:45 AM:nick
LOL in ur profile u claim to have read lots of books on programming. in which of those books did the author document game programming the way your source demonstrated it? - none? oh, so then ur style is completly unstandardized, and over complex. go out buy some books on game programming. read them. and the bottom line of my comments was that the demo is over complex for what u claim its purpose is.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/27/2001 3:38:30 AM:nick
if u were trying to write a game, and clearly your not (?), then maybe it wouldnt be overcomplex. why are u so defensive? i didnt say it was slow, i didnt say classes were 'hard', i said u went overboard; you spoke of speed and 'hardness' not me. maybe u should read more carefully before commenting, o great and genious one.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/27/2001 12:29:00 PM:Jared
Possibly let me explain further. The book I read was Real-Time Strategy Game Programming by Mickey Kawick. Go pick it up if you have time. Within his book, he creates a library of classes to simpfly directX, and then uses those same classes to be able to build multiple applications. Thats how mine work the only difference is I not only encasulated DirectX, but also Win32. If you were to pay close attention you would see that the MasterX.h is very losely coupled, and is used in multiple examples. This is just one in a series, and certinly is not the last.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/27/2001 12:30:16 PM:Jared Bruni
I am trying to go through step by step building up complexity rather then just dumping off a game with my library saying hey make a game. I am trying to provide step by step examples so that those who wish to build there knowledge. The purpose is to show an example of my API, and if you ask me I think its fairly simple. Whats so complex ? Its just a cap around winmain, with all the directX objects placed into one host object. Then the rest of the objects, inhert from the same base screen object, and point to the main object, so they can function somewere else on there own, and still be able to change on the update. The whole program loop is encasulated and you dont even have to know how MasterX works, you just have to know how to use it.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/27/2001 12:31:11 PM:Jared Bruni
Possibly read one the tutorials on how to use it and check out the other examples, keyword MasterX SDK , you can type it in the search. Then once you have reviewed the material, you will come to a understanding why it functions the way it does. Also check out Mickey Kawick's book its pretty good =).
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/27/2001 12:34:31 PM:Jared Bruni
Heres some refrence for you: "Defention: an Engine is a bunch of code that can easily be modifed to create games. An engine is difficult to create and takes many years of expeirence just to finaly make the engine breaktrhough. A good example of an engine is the quake engine. THe engine was made into pouplar first person shooter Quake. For about $500,000 to $1,000,000 you can licencse the game engine. It has alot of tools which arent great but the engine is" - Mickey Kawick
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/27/2001 12:37:36 PM:Jared Bruni
Some more quotes from the programming god Mickey " So C++ is slower then C right? Well, not really. In some cases; yes; in some cases, no. Whether or not you like C++, the world is slowly migrating toward it, and more then half of all game programmers use it. Most all real-time strategy games use it. Since C++ and C are most always the same speed, there is no benefit to using C over C++. You might as well learn to enjoy its many benefits. My advice: Get used to it" -Mickey Kawick and on that , I am going to school I hope you dont think I took offense. =)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/27/2001 4:50:11 PM:Jared
"Express not Impress"
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
3/27/2001 5:32:47 PM:nukem
1. He was just trying to help out his friend and decided to post this. 2. Yeah, the graphics suck, so do mine. We are programers not graphic artists. Plus he did it in paint, not the best program to do graphics in. 3. If you want to make a good game with good graphics in a short amount of time use vb. The hardest part would be making the graphics.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/4/2001 10:52:19 PM:nick
I have over five books on game programing, tho not the one u mentioned-i think i heard of it tho, is that the one that tells you how to make a line-for-line age of empires? i heard that book blew. each book has its own style- thats a good thing- its a bad thing, however, to put all ur eggs in any one basket.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/8/2001 7:58:39 PM:Jared Bruni
I think Mickey's book and his engine were quite well written. Do you happen to have code thats better? Otherwise I dont think you really have the right to say whats good or bad. Its just nonsense. Possibly speak from knowledge rather then opinion.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/8/2001 8:00:16 PM:Jared Bruni
Send me a link to your code.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/8/2001 8:21:31 PM:NineSpine
Jared wrote this for me. While I agree that he goes a little class-crazy, he codes very very very well. A LOT better than you. That's his style and even though it doesnt make sense to me most of the time, it does work and it does work well. He is a GREAT game programmer and probably one hell of a lot better than you nick.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/26/2001 12:49:43 PM:Mike
go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go nine spine go ninee
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/23/2001 8:13:06 PM:Rhiannon
That nick character sure seemed pretty mean.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/6/2001 11:36:19 PM:KingZumby
LOL, I like listening to the arguements. Hey, nothin against you nick, but Jared is a pretty good programmer. Complain only when your at his level. What have you programmed lately? anything good? I didnt think so... But tho, i thought it was a good program, nicely made :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this article has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular article, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | C/ C++ Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.