Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

J2xC

Stuff about 2d platform game:

This topic is 6541 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

A few questions if I may: My first problem is with the level editor I''m going to make for it... should I just do it in MFC or even (god forbid) in VB... just that all I have to make is an interface for positioning tiles (scrollable view in middle of map you''re making) which simultaneously would set properties of tiles in a big 2d array the height and width of the map(in tiles). So MFC, pure win32, or VB? Secondly a more fundamental problem. For the collision detection theres little point in actually testing against each enemy in the level along with any adjacent tiles... so I was thinking I keep a linked list (or the stl-s vector class) to store each enemy as it comes on-screen, and remove it once it gets killed. Is this a good idea, and more importantly will it be faster than testing all the enemies? Exactly how much speed do I suffer using classes, as opposed to a C''style approach to programming this? You''ll notice I''m sort of concerned with speed... this wouldn''t really be a problem considering the game I''m making is relatively simple, but I want to get into good habits, like concentrating on speed. J2xC (J. Connolly) "Then study this: Borg provokes Klingon, Klingon breaks Borg's nose" Belanna Torres, Star Trek Voyager 5.11 "Someone to watch over me"

Share this post


Link to post
Share on other sites
Advertisement
If you need to create your tile editor fast, use VB. If you feel like putting in more effort in creating the editor, use "pure" Win32. Or you could use Borland C++ Builder... If you can afford it.

>> Exactly how much speed do I suffer using classes, as opposed to a C'style approach to programming this? <<

Every time you call a method of a class, there's an extra argument passed to it, the this pointer, which isn't passed to functions. That's it. You will never notice it. I suppose that virtual functions and inheritage slows down the code somewhat, but you don't have to use those things (correct me if I'm wrong, I haven't studied C++ that much ).

- Muzzafarath

Mad House Software
The Field Marshals

Edited by - Muzzafarath on June 25, 2000 6:04:34 AM

Share this post


Link to post
Share on other sites
Well, I''m using that linked list approach right now, and it seems to be working so far. I have the enemies (and all objects) sorted by their location in the level, so that only the ones in view get processed. The head of the list is the lowest one in the level, and when it moves out of range it gets deleted. That way, the head is always the closest to the player, so is processed first, and anything out of screen range doesn''t get processed.

Hope this helps.

Share this post


Link to post
Share on other sites
i made a map editor in MFC in 3 weeks. it was pretty damn easy if i do say so myself... it''s fully functional with saving, loading, cut-copy-pasting, 5 levels of undo, multiple layers...

me likes, me likes...

my only suggestion of you''re going that route is to create a standard SDI MFC app WITHOUT doc/view architecture, because i''ve found that can throw everything outta whack. i came a day from being done with my map editor, then i changed something (which to this day i still don''t know what) that threw everything off. i had to start it over without doc/view, but ended up re-creating it exactly in 3 days ...

MFC is great for quickly creating editors...

david

Share this post


Link to post
Share on other sites
So is it worth me taking the time to learn MFC? I earlier on did one of the MSDN tutorials, and was impressed by the way you could do things pretty easily, and very quickly, but theres still the fact I actually have to learn it, which might take a while. Any ideas how long? I''m on holiday now, and can dedicate several hours a day (like 6 maybe )

J2xC (J. Connolly)

"Then study this: Borg provokes Klingon, Klingon breaks Borg's nose" Belanna Torres, Star Trek Voyager 5.11 "Someone to watch over me"

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!