Jump to content

  • Log In with Google      Sign In   
  • Create Account

Beginnings of the Wayward Programmer

From: Looking to get into sprite-based 2D game programming

Posted by , 05 April 2013 - - - - - - · 582 views
For Beginners, Game Programming and 5 more...

As far as what direction to go, I would suggest: this article and this article.

As far as libraries and tutorials, I would suggest Lazy Foo's SDL or Seraph's SFML tutorials for starters.

Source: Looking to get into sprite-based 2D game programming

Another try with HTDP 2nd Edition

Posted by , in Scheme 08 January 2012 - - - - - - · 1,482 views


(define BOARDWIDTH 200)
(define BOARDHEIGHT 200)
(define BOARDBKGR "blue")
(define ROCKET .)
(define UFO (overlay (circle 10 "solid" "red")
				   (rectangle 40 4 "solid" "green")))
(define FLATBED (rectangle 60 10 "outline" "black"))
(define (SPACESHIP option)
	[(= option 1) ROCKET]
	[(= option 2) UFO]))
(define V 10) ;Velocity
(define A 1)  ;Acceleration
(define (distance t)  ;t = Time
  (- (* V t) (* 1/2 A (sqr t))))
(define SPACESHIP-BOTTOM (- BOARDHEIGHT (/ (image-height SHOWNSHIP) 2)))
(define (render-shownship x y)
  (place-image SHOWNSHIP x y GAMEBOARD))
(define (create-rocket-scene.v7 t)
	[(<= (distance t) SPACESHIP-BOTTOM)
	 (render-shownship STARTPOSITION (distance t))]
	[(> (distance t) SPACESHIP-BOTTOM)

This code is based off of Chapter 1 of HTDP. I've gotten this far and it wasn't as bad as last time. And it's been 5 years (I can't believe it) since I've touched this language. The only issues I have really are two things.
  • I couldn't find a way to do one of the suggestions. Which was: How would change the program so that the rocket lands on a flat rock bed that is 10 pixels higher than the bottom of the scene? Don’t forget to change the scenery, too. When I tried adding another function call to render-shownship, I kept getting an error.
  • The spaceship goes down to the bottom of the screen, then accelerates up the screen. I'm a bit lost on why that is.

Outside of those two things. I'm quite happy with my progress. I've thankfully gotten over the prefix issue as well, lol.

My "Lesson" Stories

Posted by , 11 July 2010 - - - - - - · 272 views

The story is based in a fictional world, that is quite similar to our own. This will not be Dragonball Z. No lasers, flying, or 5 minutes power-ups. There will be some instances of chi manipulation but nothing near the DBZ level. Nowhere close or even halfway. The names of the characters are still in fluctuation. The titles will be static for the most part.

The story will be told from the eyes of different characters. It won't be all one person.

For instance, in Lesson One, the viewpoint goes from the Pupil (or young one, as the Master referred to him) to the two Observers. I hope to not make the transitions too confusing or confusing at all.

As each Lesson is posted, right now in Writing for Games forum, I will post a link here as well. Also, each Lesson will have a link to the next lesson. Drafts or incomplete work will be posted here and the finished work in the Writing for Games forum.

I don't expect the stories to be great and spectacular on my first go around. But I hope for them to be at least decent and enjoyable.

So in advance, thank you for reading [smile]

My New Year's Resolution

Posted by , 31 December 2006 - - - - - - · 280 views

Accomplish the goals I set last year for myself; Not whine, not bitch, but do (or in the words of the great Yoda, "Do or not do; there is not try."); relax.

So what's yours?

A year in the good OK

Posted by , 23 November 2006 - - - - - - · 306 views

Well I'm almost finished my Bachelor's degree. I've spent a year in Oklahoma far away from family and friends. I must say that it's been quite an experience. I've learned alot about myself and realize that I have alot of character changes to accomplish (ex: procrastination, oy).

After my degree, I believe I'm going to go through all the Workshops and my Ultimate Japanese book. By 2008, this time I hope my algorithm, problem-solving, and programming skills improve greatly. Hopefully all this relearning and refining, gives me time for martial arts and an actual life.

Well to all Happy Thanksgiving. And feel free to tell your experiences during this last year or just about growing in general.

OOOOOOoooooooo LISP!!!

Posted by , 16 May 2006 - - - - - - · 373 views

You know what the hardest thing about Lisp/Scheme is?? No, it's not the parenthesis or that everything is surrounded by parenthesis. Oh nooooo, it's that damn prefix operator!!!

**shakes fist, with flames bursting from wrist and brimstone hailing onto Silicon Valley**

So I got a novel idea

Posted by , 06 May 2006 - - - - - - · 231 views

...and decided to take my own advice. Since rediscovering the joys of programming and game programming, I dusted off my Game Maker program and gave it another whirl. It it becoming a fruitful and enlightening experience. Even in a drag and drop environment, understanding the flow of events the "code" that executes those events is crucial. I've spent 3 hours alone--partially because I'm blind (figuratively)--trying to figure out an animation situation. Unfortunately, I still have another animation situation I'm trying to figure out [smile].

Right now this is a just a demo. This sorry excuse for 1s and 0s has MegaMan and PharaohMan. All MegaMan can do shoot and jump--but not both at the same time--and run. PharaohMan just shoots randomly and teleports to different sides of the room when hit.

Hopefully I hope to have this implemented:

  • MegaMan can jump & shoot and run & shoot
  • Some sort of simple physics when either character gets hit
  • better shooting animation for PharaohMan (check! 5/07)
  • score and energy bars
  • either scrolling of the background or dynamic background
  • multiplayer

For now, just download, shoot at PharaohMan, then delete [grin]
Thanks for reading (and hopefully downloading).

Today I have reached Moderator Status

Posted by , 06 April 2006 - - - - - - · 260 views

At 2:42pm CST (MS) Time, my rating is 1502! Now I feel like I've reached another GD.net threshold in usefulness and knowledge. I'll go home after work and rejoice! 2000 here I come!

Recent Comments