Skip to main content
GameDev.net gamedev.net
🔒 Locked

Game programming in Unix

Started by Illusions Apr 8, 2001 at 1:34 PM 0 replies 300+ views
Original Post
Illusions
Illusions
Hi there I''ve started taking a course in C a few months ago (well actually 2 months ago) and i now have a project to hand in I thought I''d do a simple games program since i hardly have much time left. I decided to do a simple snakes game on a bmp background (like a painting or something... just to make it look good) and then spend most of the time doing a graphical intro and stuff anyway i haven''t put in the picture yet (and am still not sure if its possible) but im having problems randomly generating dots on the screen can anybody help? Thanx
tryforfulluse
tryforfulluse
how can you have trouble generating random dots? sorry but all you do is take there x and y position and do this (thinking you have a struct. for this)
dots.x = rand()%SCREEN_WIDTH;
dots.y = rand()%SCREEN_HEIGHT;

what else could you be doing do randomly generate something? ugh what were you doing to do it?
bad!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.