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.

Dark GDK / DarkGDK Coding Challenges

Author
Message
Ultimate_H
15
Years of Service
User Offline
Joined: 11th Mar 2009
Location: A place that is neither here nor there
Posted: 26th Sep 2009 07:11
Hey, I'm new on these forums(but have been using GDK for around 5-6 months now) and strode across this competition. I have a skeleton for a home-grown particle system from an early Side-shooter, but it has just been sitting there. I already worked in a couple effects, but don't feel like they're enough. I'll put it up once I get a few more types and try a couple other things.
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 26th Sep 2009 16:28
Welcome! I'm glad that you wish to participate in this challenge. There are still two weeks to polish your code.
Ultimate_H
15
Years of Service
User Offline
Joined: 11th Mar 2009
Location: A place that is neither here nor there
Posted: 10th Oct 2009 02:25
Well, I am done with my particle "engine". Here it is, hope you like it.

sdrawkcab nettirw erutangis a

Attachments

Login to view attachments
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 10th Oct 2009 13:06
A few weeks ago I promised to post the code of a solution to the sidescroller challenge. I must admit that platform collision checking in 2D proved much more difficult than I thought, so this code here is not finished. However, I still post it because I don't know when (and if at all) it will be finished, but the part that is working can still be useful to someone.

The program features: re-using sprites to scroll the screen, creating only as many sprites as needed for the currently visible view, texture scrolling for the background movement effect, player movement control, timer-based movement and jump.

Attachments

Login to view attachments
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 10th Oct 2009 13:12
Now back to the current challenge. Ultimate_H: I tried your EXE but the particles are not visible on the screen, only the text in the upper left corner which says that I should see 200 volcano particles. If you use dbDot commands to display the particles, then I won't see them unfortunately, because I have the "Vista+nVidia does not display dbDot, dbCircle and dbEllipse" bug.

Moreover, you didn't post the source code, so I cannot evaluate that or check what the problem is. The purpose of the challenge is to learn from each other's codes and compare solutions. If you still wish to share your work, please post the source as well.
Ultimate_H
15
Years of Service
User Offline
Joined: 11th Mar 2009
Location: A place that is neither here nor there
Posted: 10th Oct 2009 19:55
"smacks head with hand" oh yeah! forgot about the source...

here it is:


and yeah, I use the dbCircle() command, I attached a version replacing circles with boxes. hope that works.

P.S: also forgot last time to tell you the controls.
Left/Right: change particle type
Up/Down: raise/lower particle count respectively.

sdrawkcab nettirw erutangis a

Attachments

Login to view attachments
DarkwingDuck
14
Years of Service
User Offline
Joined: 5th Oct 2009
Location:
Posted: 11th Oct 2009 05:08
hello everyone. I'm looking for more info on object avoidance/collision for gdk coding its not for a game, but a 3d simulation project that I have mentioned in my previous threads. anyone have any suggestions?

my objective is to attach a sensor to a vehicle that would emulate object detection and avoidance.

can anyone help?
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 11th Oct 2009 14:36 Edited at: 11th Oct 2009 14:41
@DarkwingDuck: Asking the same question in several different threads won't get you more replies. I wrote a reply to you in the original thread:

http://forum.thegamecreators.com/?m=forum_view&t=158812&b=22&p=0

In this thread, the only thing that is similar to what you want to do is my solution to the AI challenge, but the "vehicle AI" there is primitive and won't really answer your question.
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 11th Oct 2009 15:34
@Ultimate_H: Thank you, I can see the particles now! Very impressive. In addition to the controls you mentioned, I also discovered that moving the mouse moves the particles whose type can be changed, and that I have to click the mouse to see the explosion and fireworks. Nice!

What I liked most about your solution is that you achieve several effects which are significantly different from each other, with relatively little code. The effects express the idea of the particle types very well, so they are really recognizable and spectacular. I also liked that you used derived classes to represent different types of particles, and that the code is clean and well-indented.

If I may express some criticism, the structure of the classes could be improved. In the constructors of derived classes, you don't need to repeat all the variable initialization that's already done in the base class. If you have parameters in the constructor, it is also possible to call the parameterized constructor of the base class, and you only need to initialize the values that are not set in the base class.

An idea for future development: Lifetime management of the particles could be solved inside the class, instead of the main program. (Only if it's worth the trouble for your purposes, since it's a major change, but possible.)

But, I repeat it's a very nice work and I really liked the result.

Congratulations, and now I pass to you the task of setting our next challenge.
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 11th Oct 2009 18:13
very good results indeed

Ultimate_H
15
Years of Service
User Offline
Joined: 11th Mar 2009
Location: A place that is neither here nor there
Posted: 11th Oct 2009 19:51
Many thanks Mirben. I had it before using the method you are talking about(with the constructors), but for some reason or another it wasn't working, so I just did that as a quick fix. Nevertheless, thanks for the constructive criticism, I'll definitely create an emitter class at some point that would take care of all the checking and management.

As for the next challenge, I'll post it tonight(when I have decided what it is).

sdrawkcab nettirw erutangis a
Ultimate_H
15
Years of Service
User Offline
Joined: 11th Mar 2009
Location: A place that is neither here nor there
Posted: 12th Oct 2009 02:58
Alright, I have decided on the next challenge. I call it: Make Me a Maze

Specifically, I am looking for an algorithm/method which can be called/used to randomly generate a single path from a start to a finish. This, of course, could be used in some good game ideas in order to increase replay-ability due to the fact that every time you play through it, you would have to find your way once again.

"Selling factors"

Randomness
Having extra paths off of the main one(lending itself to "Mazeness")
Speed(how long it takes to generate the map)
Simplicity

"Bonus Points"

Being able to play the map generated.
Randomly generated collectibles placed anywhere accessible on the map.
High scores
Randomly generated enemies placed anywhere accessible on the map.
Repeatability(playing more than once per execute).

I'll give you till the 30'th(almost 3 weeks). If you think it's too long, then I am being generous. If you think it's too short, then I am being stingy.

Anyways, Good luck. And, may the best coder prevail!

The not-so-ultimate Ultimate_H
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 12th Oct 2009 06:23 Edited at: 12th Oct 2009 06:26
Wow, this actually sounds kinda interesting. I might try it since it seems like it might be somewhat challenging.

I've already found some nice resources:

http://en.wikipedia.org/wiki/Maze_generation_algorithm

Login to post a reply

Server time is: 2024-10-01 14:35:56
Your offset time is: 2024-10-01 14:35:56