Mini Grid demo

Post here your demos and examples with the source files.
Forum rules
Always post the games with a screenshot.
The file must have the ged and data files (complete game source)
Use the forum attachment to post the files.
It is always better to use the first post to put the game files

Mini Grid demo

Postby Game A Gogo » Fri May 25, 2007 1:22 am

This is really a small thing, just to show how to make a grid gripping thing.

And no need for a screens hot, its just a pacman icon whit a grid in the BG
Attachments
Grid.zip
Gripping
(1.08 KiB) Downloaded 309 times
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

COOL!!

Postby kyensoftware » Fri May 25, 2007 6:08 am

Cool!
Can I use it in the chess game I am makin'?
Games for Windows, Linux, and PPC
Bin dosnt stand for "Binary";
it stands for Bin.
You know, where the junk goes...
User avatar
kyensoftware
 
Posts: 198
Joined: Thu Oct 26, 2006 7:49 am
Score: 5 Give a positive score

Postby d-soldier » Fri May 25, 2007 2:21 pm

That is pretty cool!
Does the
x=round(x/60)*60;
y=round(y/60)*60;
make it drop in 60 pixel incriments?
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby Game A Gogo » Fri May 25, 2007 11:56 pm

Ir make sit go to the nearest point on a 60 pixel basic.

How it works:

I am compressing the x and y location, making it loose "quality" whit the round(); and to be able to show the "uncompress" version, i need to place *60, which uncompress the compress data but since the some of the data quality, it has to be "choppy", and because the round(); rounds up anything higher then ".5" it makes it move to the closest point.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Sgt. Sparky » Sat May 26, 2007 3:17 am

Awsome Gogo! :D
I am using a function similar to this in my Snake 2007 II Game(posted recently and updated). :D
only the Grid is declared at the start and they move with a 25 x 25 pixel basis and if there is a certain pixel offset it fixes it,
my code it still a bit glitchy because it has so much movement,
but I am workin' on it!
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score


Return to Game Demos

Who is online

Users browsing this forum: No registered users and 1 guest

cron