Ohr racing game?

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

User avatar
Froginator
Slime Knight
Posts: 188
Joined: Thu Apr 24, 2014 10:13 pm
Location: Germany
Contact:

Post by Froginator »

Wow. Just wow. It was a question I asked just for fun and wow. Now there's a contest for a silly idea I had. Apparently.
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Spoonweaver wrote:Racing games that you'd be better off making with the OHR.

Image
So I have too much on my plate to enter this contest, but if I was going to make this game, here is what I would do:

the ground would be divided into rows. Each row would be made of a set of overlapping 1-pixel-high rectangle slices.

One for the grass background
one for the edges of the road
one for the road itself
two for the lines in the road

Scripting the color changes and x-position changes for all the rows of rectangles would not be an easy script to write, but it could work

The cars and moving scenery could be sprites scaled with the "Shrink" dissolve type.

Crazyness :)
User avatar
Taco Bot
Meat, Cheese, and Silicon
Posts: 484
Joined: Fri Jul 18, 2014 12:15 am
Location: Santa Cruz
Contact:

Post by Taco Bot »

I was reading an article the other month on how they accomplished that kind of stuff with MODE 7, cool stuff! Can't find it now, though. Buried somewhere in the maze that is my browser history...

EDIT: Nvm I guess I don't use the internet as much as I think: http://www.extentofthejam.com/pseudo/
Last edited by Taco Bot on Mon Mar 23, 2015 11:48 pm, edited 2 times in total.
Sent from my iPhone
User avatar
Gizmog
Metal King Slime
Posts: 2615
Joined: Tue Feb 19, 2008 5:41 am

Post by Gizmog »

Technically I said a COMMITTEE, not a CONTEST. One is co-operative, the other is competitive. Feel free to pay bribes to whoever you want though! This article is very very interesting, though I haven't gotten to the meat of ti yet.
User avatar
kylekrack
Liquid Metal Slime
Posts: 1188
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

Gizmog wrote:Technically I said a COMMITTEE, not a CONTEST. One is co-operative, the other is competitive. Feel free to pay bribes to whoever you want though! This article is very very interesting, though I haven't gotten to the meat of ti yet.
I prefer that much to a contest. What if we used this thread to post tech demos, concept art, and open source sprites/backgrounds for people to use when trying out some racing game of their own? We could even make an attempt to make a fully collaborative game, with multiple people contributing various amounts to different aspects.

In fact, we could make a different thread based on any community made game, regardless of genre. Different people could be assigned different jobs based on their strengths and save time on weaknesses. You know, like how real games are made. There'd even be real credits to show that way! I don't know about you guys, but I think that'd be a good way to get a team together and make a pretty high quality product.
My pronouns are they/them
Ps. I love my wife
User avatar
Gizmog
Metal King Slime
Posts: 2615
Joined: Tue Feb 19, 2008 5:41 am

Post by Gizmog »

Unfortunately it seems like the technique he talks about here uses a bunch of raster slime that I don't understand. He's squashing bitmaps or reading certain parts of 'em? Can't make any sense of it.

As for the committee approach, absolutely. Feel free to post art here, feel free to post scripts and how they work (or how they don't work!) and between all of us we'll get something working.
User avatar
kylekrack
Liquid Metal Slime
Posts: 1188
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

Gizmog wrote:Unfortunately it seems like the technique he talks about here uses a bunch of raster slime that I don't understand. He's squashing bitmaps or reading certain parts of 'em? Can't make any sense of it.

As for the committee approach, absolutely. Feel free to post art here, feel free to post scripts and how they work (or how they don't work!) and between all of us we'll get something working.
The rectangle mumbo jumbo seems to make a bit of sense. I think with some sit down time I could make the very basic setup of that to at least get my mind around what it means. This week I'll try out the layering (likely with a for loop) and the sprite scaling to have a vague tech demo out.
My pronouns are they/them
Ps. I love my wife
User avatar
Spoonweaver
Liquid Metal King Slime
Posts: 6247
Joined: Mon Dec 08, 2008 7:07 am
Location: Home
Contact:

Post by Spoonweaver »

I already made a top down racing game akin to rally X.
[game]Clam Digger[/game]

As for a 3D-like racing game, I could alter Star Wohrs and get a rough one working pretty quickly.
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Post by sheamkennedy »

Yes a committee or gather would be better. I think it would be best not to force deadlines on this sort of thing and encourage group sharing. Then if people feel the need they may wish to make teams.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
TMC
Metal King Slime
Posts: 4101
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

The technique described by James and that article (thanks, very interesting ivnestigation of old racing games) works very well; you can even easily texture the road and grass by using sprite slices instead of rectangles (see the article). I've been working on something very similar; will post a demo.
Last edited by TMC on Tue Mar 24, 2015 1:35 pm, edited 3 times in total.
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

TMC wrote:...I've been working on something very similar; will post a demo.
Music to my ears! :D
Chronoboy
Slime Knight
Posts: 281
Joined: Tue Nov 30, 2010 6:01 am
Location: Canada

Post by Chronoboy »

Taco Bot wrote:I was reading an article the other month on how they accomplished that kind of stuff with MODE 7, cool stuff! Can't find it now, though. Buried somewhere in the maze that is my browser history...

EDIT: Nvm I guess I don't use the internet as much as I think: http://www.extentofthejam.com/pseudo/
Technically speaking, this article doesn't talk about Mode 7, but an older technology. Mode 7 is actually done using an Affine transformation of an image. This article is a much better read at how you can go about doing Mode 7: http://www.coranac.com/tonc/text/mode7.htm

Mode 7 is a very simple effect. It projects a 2D x/y texture (or tiles) to some floor/ceiling.

Some Pseudo code:

Code: Select all

for &#40;y = -yres/2 ; y < yres/2 ; y++&#41;
  for &#40;x = -xres/2 ; x < xres/2 ; x++&#41;
  &#123;
     horizon = -20; //adjust if needed
     fov = 200; 

     px = x;
     py = y - horizon - fov; 
     pz = y - horizon;      

     //projection 
     sx = px / pz;
     sy = py / pz; 

     scaling = 100; //adjust if needed, depends of texture size
     color = get2DTexture&#40;sx * scaling, sy * scaling&#41;;  

     //put &#40;color&#41; at &#40;x, y&#41; on screen
     ...
  &#125;
You can rotate the actual texture using the following formulas:

Code: Select all

  x = x * cos&#40;angle&#41; - y * sin&#40;angle&#41;;
  y = x * sin&#40;angle&#41; + y * cos&#40;angle&#41;;
I don't believe you can do this yet with Slices in OHR RPG, perhaps in a future version, we can scale Slices to our hearts content. :)
User avatar
kylekrack
Liquid Metal Slime
Posts: 1188
Joined: Mon Jun 16, 2014 8:58 am
Location: USA
Contact:

Post by kylekrack »

I just through this together a few minutes before I went to bed last night. Don't expect anything impressive. I just used a couple for loops to draw rectangles for the grass and then the road with varying widths. I didn't get into movement of the road or different sized layers for perspective, but messing with the for loops' steps and the rectangle heights, you can adjust things. If anyone wants to copy this (if it's even worth it) here it is. I'll make it more in depth later, but uh, calculus homework.

Code: Select all

plotscript, main loop, begin
        variable&#40;col&#41;
	col &#58;= load slice collection&#40;1&#41;
	initialize
end

script, initialize, begin
	variable&#40;b,m,t,sl,width,height&#41;
	for&#40;b,50,200,4&#41; do&#40;
		sl &#58;= create rect&#40;320,2,1&#41;
		put slice&#40;sl,0,b&#41;
	&#41;
	for&#40;b,52,202,4&#41; do&#40;
		sl &#58;= create rect&#40;320,2,2&#41;
		put slice&#40;sl,0,b&#41;
	&#41;
	width &#58;= 100
	for&#40;m,50,200,1&#41; do&#40;
		sl &#58;= create rect&#40;width,1,3&#41;
		put slice&#40;sl,160,m&#41;
		set horiz anchor&#40;sl,edge&#58;center&#41;
		increment&#40;width,4&#41;
	&#41;
end
Last edited by kylekrack on Wed Mar 25, 2015 2:43 am, edited 1 time in total.
My pronouns are they/them
Ps. I love my wife
Post Reply