Topic:   EqwanoX(Sc) Vs. Gan(Obj-C)   (Read 10552 times)


0 Members and 2 Guests are viewing this topic.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
EqwanoX(Sc) Vs. Gan(Obj-C)
« on: February 28, 2010, 04:36:20 PM »
The Challenge
Quote
how bout i challenge you, everything you do in xcode i'll replicate in sc....... in a fraction of the time......... in less code....... and probly better. this will be fun - EqwanoX
Alright Eq, how about this for challenge 1?

*Swipe - Only 57 kb, includes application and source
Instructions: Swipe your mouse across the screen while clicking. It draws a line from start to finish then points an arrow in the direction of the swipe. Easy enough, right?
I've included the source if you think you'll need it. Good luck.


-Gan
« Last Edit: February 28, 2010, 04:39:47 PM by Gandolf »

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #1 on: February 28, 2010, 05:32:29 PM »
well thats a cop out, your going straight for the rotate sprite command,  if this is for lightning i tryed the best i could to do that in the rpg engine,  let me know when your game has actual playable content and then ill recreate that
« Last Edit: February 28, 2010, 05:33:17 PM by EqwanoX »

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #2 on: February 28, 2010, 06:55:20 PM »
Don't be arrogant. Goes for both of you.

Xiphos


  • GMG-er

  • **


  • Posts: 676
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #3 on: February 28, 2010, 07:56:07 PM »
Opens on first bounce, quick, and responsive!

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #4 on: March 01, 2010, 09:35:19 PM »
Quote
let me know when your game has actual playable content and then ill recreate that
Ah, sorry. Had no idea it had to be a game.
Here's the new Challenge 1.
Challenge 1 ~ An Actual Game
Sorry if it's quality is sort of poor, it was rushed. If time allowed I would have added an Easy, Medium, and hard mode. Made an actual cool looking main menu and would have put in 007 background music. Though track started today. Came up as a surprise and now I won't nearly have as much time as I'm use to.


-Gan
« Last Edit: March 01, 2010, 09:35:33 PM by Gandolf »

Xiphos


  • GMG-er

  • **


  • Posts: 676
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #5 on: March 02, 2010, 06:38:55 AM »
I have a feeling Eq, will be able to do this.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #6 on: March 02, 2010, 07:29:40 AM »
Let's hope so. I'm directly targeting features Sc lacks or is weak in to make this... more of a challenge.

Quote
Don't be arrogant. Goes for both of you.
Ah, we're only having a bit of fun. :) This is the first completed(though not the highest of quality) game I've made in how long? Months, years, since the days of learning Sc and Gm?


-Gan
« Last Edit: March 02, 2010, 07:30:23 AM by Gandolf »

GMG Mike


  • Administrator

  • GMG-er

  • *****

  • no avatar

  • Posts: 536
    • mikerichardson.name
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #7 on: March 02, 2010, 08:13:52 AM »
The primary, if not only weakness targeted by either project is the lack of sprite rotation in SilverCreator.

Assuming SilverCreator has sprite rotation, I believe either project would be easier and faster to code in SilverCreator. You would also get instant Windows compatibility. The "price" you pay for this, is a much larger binary and a speed penalty.

Just looking at GameView.m for Balloon Pop, there's still way too much crap you have to do just to load an image or rotate it. You have to manage memory and do all of this other cleanup work. All of that crap impedes the goal - to express your creativity in the form of a game. It's the same reason SilverCreator isn't made in Cocoa.

You could say that SilverCreator's large binary size and slower speed impede the author from fully expressing their creativity. Well, no one gives a crap about file sizes anymore - and there has been progress on improving the speed. The new bytecode system has improved script execution speed at least 10x. It's possible that the REALbasic Cocoa Runtime may also improve speeds, although current betas do not bear this out. Meanwhile, Macs continue to get faster and faster every year, which makes the runtime overhead more and more insignificant.
« Last Edit: March 02, 2010, 08:16:12 AM by Mike_Richardson »

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #8 on: March 02, 2010, 10:54:53 AM »
Quote
Just looking at GameView.m for Balloon Pop, there's still way too much crap you have to do just to load an image or rotate it.
Ah, but it's all pre-made crap! The template handles everything you need with single lines of code.
To load an image:
Code: [Select]
stickGuy = [self loadImage:@"StickGuy" type:@"png"]

To draw a rotated image:
Code: [Select]
[self drawImage:context translate:CGPointMake(0,0) image:stickGuy point:manPos rotation:manRotation]
Now as for memory management, easy as pie.
Get memory to hold an image:
Code: [Select]
stickGuy = [self loadImage:@"StickGuy" type:@"png"];
Release when finished:
Code: [Select]
[stickGuy release];

When you make a template, things just come together without feature obstructions with only the simplest of code. In that example I only needed to add in around 50-60 lines of code. Nothing complex. Just as simple that I was able to make a tutorial on it to those with little to no programming skill.

Quote
You could say that SilverCreator's large binary size and slower speed impede the author from fully expressing their creativity. Well, no one gives a crap about file sizes anymore - and there has been progress on improving the speed. The new bytecode system has improved script execution speed at least 10x. It's possible that the REALbasic Cocoa Runtime may also improve speeds, although current betas do not bear this out. Meanwhile, Macs continue to get faster and faster every year, which makes the runtime overhead more and more insignificant.
Yeah. :) Sc certainly is getting better. Can't wait until those trig functions come out.


-Gan
P.S. Syntax highlighting makes a world of difference.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #9 on: March 02, 2010, 06:44:04 PM »
My opinion is SC is not a professional quality program at all. It's great, however, for people who are learning and want something simpler... There's a reason people who want to make money off games & make better quality programs use C or Java etc.
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #10 on: March 02, 2010, 07:28:15 PM »
Quote
Ah, sorry. Had no idea it had to be a game.
Here's the new Challenge 1.
Challenge 1 ~ An Actual Game
Sorry if it's quality is sort of poor, it was rushed. If time allowed I would have added an Easy, Medium, and hard mode. Made an actual cool looking main menu and would have put in 007 background music. Though track started today. Came up as a surprise and now I won't nearly have as much time as I'm use to.
i cant do this cause i dont know how to calculate geometry, sc is capable of doing this though, if anyone else wants to give it a try ide like to see how its done

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #11 on: March 02, 2010, 07:36:02 PM »
Quote
i cant do this cause i dont know how to calculate geometry, sc is capable of doing this though
Well, actually Sc isn't. I used trigonometric functions which at the moment it doesn't have.
EDIT: To make a game similar to this you'd need 360 sprites to simulate rotation, and set up your own indicator detecting which sprite to choose when your mouse is in a certain area of the screen. If you were to choose this route, it would appear extremely clunky and a bit slow. Also inaccurate. I'm also guessing the amount of code would be incredible and a bit complex. Also your file size would rise to a couple megabytes due to so many images. Loading time would also take a while.


-Gan
« Last Edit: March 02, 2010, 07:45:37 PM by Gandolf »

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #12 on: March 02, 2010, 10:35:21 PM »
I have no idea what this game is (I'm not commandeering my sister's 10.5 machine to find out), but you could technically do rotation in SC by getting a matrix containing the raw pixel data of what ever you're trying to rotate, and then using a rotation matrix to transform and paint those pixels. That's what any 2d graphics library is doing behind the scenes.

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #13 on: March 03, 2010, 08:40:01 AM »
you need trig to set the direction of the bullet? sc has commands for degrees, those will work, the gameplay is possible just not the sprite rotation, although you can emulate.  in stans world 2 the racing mini games car has four sprites and rotates using x and yflip commands to drive in 13 directions.

i dont see a game shooting balloons being in avisaria, my original point was i can recreate any RPG features in sc. also i havent tapped into sc2.0's capablily to handle live action games yet, that'll be fun, 1.5 handled the mario 2 demo pretty well so obviously 2.0 can handle alot more

what it comes down to is the ability to design a game, game design is a seperate skill from programming and graphics
« Last Edit: March 03, 2010, 08:49:06 AM by EqwanoX »

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: EqwanoX(Sc) Vs. Gan(Obj-C)
« Reply #14 on: March 03, 2010, 01:29:36 PM »
Quote
have no idea what this game is (I'm not commandeering my sister's 10.5 machine to find out), but you could technically do rotation in SC by getting a matrix containing the raw pixel data of what ever you're trying to rotate, and then using a rotation matrix to transform and paint those pixels. That's what any 2d graphics library is doing behind the scenes.
If Mike were to create his own sprite rotation method, it'd be extremely CPU extensive. It'd also be very complex and take quite a bit of work.

Quote
you need trig to set the direction of the bullet? sc has commands for degrees, those will work
Sc has cos() and sin() but that's it. Only 2 of the 6 trigonometric functions. To get the amount of degrees needed to rotate the sprite I use arctan(), Sc doesn't have this function and isn't able to get the amount of degrees needed to rotate the sprite to point to the mouse.

Quote
dont see a game shooting balloons being in avisaria, my original point was i can recreate any RPG features in sc
Ah, didn't know you had narrowed the field. Don't worry, these features will be in Avisaria and the iPhone RPG. I can easily change that bullet in challenge 1 to an arrow. Then I'll have the marksman battle system all made.

Quote
what it comes down to is the ability to design a game, game design is a seperate skill from programming and graphics
True, though they are all inter-linked. If the language you program in isn't good enough to withstand how you want to design your game, you start running into problems. My first problem was with Athoria. Sc was not fast enough and couldn't detect collisions before hitting objects, so I moved on.

Game design is good but don't let your choice of language inhibit it.


-Gan