Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 June, 2013, 05:34:39 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 2 [3] 4 5   Go Down
  Print  
Author Topic: The Slime -  (Read 1645 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
thydowulays
LV4 Regular (Next: 200)
****
Offline Offline

Gender: Male
Last Login: 19 March, 2013, 16:22:53
Date Registered: 02 November, 2011, 04:41:42
Location: Greenville, SC
Posts: 184


Total Post Ratings: +11

View Profile WWW
« Reply #30 on: 09 March, 2012, 03:56:35 »
0

Oh I just now saw that in the OP... I will definitely have to agree with you on the slime trail...
Logged

Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus



/image/33080.png[/img]
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 22 May, 2013, 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Total Post Ratings: +23

View Profile WWW
« Reply #31 on: 09 March, 2012, 04:30:13 »
0

How did you get such good grayscale??
Logged

chattahippie
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 27 March, 2013, 05:21:38
Date Registered: 19 July, 2011, 04:13:49
Location: Somewhere
Posts: 358


Topic starter
Total Post Ratings: +27

View Profile
« Reply #32 on: 09 March, 2012, 04:47:21 »
0

How did you get such good grayscale??

I am running the game at 15 MHz, which helps, and also use a total of two DispGraphrr commands (one was way to slow), but I had to slow it down with a Pause (about 10) to really get it good, as the double DispGraph made the greyscale update too fast.  Honestly, it would be even better if I used interrupts, but I will mess with those later.
Logged
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 22 May, 2013, 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Total Post Ratings: +23

View Profile WWW
« Reply #33 on: 09 March, 2012, 04:54:07 »
0

So is this a tile-map or pixel-perfect? Would making it pixel-perfect slow it down a lot?
Logged

chattahippie
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 27 March, 2013, 05:21:38
Date Registered: 19 July, 2011, 04:13:49
Location: Somewhere
Posts: 358


Topic starter
Total Post Ratings: +27

View Profile
« Reply #34 on: 09 March, 2012, 04:58:27 »
0

So is this a tile-map or pixel-perfect? Would making it pixel-perfect slow it down a lot?

For the collision? It is a mixture.  It checks to see if the tiles in a 2x2 grid surrounding the character are solid, and if they are, only checks pixels in the direction the character is accelerating
If it was completely pixel-perfect and constantly checked collision in every direction, it would be a lot slower than it is, and the greyscale would mess up more (like it does when you run into walls)
Logged
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 22 May, 2013, 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Total Post Ratings: +23

View Profile WWW
« Reply #35 on: 09 March, 2012, 05:02:31 »
0

Well I am making a game, and right now it is pixel perfect. Basically right now it checks if above, below, left, and right of the player are solid, and saves it to variables. Another task (thread) checks those variables to see if it can move (The player only collides with the bottom left corner which stinks Tongue). Is there a better, more efficient way to do this? The grayscale is not as good as yours because of the time it takes to draw all the stuff and check pixels.
Logged

chattahippie
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 27 March, 2013, 05:21:38
Date Registered: 19 July, 2011, 04:13:49
Location: Somewhere
Posts: 358


Topic starter
Total Post Ratings: +27

View Profile
« Reply #36 on: 09 March, 2012, 05:04:19 »
0

Well I am making a game, and right now it is pixel perfect. Basically right now it checks if above, below, left, and right of the player are solid, and saves it to variables. Another task (thread) checks those variables to see if it can move (The player only collides with the bottom left corner which stinks Tongue). Is there a better, more efficient way to do this? The grayscale is not as good as yours because of the time it takes to draw all the stuff and check pixels.
If you are using acceleration, you can improve it by only checking the ways your character is moving
Ex:
If you are going down and right, only check those two directions

That should speed it up some, if not a lot
Logged
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 22 May, 2013, 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Total Post Ratings: +23

View Profile WWW
« Reply #37 on: 09 March, 2012, 05:17:43 »
0

I tried it, but I can't really tell if it helped or not. Is there any other way?
EDIT: But doesn't it always have to check down? Because it has to check if it collides?
EDIT2: Do you use buffers for your game?
« Last Edit: 09 March, 2012, 05:20:15 by nxtboy III » Logged

chattahippie
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 27 March, 2013, 05:21:38
Date Registered: 19 July, 2011, 04:13:49
Location: Somewhere
Posts: 358


Topic starter
Total Post Ratings: +27

View Profile
« Reply #38 on: 09 March, 2012, 05:20:56 »
0

If you also switched to a tilemap system, you can figure out whether or not to even check collision (if everything around you is transparent, no collision is needed, and therefore doesn't need to be tested for).  Also, I suggest throwing an extra display routine in your program. Try to place a fair ways away from the other, but make sure the picture is still the same (as in nothing has moved)
Logged
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 22 May, 2013, 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Total Post Ratings: +23

View Profile WWW
« Reply #39 on: 09 March, 2012, 05:22:51 »
0

Huh?
I'm confused with your last 2 sentences. Extra display routine? fair ways away? Nothing moved in picture? Do you think you could maybe show some psuedo?
Logged

chattahippie
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 27 March, 2013, 05:21:38
Date Registered: 19 July, 2011, 04:13:49
Location: Somewhere
Posts: 358


Topic starter
Total Post Ratings: +27

View Profile
« Reply #40 on: 09 March, 2012, 05:27:40 »
0

Sure, and I will explain further:
Extra display routine - update the screen more than once per loop of the engine
By a fair ways away, I mean make sure that there is lots of time between the updates, to better the effect
And by nothing moved, I mean no sprites have been erased from the screen

And here's my example:

Game loop start:

Update the screen with the current picture
Calculate movement
Calculate Collision
Update the screen again -- nothing has changed since the last screen update
Now change your sprites, and update the tilemap, etc.

Game loop end
Logged
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 22 May, 2013, 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Total Post Ratings: +23

View Profile WWW
« Reply #41 on: 09 March, 2012, 05:29:09 »
0

But there are 2 threads, not one.
And also wouldn't it have to update the screen 3 times since it is 4 lvl grayscale?
Logged

chattahippie
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 27 March, 2013, 05:21:38
Date Registered: 19 July, 2011, 04:13:49
Location: Somewhere
Posts: 358


Topic starter
Total Post Ratings: +27

View Profile
« Reply #42 on: 09 March, 2012, 05:32:47 »
0

But there are 2 threads, not one.
And also wouldn't it have to update the screen 3 times since it is 4 lvl grayscale?
Not necessarily - sometimes that will break the greyscale even further

Basically, the way to get it perfect is just to mess around with the number of screen updates and time between updates -- I spent an hour just playing with different places for the second screen update, how long the pause in between the updates should be, and just getting everything set up nicely
Logged
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 22 May, 2013, 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Total Post Ratings: +23

View Profile WWW
« Reply #43 on: 09 March, 2012, 05:34:41 »
0

Huh?
That doesn't make sense. Why would it only update twice if there are 4 colors? Shouldn't it update 3 times?? Because 4 level grayscale has 3 pictures.
Logged

chattahippie
LV6 Super Member (Next: 500)
******
Offline Offline

Gender: Male
Last Login: 27 March, 2013, 05:21:38
Date Registered: 19 July, 2011, 04:13:49
Location: Somewhere
Posts: 358


Topic starter
Total Post Ratings: +27

View Profile
« Reply #44 on: 09 March, 2012, 05:43:31 »
0

Huh?
That doesn't make sense. Why would it only update twice if there are 4 colors? Shouldn't it update 3 times?? Because 4 level grayscale has 3 pictures.
True, but if you updated three times per loop, it could look like nothing is happening at all if there is not a delay between the third and first update:

1st update: 001001001

2nd update:010010010

3rd update:100100100
1st update: 001001001

With two updates per loop, even if the second update is close to the 1st, it will always change every loop of the engine:

1st update: 001001001
2nd update:010010010
1st update: 100100100

It really just depends on how fast/slow your engine is... If you are still having problems, I would suggest making a new thread so that other people can help you, because I've seen people make 4 scale even better than me
Logged
Pages: 1 2 [3] 4 5   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.299 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.