Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / 2D tile scrolling game ? How would I implement monsters?

Author
Message
CODY_OEBEL
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location:
Posted: 10th Mar 2010 02:11
Ok .. so I am currently creating a 2D scrolling game, and I have researched the forum for 2D scrolling and understand the concept using arrays and defining tiles to tile the screen. But in my game I will have moving creatures\enemies. For example in screen landscape one I might have my Enemy bouncing off the walls, and in simple I would dbSprite(id, Xcoord, Ycoord, id); so that the enemy would be centered and then begine his animation and moving around and about, BUT what if in the first screen of 640x480 I dont want anything at all .. and I want my monster to be active in the 641-1280 region and to only move around in that region. How would this be done? Even going further what if I wanted my creature to move about the span of the entire level. How would one go about doing this?

CODY C++ Oebel
StartCoder
15
Years of Service
User Offline
Joined: 16th Oct 2009
Location:
Posted: 10th Mar 2010 06:28
CODY_OEBEL,

Make an array of monsters just like you did for ur tiles .
CODY_OEBEL
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location:
Posted: 12th Mar 2010 06:11
well.. The idea may sound simple , but the problem is If I code AI into these monsters, or I want the large monsters bigger than the tile sizes to be moving about in random paths, but say I am in screen one e.g 0 to 640 and the shark is in zone 641 - 1280

Brain hurting fun here..
Could anyone maybe produce an example code of how a monster larger than the pixel size would move in screen and out of screen of of a 2D scroller.

CODY C++ Oebel

Login to post a reply

Server time is: 2024-11-20 03:30:47
Your offset time is: 2024-11-20 03:30:47