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.

DarkBASIC Professional Discussion / How to START a 2D game?

Author
Message
Paintedflame
15
Years of Service
User Offline
Joined: 28th Apr 2011
Location:
Posted: 5th May 2011 15:59
I'm working on a game for a class, and I'd like to make a 2D educational game, but I have no idea how to even begin. HELP PLEASE.
Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 5th May 2011 17:08
Often it's best to just get stuck in, laying out a screen with some gameplay basics, then go from there.

For example, if you were making a maths game, you might use mostly text, maybe with a cool handwriting font. I would suggest defining the screen size and resolution first - if it's an educational title, then why not set it to 1024x600, the same resolution as netbooks, and those ee-PC things that a lot of kids have.

Once you know the resolution you need, you can set that with code - rather than relying on the project setting the resolution, use this bit of code:

SET DISPLAY MODE 1024,600,32

The 32 part tells it to use 32-bit colour.

Text commands are easy, just decide where you want some text, and plonk it down there - set colours etc as you go, and use centered text where you can to make it neat.

So, on your 1024x600 screen, say you wanted a question right in the middle, at 512,300 - and let's make it yellow for good measure:

Ink RGB(255,255,0),0
center text 512,300,"This is the question?"

If you remove the 'center' part of that command, the text will be left justified. I suggest messing around with that, get used to the basic 2D stuff - then you can easily go onto using images and sprites.

Health, Ammo, and bacon and eggs!

Login to post a reply

Server time is: 2026-07-10 23:14:03
Your offset time is: 2026-07-10 23:14:03