123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|574|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> Centipede game progress.

Page : 1 2 Next
Prev
Tue, 24 Nov 2015, 21:29
steve_ancell
It's happening... I got my mojo back!!!

Got thees buggers navigating the scenery. Need to add some code to prevent the centipedes from biting their own and each other's arses to stop them going ouroboros, but it's getting there.

The graphics are still in the placeholder stage, so my apologies for it looking a bit crap.

(Linkage!)
Wed, 25 Nov 2015, 07:24
rockford
I do like the look of that, but should centipedes overlap at all? I'd make them turn if there head was about to collide with another 'pede.

Is that the type of battlefield you're aiming for? I really like it and it differentiates itself from the original game

Glad you've got your mojo back
Wed, 25 Nov 2015, 08:14
Jayenkai
Looks great to me
I agree with the "Bounce off each other" sentiment.
Codey tip. I'm assuming your "Map" array has 0 for nothing and 1 for block.
Add a 2 and 3.



when drawing the centipedes, set "where centipede currently is" to 3


at the end of each frame, replace 2's with 0s, and move all 3's down to 2's


When you next move the centipedes, collide them with 2's like you do 1's.
Ignore 3's.


That way they're kinda leaving a trail of blocks behind them, which you can collide other passing snakes against.



Should work well enough.. I think.. Maybe..



*shrugs*

-=-=-
''Load, Next List!''
Wed, 25 Nov 2015, 08:27
Dabz
Coolio!!!

Dabz

*No gangsters were injured in the making of this post*

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Wed, 25 Nov 2015, 08:34
steve_ancell
@rockford: I will be sorting out the overlap thing, I need to do some sort of anti arse-bite code.

@Dabz: There will be gangstas in this game, eventually!

@Jay: I'm not using a map, I made a parser that allows me to pick from an image atlas and then scale it to size and then put it into a group. Collision is done by detecting the area that each image in a group is in.

Sample test level parser list below:



Wed, 25 Nov 2015, 08:43
Jayenkai
*stuck in the 80s land of using arrays for everything*

Sorry!!!!

-=-=-
''Load, Next List!''
Wed, 25 Nov 2015, 08:45
steve_ancell
The pedes have 4 directions (0, 1, 2, 3) 0 is right, 1 is up, 2 is left, 3 is down.

Under the bonnet the pedes move on a square by square basis. There is a field that changes over time which is used as an offset to make the graphics more pixel perfect, when that value reaches zero the square references are moved. The value of the graphic is added based on the direction of each segment.

If that makes any sense, I'm better at doing rather than explaining.
---
Nothing wrong with arrays Jay.
Wed, 25 Nov 2015, 08:53
steve_ancell
When more graphics get done, all I need to do is tell it to create a group and where I want the top left of that group to be; tell it whether I want the next 1 or more atlas grabs if they're are to be solid or not; tell it to grab each graphic and give them sub-positions.

This game isn't gonna be just a simple Centipede game, there's gonna be a lot of twist to it.
---
This game will also be a 4-direction scroller.
Wed, 25 Nov 2015, 09:20
steve_ancell
Here's what the pede class looks like Jay, I'm not sure if it helps me explain much though.



---
In the Draw() method some of that code is for debugging puroses, so anything other than the For/Next loop is now obsolete.
Wed, 25 Nov 2015, 09:27
Jayenkai
Eeeuw.. Object orientated neatly laid out code!!?
.. That's nothing like my work

-=-=-
''Load, Next List!''
Wed, 25 Nov 2015, 09:33
steve_ancell
Yeah I know, I always did like doing stuff a bit of a weird way.
---
Nothing wrong with your code though Jay, at least your's works nearly all the time.
Wed, 25 Nov 2015, 09:36
steve_ancell
What I do is always a product of procrastination.
Wed, 25 Nov 2015, 10:28
rockford
*stuck in the 80s land of using arrays for everything*

I hear you. And then some!

That's why I like creating puzzle games - arrays are sooo easy to deal with and very fast
Wed, 25 Nov 2015, 11:14
Dabz

stuck in the 80s land of using arrays for everything


When I first used Blitz I used arrays for everything, gosubs, goto's and then... Then... I discovered functions, types and lists!

I was like.... WOW!!!

Now though, I see all these new fangled features getting implemented, and understand them, but I think to myself... What the hell do I need them for!

And I think GLBasic proves you dont, GLBasic is a nice old school syntax setup, nothing to make you need to take a course in a BTEC National Certificate in Modern Programming Bollocks Level II, and that setup churns out games for fun, Qubes Elite type app was excellent, no reflection, interfaces and all that jazz, just a good old solid language with plenty of gumph behind it!

And as it soooooo happens, I've had a little rant here about the same thing:-

www.blitzbasic.com/Community/post.php?topic=105361&post=1283377

Day I've had, I would've had a proper Turkey/Russian style rant with a tomato!

Dabz

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Wed, 25 Nov 2015, 11:16
Jayenkai
IMO, as long as the end result works, it doesn't matter how you get there.
... Having said that, Steve's code is at least readable

Mine's a case of ... "Well, >I< know what it does!!!"

-=-=-
''Load, Next List!''
Wed, 25 Nov 2015, 11:46
steve_ancell
Just updated the link.

I've done some arse-bite correction code, it sort of works but spazzes out a bit.
---
Commenting?... Wot's that!

|edit| I posted this after rockford's last, or should I say next, post BTW! |edit|
Wed, 25 Nov 2015, 11:47
rockford
Arrays. Functions. Types. Who needs anything else?

And yeah, for personal projects beautifying code isn't necessary.

My code is laid out logically and in functions and types, with clear and obvious names and commenting.

I know that I can leave my code and come back to it and still understand what each part does.
Thu, 26 Nov 2015, 14:01
cyangames
I was recently told by the guy who took over my role at Ye Olde Refresh Creations that my web code read like a story. Not sure if that's a compliment or not, but I never really wrote it to be read by anyone else hehe!

Still, my old, OLD code was bloody shocking, variable names all over the place!

-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Fri, 27 Nov 2015, 12:00
steve_ancell
Now that things have calmed down a bit I might get back to coding this either tonight or tomorrow, I have really itchy coder's fingers.
Fri, 27 Nov 2015, 12:16
Jayenkai
Don't overdo it, though!!
Fri, 27 Nov 2015, 16:01
steve_ancell
OKies
Sat, 28 Nov 2015, 04:19
steve_ancell
Back in the coding seat, I'm gonna have another go at this worm-on-worm collision problem.
Sat, 28 Nov 2015, 05:43
steve_ancell
Sat at the computer and something small, round and fluffy came flying up the stairs and landed on my nut.
---
And is now sitting on my finger and nibbling my nose.
Sat, 28 Nov 2015, 05:45
Jayenkai
Trouble with Tribbles...
Sat, 28 Nov 2015, 05:50
steve_ancell
Na! not Tribbles, it's Beaky's beak. She sort of looked at my nose and probably thought 'ah!, chewy toy'
---
I've put her back in the cage now, she's been out nearly all day.

I usually leave her out all the time when I'm home, but try coding with a bird climbing all over you. LOL
Sat, 28 Nov 2015, 16:40
cyangames
Like this?

www.geek.com/news/chinese-tech-companies-are-motivating-programmers-by-hiring-cheerleaders-1631794/

-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Page : 1 2 Next
Prev